Skip to content

Presolver.detach_model() should cause subsequent access to model to fail #58

Description

@JoelPasvolsky

The detach_model() docs say "Subsequent attempts to access the model will raise a RuntimeError" but that is not happening:

pre = Presolver(cqm)
pre.load_default_presolvers()
pre.detach_model()
cqm2 = pre.copy_model()
>>> type(cqm2)
dimod.constrained.constrained.ConstrainedQuadraticModel
>>> cqm2.is_equal(dimod.ConstrainedQuadraticModel())
True

The post-detach cqm2 = pre.copy_model() command gives no error and happily generates an empty CQM.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions