You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Abstract base class for dimod composed samplers.
Up until we implemented Scoped interface (.close()) on both Sampler and Composite, this was not an issue, as their methods didn't overlap.
However, now we want Composite.close() to override Sampler.close(), as it implements a meaningful behavior unlike the no-op close on sampler. Generally as well I think it makes sense for composite attributes to take precedence over sampler attrs on a composed sampler.
The text was updated successfully, but these errors were encountered:
randomir
added a commit
to randomir/dimod
that referenced
this issue
Mar 20, 2025
Currently,
Sampler
attributes overrideComposite
attributes inComposedSampler
(and similarly inComposedPolySampler
):dimod/dimod/core/composite.py
Lines 110 to 111 in 7c27eb5
Up until we implemented
Scoped
interface (.close()
) on bothSampler
andComposite
, this was not an issue, as their methods didn't overlap.However, now we want
Composite.close()
to overrideSampler.close()
, as it implements a meaningful behavior unlike the no-op close on sampler. Generally as well I think it makes sense for composite attributes to take precedence over sampler attrs on a composed sampler.The text was updated successfully, but these errors were encountered: