dwavesystems / dwavesystems/dwave-preprocessing
Presolver.detach_model() should cause subsequent access to model to fail
- Lingua principale
- C++
- Stelle
- 9
- Fork
- 18
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
The ``detach_model()`` [docs](https://docs.ocean.dwavesys.com/en/stable/docs_preprocessing/reference/generated/dwave.preprocessing.presolve.Presolver.detach_model.html#dwave.preprocessing.presolve.Presolver.detach_model) say "Subsequent attempts to access the model will raise a [RuntimeError](https://docs.python.org/3/library/exceptions.html#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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.