Skip to content

Error when loading a model with some decision states uninitialized #585

Description

@arcondello
from dwave.optimization import Model

model = Model()

_, sets = model.disjoint_bit_sets(10, 5)
inp = model.input((3,), lower_bound=0, upper_bound=10, integral=True)

model.lock()

model.states.resize(1)

inp.set_state(0, [5, 6, 4])

with model.to_file(max_num_states=1) as f:
    Model.from_file(f)
KeyError: "There is no item named 'nodes/0/states/0/set0' in the archive"

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions