-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add logic for running a decision making loop #365
Merged
Thomas-Christie
merged 2 commits into
JaxGaussianProcesses:tchristie/bo
from
Thomas-Christie:decision-maker
Sep 1, 2023
Merged
Add logic for running a decision making loop #365
Thomas-Christie
merged 2 commits into
JaxGaussianProcesses:tchristie/bo
from
Thomas-Christie:decision-maker
Sep 1, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added an `AbstractDecisionMaker` abstract base class which can be implemented in order to define a decision making loop. A concrete implementation, in the form of a `DecisionMaker` class, has been added. At its heart it has two core methods: 1. `ask` which is used to get a point to be queried next. 2. `tell` which is used to tell the `DecisionMaker` about new observations. In a typical decision making setup this will result in the datsets and posteriors being updated. In addition to this, in the `DecisionMaker` a `run` method is provided, which will automatically run the decision making loop for n steps. After the `ask` step, the functions in the `post_ask` list will be executed, taking as arguments the decision maker and the point chosen to be queried next. Similarly, after the `tell` step, the functions in the `post_tell` list are executed, taking the decision maker as the sole argument.
thomaspinder
approved these changes
Sep 1, 2023
henrymoss
reviewed
Sep 1, 2023
henrymoss
reviewed
Sep 1, 2023
henrymoss
reviewed
Sep 1, 2023
henrymoss
reviewed
Sep 1, 2023
henrymoss
reviewed
Sep 1, 2023
henrymoss
reviewed
Sep 1, 2023
henrymoss
reviewed
Sep 1, 2023
henrymoss
approved these changes
Sep 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Just a couple Qs about organisation here
Implemented minor CR feedback and renamed acquisition functions to utility functions to reflect the fact that the package will be used for general Bayesian decision making and not just Bayesian optimisation.
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of changes
Checklist
poetry run pre-commit run --all-files --show-diff-on-failure
before committing.Description
Add logic for running a decision making loop
Added an
AbstractDecisionMaker
abstract base class which can beimplemented in order to define a decision making loop.
A concrete implementation, in the form of a
DecisionMaker
class,has been added. At its heart it has two core methods:
ask
which is used to get a point to be queried next.tell
which is used to tell theDecisionMaker
about newobservations. In a typical decision making setup this will result in
the datsets and posteriors being updated.
In addition to this, in the
DecisionMaker
arun
method is provided,which will automatically run the decision making loop for n steps. After
the
ask
step, the functions in thepost_ask
list will be executed,taking as arguments the decision maker and the point chosen to be
queried next. Similarly, after the
tell
step, the functions inthe
post_tell
list are executed, taking the decision maker as the soleargument.
Also removed the check for type-checking import warnings (TCH) from Ruff in
pyproject.toml
.Issue Number: N/A