dwavesystems / dwavesystems/dwave-optimization

State method ``.into_file`` has difficulty if current instantiated states is smaller that in the existing file

Open
#532 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
31
Forks
36
Avg merge
16h 55m
Merged PRs (30d)
8

Description

If you save two states into a file (``model.states.to_file()``) you can replace those two states with new ones and also add states (``model.states.into_file()``) but if you try writing fewer states (either with smaller ``model.states.size()`` or with an uninitialized state), you get an error. Functionally that's fine but the error is unclear (``BadZipFile: Bad magic number for central directory``) so it would be nice to catch this with a clearer error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.