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

Change SurrogateBenchmarkProblem to TorchModelBridge #2591

Closed
wants to merge 1 commit into from

Conversation

dme65
Copy link
Contributor

@dme65 dme65 commented Jul 19, 2024

Summary:
This diff changes our surrogate benchmark problems to use a TorchModelBridge instead of a Surrogate

Why this change?
Our current surrogate benchmark problems are constructed in the transformed space and thus don't have any transform. Constructing the surrogates in the transformed space doesn't play well with things like HSS and also doesn't allow us to fully utilize methods targeting discrete and mixed search spaces.

This setup also plays much better with how we normally fit models in Ax as, e.g., cross-validation is done on the model bridge. Going forward, constructing a surrogate benchmark problem will end up looking something like this:

  1. Load data
  2. Fit an Ax modelbridge
  3. Cross-validate the modelbridge to make sure the model fit quality looks good
  4. Save the components needed to reconstruct the modelbridge (e.g., state dict)

Reviewed By: saitcakmak

Differential Revision: D59883218

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

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

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.20%. Comparing base (be8e1f7) to head (fdcca30).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2591      +/-   ##
==========================================
- Coverage   95.22%   95.20%   -0.02%     
==========================================
  Files         489      489              
  Lines       47703    47678      -25     
==========================================
- Hits        45426    45394      -32     
- Misses       2277     2284       +7     

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

@facebook-github-bot
Copy link
Contributor

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

dme65 pushed a commit to dme65/Ax that referenced this pull request Jul 19, 2024
Summary:
Pull Request resolved: facebook#2591

This diff changes our surrogate benchmark problems to use a `TorchModelBridge` instead of a `Surrogate`

**Why this change?**
Our current surrogate benchmark problems are constructed in the transformed space and thus don't have any transform. Constructing the surrogates in the transformed space doesn't play well with things like HSS and also doesn't allow us to fully utilize methods targeting discrete and mixed search spaces.

This setup also plays much better with how we normally fit models in Ax as, e.g., cross-validation is done on the model bridge. Going forward, constructing a surrogate benchmark problem will end up looking something like this:
1.  Load data
2. Fit an Ax modelbridge
3. Cross-validate the modelbridge to make sure the model fit quality looks good
4. Save the components needed to reconstruct the modelbridge (e.g., state dict)

Reviewed By: saitcakmak

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

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

dme65 pushed a commit to dme65/Ax that referenced this pull request Jul 19, 2024
Summary:
Pull Request resolved: facebook#2591

This diff changes our surrogate benchmark problems to use a `TorchModelBridge` instead of a `Surrogate`

**Why this change?**
Our current surrogate benchmark problems are constructed in the transformed space and thus don't have any transform. Constructing the surrogates in the transformed space doesn't play well with things like HSS and also doesn't allow us to fully utilize methods targeting discrete and mixed search spaces.

This setup also plays much better with how we normally fit models in Ax as, e.g., cross-validation is done on the model bridge. Going forward, constructing a surrogate benchmark problem will end up looking something like this:
1.  Load data
2. Fit an Ax modelbridge
3. Cross-validate the modelbridge to make sure the model fit quality looks good
4. Save the components needed to reconstruct the modelbridge (e.g., state dict)

Reviewed By: saitcakmak

Differential Revision: D59883218
Summary:
Pull Request resolved: facebook#2591

This diff changes our surrogate benchmark problems to use a `TorchModelBridge` instead of a `Surrogate`

**Why this change?**
Our current surrogate benchmark problems are constructed in the transformed space and thus don't have any transform. Constructing the surrogates in the transformed space doesn't play well with things like HSS and also doesn't allow us to fully utilize methods targeting discrete and mixed search spaces.

This setup also plays much better with how we normally fit models in Ax as, e.g., cross-validation is done on the model bridge. Going forward, constructing a surrogate benchmark problem will end up looking something like this:
1.  Load data
2. Fit an Ax modelbridge
3. Cross-validate the modelbridge to make sure the model fit quality looks good
4. Save the components needed to reconstruct the modelbridge (e.g., state dict)

Reviewed By: saitcakmak

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in c31d5fd.

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