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

Safer parameter boundary enforcement #141

Merged
merged 2 commits into from
Jun 13, 2022

Conversation

zakv
Copy link
Collaborator

@zakv zakv commented Jun 13, 2022

This PR introduces some changes to help ensure that parameter values always remain within their allowed range. This can be an important safety check because the values suggested by M-LOOP are often used to adjust settings for real hardware. Ideally the user's driver code should make it impossible to set that hardware to dangerous value regardless of what M-LOOP requests, but it doesn't hurt to have M-LOOP be extra careful to remain within its user-imposed limits. These checks are particularly important given that M-LOOP supports using third-party controllers/learners. The particular changes to enforce this check are enumerated below.

Changes proposed in this pull request:

  • Learner.put_params_and_get_cost() will now raise a RuntimeError if its suggested parameter values are outside of the allowed boundaries.
    • Previously it would only log a warning.
  • Controller._put_params_and_out_dict() now checks that parameter values are within the allowed boundaries before sending them to the interface to be tested experimentally.

zak-atom added 2 commits June 12, 2022 23:25
…f its suggested parameter values are outside of the allowed boundaries.
…w checks that parameter values are within the allowed boundaries before sending them to the interface to be tested experimentally.
@zakv zakv merged commit 93af81d into michaelhush:master Jun 13, 2022
@zakv zakv deleted the safer-parameter-boundary-enforcement branch June 14, 2022 10:13
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