Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JoelPasvolsky opened this issue Nov 8, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@JoelPasvolsky
Copy link
Contributor

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.

@arcondello arcondello added the bug Something isn't working label Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants