Xopt Optimizer#

class bluesky_adaptive.xopt.optimizer.XoptOptimizer(generator, *, checkpoint_path=None)[source]#

Bases: Optimizer, Checkpointable, CanRegisterSuggestions, TrialFaultAware

Adapter that exposes an arbitrary Xopt generator through Bluesky Adaptive’s Optimizer protocol.

classmethod from_checkpoint(checkpoint_path)[source]#

Load optimizer from a checkpoint.

property checkpoint_path: str | None#

Checkpoint path for saving optimizer state.

property generator: Generator#

The underlying Xopt generator instance.

property vocs: VOCS#

Xopt VOCS structure.

suggest(num_points=None)[source]#

Suggested points to sample from the optimizer.

register_suggestions(suggestions)[source]#

Register external suggestions with the optimizer.

Suggestions without an “_id” get the next ID. Registered suggestions still awaiting outcomes are returned unchanged; an unknown “_id” is registered as given.

Raises:
ValueError

If an “_id” already has outcomes or was marked failed, or its parameters differ from those registered. No suggestions are registered.

ingest(points)[source]#

Ingest outcomes into the optimizer.

register_failures(suggestions)[source]#

Register failures with the optimizer.

get_best_points()[source]#

Best points from the optimizer.

checkpoint()[source]#

Dump serialized optimizer state to the configured checkpoint JSON file.