Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Adjudicators #17

Merged
merged 18 commits into from
Mar 20, 2023
Merged

Conversation

maffettone
Copy link
Contributor

@maffettone maffettone commented Mar 17, 2023

Add adjudicator base class and two simple subclasses in preparation for joint BMM/PDF experiment.

Description

Each adjudicator subclass is required to implement make_judgments, which accepts no args or kwargs, and should return a list of tuples that contain the RE manager API, the agent name, and the Suggestion.
These tuples will by validated by Pydantic models, or can be Judgment objects.
This enables an agent to suggest many plans at once, to multiple beamlines!
Adjustable properties can be incorperated by the server, allowing for web and caproto control.

make_judgments can be called promptly after every new document, or only on user command.

Motivation and Context

The purpose of an adjudicator is to provide another layer of misdirection between the agents and the RunEngine Manager.
This is not required, as agents can send plans directly to the queue.
Alternatively, many agents can send plans to an adjudicator that acts as a meta-agent, filtering and deciding which plans from many agents make it to the queue.
In this way, the adjudicator acts as an extra experiment manager.
Feedback is not provided directly to the agents (i.e. no two way communication), so this is in effect, much like how high level human management communicates with low level employees.

Summary of Changes for Release Notes

Fixed

Added

  • Adjudicators
  • README to describe intent
  • Pydantic validation of messaging
  • Agents sending to adjudicator instead of queue

Changed

Removed

How Has This Been Tested?

Unit tested using docker-compose up from testing folder.

TODO:

  • Test sending plans to non-redundant adjudicator
  • Test sending plans to agent preferential adjudicator
  • Test launching adjudicator with uvicorn

@maffettone maffettone requested a review from tacaswell March 17, 2023 17:32
@maffettone maffettone force-pushed the enh-adjudicators-cherry branch from d001934 to 82b4cb7 Compare March 17, 2023 19:55
@maffettone maffettone marked this pull request as ready for review March 19, 2023 21:21
@maffettone
Copy link
Contributor Author

maffettone commented Mar 19, 2023

I can't seem to figure out why the docs compile nicely on my local machine and fail to compile in the github workflows. Otherwise
This is ready for a review and merge.
A k-d tree adjudicator is held for another PR .

@tacaswell tacaswell merged commit eb01c58 into bluesky:main Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants