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

Consolidate observe_noise_stds and observe_noise_sd #2599

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

esantorella
Copy link
Contributor

Summary:
Context: observe_noise_stds was intended to track whether noise is observed on a metric-by-metric level for multi-objective problems. It should be a dict if noise levels are observed for some metrics and not for others. It can also be boolean and be used for single-objective problems. Confusingly, observe_noise_sd can be used for single-objective problems. In practice, these are always boolean and identical, because we have neither problems with partially observed noise nor methods for partially observed noise. It's also confusing to keep track of which is present on which problems and what types it might have.

In the spirit of YAGNI and to facilitate bringing single-objective and multi-objective problems closer together, this PR removes observe_noise_stds and replaces it with with observe_noise_sd where appropriate. It is alwayas boolean.

If we wind up needing this, we can put it back in, but after more refactoring, the right design might look different.

Note: Similar to D60194654, breaks backward compatibility, including for storage.

Differential Revision: D60202753

esantorella and others added 2 commits July 24, 2024 14:06
…lems

Summary:
Context:

This will give single-objective and multi-objective benchmark problems a more consistent API, making it possible to simplify the inheritance structure in D60145193 and subsequent PRs.

Note: This breaks backwards compatibility, including for reading multi-objective benchmark problems stored as JSON. I think it's worthwhile because this will enable a lot of simplification in the future and because I expect we will want to break backward-compatibility again shortly. It would be possible to make this change BC, but I'm not sure it's worthwhile.

Note: Docstrings are updated in D60145193, so they are not updated here.

This PR:
* Makes `MultiObjectiveBenchmarkProblem.__init__` take an `optimal_value` argument, and removes its `maximum_hypervolume` argument.
* Removes the `optimal_value` property of `MultiObjectiveBenchmarkProblem`, which pointed to `maximum_hypervolume`.
* Does the same for surrogate benchmark problems.
* Updates references to `maximum_hypervolume`.

Differential Revision: D60194654
Summary:
Context: `observe_noise_stds` was intended to track whether noise is observed on a metric-by-metric level for multi-objective problems. It should be a dict if noise levels are observed for some metrics and not for others. It can also be boolean and be used for single-objective problems. Confusingly, `observe_noise_sd` can be used for single-objective problems. In practice, these are always boolean and identical, because we have neither problems with partially observed noise nor methods for partially observed noise. It's also confusing to keep track of which is present on which problems and what types it might have.

In the spirit of YAGNI and to facilitate bringing single-objective and multi-objective problems closer together, this PR removes `observe_noise_stds` and replaces it with with `observe_noise_sd` where appropriate. It is alwayas boolean.

If we wind up needing this, we can put it back in, but after more refactoring, the right design might look different.

Note: Similar to D60194654, breaks backward compatibility, including for storage.

Differential Revision: D60202753
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jul 24, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D60202753

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.21%. Comparing base (61a9f88) to head (ce99b4c).

Files Patch % Lines
ax/benchmark/benchmark_problem.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2599      +/-   ##
==========================================
- Coverage   95.21%   95.21%   -0.01%     
==========================================
  Files         489      489              
  Lines       47679    47670       -9     
==========================================
- Hits        45399    45390       -9     
  Misses       2280     2280              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants