Skip to content

Conversation

@hvarfner
Copy link

Summary:
This diff addresses two issues in the computation of inference trace:

  1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

  2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:

  • Moved copying of generation strategy
  • Added argument use_model_only_if_good to force model-based BPR even if model fit is bad
  • Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index

Differential Revision: D80019803

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

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

@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 12, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- (re?)-Moved copying of generation strategy
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 12, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- (re?)-Moved copying of generation strategy
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 12, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- (re?)-Moved copying of generation strategy
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 99.27536% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.73%. Comparing base (cd548b7) to head (bf99553).

Files with missing lines Patch % Lines
ax/service/utils/best_point.py 95.45% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4128   +/-   ##
=======================================
  Coverage   96.72%   96.73%           
=======================================
  Files         582      582           
  Lines       60742    60738    -4     
=======================================
  Hits        58754    58754           
+ Misses       1988     1984    -4     

☔ 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.

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 12, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- (re?)-Moved copying of generation strategy
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 13, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 13, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 14, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 14, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:
Pull Request resolved: facebook#4128

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 18, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 19, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 19, 2025
…4128)

Summary:
Pull Request resolved: facebook#4128

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 19, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 19, 2025
…4128)

Summary:
Pull Request resolved: facebook#4128

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 19, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 19, 2025
…4128)

Summary:

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@facebook-github-bot
Copy link
Contributor

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

hvarfner pushed a commit to hvarfner/Ax that referenced this pull request Aug 19, 2025
…4128)

Summary:
Pull Request resolved: facebook#4128

This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
Summary:
Updates 2026-01-13:
Removed cross-validation from best point selection — it was under-tested and redundant.

Changes:

- best_point.py: Removed assess_model_fit / _is_all_noiseless logic; now always uses model_best_point() directly

- test_best_point_utils.py: Removed 2 obsolete tests, fixed 2 test bugs (missing metric_signature, wrong experiment reference)
- benchmark.py / test_benchmark.py: Import fixes


This diff addresses two issues in the computation of inference trace:
1. The generation strategy is copied inside run_optimization_with_orchestrator --> we retrieve the traces on an unused generation strategy --> get_best_point defaults to the best raw observation on ALL obserations

2. Relevant data not filtered in the fallback option for get_best_parameters_from_model_predictions_with_trial_index

Both of these individually lead to the inference trace being incorrect - the first to the best raw value of ALL trials, the second to the best predicted across ALL trials.

Changes:
- Moved copying of generation strategy to the level`benchmark_replication`, since results need to be computed on the used `generation_strategy` and not an empty copy. This means that `run_optimization_with_orchestrator` no longer `clone_and_reset`'s the GS.
- Clearer sequencing in get_best_parameters_from_model_predictions_with_trial_index
- Removed model fit quality check as part of BPR

Previous, redacted changes:
- Added argument use_model_only_if_good to force model-based BPR even if model fit is bad

Differential Revision: D80019803
@meta-codesync
Copy link

meta-codesync bot commented Jan 13, 2026

@hvarfner has exported this pull request. If you are a Meta employee, you can view the originating Diff in D80019803.

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 meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants