-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Currently, the bluesky-queueserver integration is handled via a custom Agent that is specific to Ax optimizers. This can be reworked to use Blop's protocols rather than integrate only with Ax optimizers.
Here is the proposed refactor:
- Remove
blop/ax/queueserver_agent.py - Create
blop/queueserver.pyfile with 3 classes:blop.queueserver.ConsumerCallbackessentially unchangedblop.queueserver.QueueserverClient- Handles interaction with
REManagerAPI - Handles callbacks with
RemoteDispatcherandConsumerCallback
- Handles interaction with
blop.queueserver.QueueserverOptimizationRunner- Runs the optimization loop through a Bluesky queueserver
- Initialized with a
blop.protocols.OptimizationProblemand aQueueserverClient run()method that sends optimization iterations to the queue
- In
blop/ax/agent.pycreate a new agent that has a nice interface to the runner
Benefits of doing this are:
- Separation of responsibility for interaction with the queueserver and managing the runtime (more modular code)
- Enables the use of any optimizer (not just Ax) with the queueserver
- Maintains the agent interface (that uses the new runner under the hood)
User supplies:
- ZMQ addresses for communicaton
- Evaluation function
- Ophyd devices used (or rather their names)
- DOFs / Objectives / constraints / etc.
- Acquisition plan (or rather the plan name)
I may create a new OptimizationProblem dataclass that requires the actuators, sensors, and acquisition plan to be str rather than Python objects. The instances of the Python objects won't be available to the user, only the names of these objects would be.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels