Skip to content

Conversation

@saitcakmak
Copy link
Contributor

Summary:
This diff makes two changes to extract_experiment_data to correctly filter out abandoned (and more generally other invalid status) trials / arms.

  • Updates extract_observation_data to check for (Batch)Trial.abandoned_arms and discard those if abandoned is not a valid status.
  • Updates filtering of arm_data to keep only the rows that have corresponding rows in observation_data. Previously this only checked if there was corresponding data in Data object, but this didn't account for invalid trial statuses. Keeping it in sync with observation_data should help eliminate some downstream issues.

Reviewed By: sunnyshen321

Differential Revision: D80292268

)

Summary:

`Acquisition._update_objective_thresholds` or `infer_objective_thresholds` call within can lead to errors during `Acquisition` initialization, even if the corresponding acquisition function doesn't need objective thresholds. We have some conditional logic to protect against this but it is not comprehensive enough.

The particular example that triggered this diff is the use of P_Feasible acquisition function when there are no feasible points. In this case, we can't infer objective thresholds since we need feasible points.

This diff adds a `try/except` block to catch errors raised in `infer_objective_thresholds` and logs a warning if any error is caught. This should make it possible to easily debug any related errors (thanks to the log) while letting the acquisition functions that don't need the thresholds run without issues.

Reviewed By: sunnyshen321

Differential Revision: D80259199
Summary:
This diff makes two changes to `extract_experiment_data` to correctly filter out abandoned (and more generally other invalid status) trials / arms.
- Updates `extract_observation_data` to check for `(Batch)Trial.abandoned_arms` and discard those if abandoned is not a valid status.
- Updates filtering of `arm_data` to keep only the rows that have corresponding rows in `observation_data`. Previously this only checked if there was corresponding data in `Data` object, but this didn't account for invalid trial statuses. Keeping it in sync with `observation_data` should help eliminate some downstream issues.

Reviewed By: sunnyshen321

Differential Revision: D80292268
@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Aug 14, 2025
@facebook-github-bot
Copy link
Contributor

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

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2025

Codecov Report

❌ Patch coverage is 98.18182% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.05%. Comparing base (5c4786e) to head (16f985a).
⚠️ Report is 562 commits behind head on main.

Files with missing lines Patch % Lines
ax/generators/torch/botorch_modular/acquisition.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4155   +/-   ##
=======================================
  Coverage   96.04%   96.05%           
=======================================
  Files         566      566           
  Lines       57168    57214   +46     
=======================================
+ Hits        54908    54955   +47     
+ Misses       2260     2259    -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in faf4c6e.

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