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

Bug fix: Make Acquisition.optimize work with discrete optimizer regardless of whether raw_samples is in optimizer_options #2772

Closed
wants to merge 1 commit into from

Conversation

esantorella
Copy link
Contributor

Summary:
Context: When raw_samples is present in optimizer_options and the discrete optimizer is used, raw_samples is removed from optimizer_options because it isn't appropriate for for the discrete optimizer. However, raw_samples can't be removed if it isn't present. Not passing it (which is better) causes an error.

This PR: Doesn't try to remove raw_samples when it isn't present.

Reviewed By: saitcakmak

Differential Revision: D63035021

…ardless of whether `raw_samples` is in `optimizer_options`

Summary:
Context: When `raw_samples` is present in `optimizer_options` and the discrete optimizer is used, `raw_samples` is removed from `optimizer_options` because it isn't appropriate for for the discrete optimizer. However, `raw_samples` can't be removed if it isn't present. Not passing it (which is better) causes an error.

This PR: Doesn't try to remove `raw_samples` when it isn't present.

Reviewed By: saitcakmak

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

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

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.67%. Comparing base (b1b7678) to head (22ae11a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2772   +/-   ##
=======================================
  Coverage   95.67%   95.67%           
=======================================
  Files         486      486           
  Lines       47709    47712    +3     
=======================================
+ Hits        45645    45649    +4     
+ Misses       2064     2063    -1     

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3de05de.

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 Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants