Skip to content

Conversation

@flinder
Copy link
Contributor

@flinder flinder commented Jan 30, 2026

Summary:
Return observed best parameters instead of model-predicted best by setting
use_model_predictions=False in get_best_parameterization(). With few tuning
trials, the Bayesian surrogate model may not be well-calibrated and could
return suboptimal parameters that don't match the actual best observed trial.

This has confused users in the past and looks like a bug in the tutorial notebook.

Differential Revision: D91884588

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 30, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 30, 2026

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

flinder added a commit to flinder/MCGrad-1 that referenced this pull request Jan 30, 2026
Summary:

Return observed best parameters instead of model-predicted best by setting
use_model_predictions=False in get_best_parameterization(). With few tuning
trials, the Bayesian surrogate model may not be well-calibrated and could
return suboptimal parameters that don't match the actual best observed trial.

This has confused users in the past and looks like a bug in the tutorial notebook.

Differential Revision: D91884588
flinder added a commit to flinder/MCGrad-1 that referenced this pull request Jan 30, 2026
Summary:
Pull Request resolved: facebookincubator#196

Return observed best parameters instead of model-predicted best by setting
use_model_predictions=False in get_best_parameterization(). With few tuning
trials, the Bayesian surrogate model may not be well-calibrated and could
return suboptimal parameters that don't match the actual best observed trial.

This has confused users in the past and looks like a bug in the tutorial notebook.

Differential Revision: D91884588
@meta-codesync
Copy link

meta-codesync bot commented Jan 30, 2026

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

Summary:
Add a `use_model_predictions` parameter to `tune_mcgrad_params` with `False` as
the default. When False, returns the actual observed best trial parameters.
When True, uses the Bayesian surrogate model's predicted best parameters.

The default is False because with few tuning trials, the surrogate model has
high uncertainty and may predict a different optimum than the best observed
trial. Users who want the model-predicted best can set this to True.

Reviewed By: Lorenzo-Perini

Differential Revision: D91884588
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@f22ddc8). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #196   +/-   ##
=======================================
  Coverage        ?   94.92%           
=======================================
  Files           ?        9           
  Lines           ?     1753           
  Branches        ?        0           
=======================================
  Hits            ?     1664           
  Misses          ?       89           
  Partials        ?        0           
Flag Coverage Δ
unittests 94.92% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

flinder added a commit to flinder/MCGrad-1 that referenced this pull request Jan 30, 2026
Summary:

Add a `use_model_predictions` parameter to `tune_mcgrad_params` with `False` as
the default. When False, returns the actual observed best trial parameters.
When True, uses the Bayesian surrogate model's predicted best parameters.

The default is False because with few tuning trials, the surrogate model has
high uncertainty and may predict a different optimum than the best observed
trial. Users who want the model-predicted best can set this to True.

Reviewed By: Lorenzo-Perini

Differential Revision: D91884588
flinder added a commit to flinder/MCGrad-1 that referenced this pull request Jan 30, 2026
Summary:

Add a `use_model_predictions` parameter to `tune_mcgrad_params` with `False` as
the default. When False, returns the actual observed best trial parameters.
When True, uses the Bayesian surrogate model's predicted best parameters.

The default is False because with few tuning trials, the surrogate model has
high uncertainty and may predict a different optimum than the best observed
trial. Users who want the model-predicted best can set this to True.

Reviewed By: Lorenzo-Perini

Differential Revision: D91884588
flinder added a commit to flinder/MCGrad-1 that referenced this pull request Jan 30, 2026
Summary:

Add a `use_model_predictions` parameter to `tune_mcgrad_params` with `False` as
the default. When False, returns the actual observed best trial parameters.
When True, uses the Bayesian surrogate model's predicted best parameters.

The default is False because with few tuning trials, the surrogate model has
high uncertainty and may predict a different optimum than the best observed
trial. Users who want the model-predicted best can set this to True.

Reviewed By: Lorenzo-Perini

Differential Revision: D91884588
@meta-codesync meta-codesync bot closed this in ca9fb7b Jan 30, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 30, 2026

This pull request has been merged in ca9fb7b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants