Skip to content

be explicit about task feature in TL #2918

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

Closed
wants to merge 1 commit into from

Conversation

sdaulton
Copy link
Contributor

@sdaulton sdaulton commented Jul 8, 2025

Summary:
X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to SearchSpaceDigest.task_features, but not to SearchSpaceDigest.bounds or SearchSpaceDigest.feature_names. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using Normalize that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to SearchSpaceDigest.bounds, SearchSpaceDigest.feature_names, and MultiTaskDataset.feature_names in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

Differential Revision: D77905821

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

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

Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b9ffefd) to head (3cdbd36).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2918   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          212       212           
  Lines        19818     19818           
=========================================
  Hits         19818     19818           

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

sdaulton added a commit to sdaulton/botorch that referenced this pull request Jul 8, 2025
Summary:

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

Differential Revision: D77905821
@sdaulton sdaulton force-pushed the export-D77905821 branch from 6c6134c to 943146b Compare July 8, 2025 23:32
sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 8, 2025
Summary:
X-link: pytorch/botorch#2918


Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

Differential Revision: D77905821
sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 8, 2025
Summary:
X-link: pytorch/botorch#2918


Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

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

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

sdaulton added a commit to sdaulton/botorch that referenced this pull request Jul 8, 2025
Summary:
Pull Request resolved: pytorch#2918

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

Differential Revision: D77905821
@sdaulton sdaulton force-pushed the export-D77905821 branch from 943146b to 7abde84 Compare July 8, 2025 23:37
sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 8, 2025
Summary:
X-link: pytorch/botorch#2918

Pull Request resolved: facebook#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

Differential Revision: D77905821
sdaulton added a commit to sdaulton/botorch that referenced this pull request Jul 10, 2025
Summary:

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

Differential Revision: D77905821
sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 10, 2025
Summary:
X-link: pytorch/botorch#2918


Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

Differential Revision: D77905821
sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 10, 2025
Summary:
X-link: pytorch/botorch#2918

Pull Request resolved: facebook#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

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

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

sdaulton added a commit to sdaulton/botorch that referenced this pull request Jul 10, 2025
Summary:
Pull Request resolved: pytorch#2918

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to `SearchSpaceDigest.bounds`,  `SearchSpaceDigest.feature_names`, and `MultiTaskDataset.feature_names` in order to be explicity about all features/bounds. This requires also adding the task feature as a fixed feature before generating, predicting, and cross-validating.

Reviewed By: saitcakmak

Differential Revision: D77905821
sdaulton added a commit to sdaulton/botorch that referenced this pull request Jul 15, 2025
Summary:

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

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

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

sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 15, 2025
Summary:
X-link: pytorch/botorch#2918


Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

Differential Revision: D77905821
sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 15, 2025
Summary:
X-link: pytorch/botorch#2918

Pull Request resolved: facebook#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

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

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

sdaulton added a commit to sdaulton/botorch that referenced this pull request Jul 15, 2025
Summary:
Pull Request resolved: pytorch#2918

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

Differential Revision: D77905821
sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 15, 2025
Summary:
X-link: pytorch/botorch#2918

Pull Request resolved: facebook#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

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

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

sdaulton added a commit to sdaulton/botorch that referenced this pull request Jul 15, 2025
Summary:
Pull Request resolved: pytorch#2918

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

Differential Revision: D77905821
sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 15, 2025
Summary:
X-link: pytorch/botorch#2918

Pull Request resolved: facebook#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

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

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

sdaulton added a commit to sdaulton/botorch that referenced this pull request Jul 15, 2025
Summary:
Pull Request resolved: pytorch#2918

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

Differential Revision: D77905821
Summary:
Pull Request resolved: pytorch#2918

X-link: facebook/Ax#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

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

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

sdaulton added a commit to sdaulton/Ax-1 that referenced this pull request Jul 15, 2025
Summary:
X-link: pytorch/botorch#2918

Pull Request resolved: facebook#4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

Differential Revision: D77905821
facebook-github-bot pushed a commit to facebook/Ax that referenced this pull request Jul 15, 2025
Summary:
X-link: pytorch/botorch#2918

Pull Request resolved: #4021

Previously, the TL adapter added a task feature to `SearchSpaceDigest.task_features`, but not to `SearchSpaceDigest.bounds` or `SearchSpaceDigest.feature_names`. This avoided needing to pass the task feature as a fixed_feature when making predictions or generating.

However, there was a bug when using `Normalize` that dropped one non-task feature here: https://github.com/facebook/Ax/blob/main/ax/generators/torch/botorch_modular/surrogate.py#L247-L250

This diff adds the task feature to via a new Transform. This significantly simplifies task feature handling across Adapter methods.

Reviewed By: saitcakmak

Differential Revision: D77905821

fbshipit-source-id: 5b71c1eba664850f5e1c7d623327d63b9d633d40
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 223656a.

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.

2 participants