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

Include progression information as metadata when transforming Data to Observations #3001

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ltiao
Copy link
Contributor

@ltiao ltiao commented Oct 31, 2024

Differential Revision: D65255312

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

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

@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.42%. Comparing base (3847400) to head (7c23f6a).

Files with missing lines Patch % Lines
ax/core/observation.py 87.50% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3001   +/-   ##
=======================================
  Coverage   95.42%   95.42%           
=======================================
  Files         493      493           
  Lines       49949    49934   -15     
=======================================
- Hits        47662    47649   -13     
+ Misses       2287     2285    -2     

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

ltiao added a commit to ltiao/Ax that referenced this pull request Nov 4, 2024
… Observations (facebook#3001)

Summary: Pull Request resolved: facebook#3001

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

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

ltiao added a commit to ltiao/Ax that referenced this pull request Nov 4, 2024
… Observations (facebook#3001)

Summary: Pull Request resolved: facebook#3001

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

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

ltiao added a commit to ltiao/Ax that referenced this pull request Nov 5, 2024
… Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

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

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

ltiao added a commit to ltiao/Ax that referenced this pull request Nov 5, 2024
… Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

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

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

ltiao pushed a commit to ltiao/Ax that referenced this pull request Nov 5, 2024
… Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
ltiao pushed a commit to ltiao/Ax that referenced this pull request Nov 7, 2024
… Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
ltiao pushed a commit to ltiao/Ax that referenced this pull request Nov 8, 2024
… Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
ltiao added a commit to ltiao/Ax that referenced this pull request Nov 22, 2024
… Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Nov 22, 2024
… Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

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

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

ltiao added a commit to ltiao/Ax that referenced this pull request Nov 22, 2024
… Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Nov 22, 2024
… Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Nov 22, 2024
… Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Nov 23, 2024
… Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Nov 25, 2024
…ta to Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Nov 25, 2024
…ta to Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Dec 4, 2024
…ta to Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Dec 4, 2024
…ta to Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao pushed a commit to ltiao/Ax that referenced this pull request Dec 4, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
ltiao pushed a commit to ltiao/Ax that referenced this pull request Dec 5, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
ltiao added a commit to ltiao/Ax that referenced this pull request Dec 9, 2024
…ta to Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

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

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

ltiao pushed a commit to ltiao/Ax that referenced this pull request Dec 9, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
ltiao added a commit to ltiao/Ax that referenced this pull request Dec 9, 2024
…ta to Observations (facebook#3001)

Summary:

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

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

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

ltiao pushed a commit to ltiao/Ax that referenced this pull request Dec 12, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
@facebook-github-bot
Copy link
Contributor

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

ltiao added a commit to ltiao/Ax that referenced this pull request Dec 12, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
ltiao added a commit to ltiao/Ax that referenced this pull request Dec 12, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

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

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

ltiao pushed a commit to ltiao/Ax that referenced this pull request Dec 12, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
ltiao pushed a commit to ltiao/Ax that referenced this pull request Dec 12, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
@facebook-github-bot
Copy link
Contributor

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

ltiao added a commit to ltiao/Ax that referenced this pull request Dec 12, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

Differential Revision: D65255312
Louis Tiao and others added 4 commits December 17, 2024 13:32
…ationFeature (facebook#3023)

Summary:
Pull Request resolved: facebook#3023

**Context:** The values corresponding to map keys are propagated as part of the ObservationFeatures' `metadata` dict field. We require a way to place it in the `parameters` dict field so that it can be used later on. This generalized transform is able to take user-specified entries from an `ObservationFeatures`'s `metadata` field and place it within its  `parameters` field, and update the search space accordingly to reflect this.

This implements a new transform, `MetadataToFloat`, that extracts specified fields from each `ObservationFeature` instance's metadata and incorporates them as parameters. Furthermore, it updates the search space to include the specified field as a `RangeParameter` with bounds determined by observations provided during initialization. This process involves analyzing the metadata of each observation feature and identifying relevant fields that need to be included in the search space. The bounds for these fields are then determined based on the observations provided during initialization.

Differential Revision: D65430943
… that provides sensible defaults for MapData (facebook#3155)

Summary:
Pull Request resolved: facebook#3155

This adds a specialization of the `MetadataToFloat` Transform, `MapKeyToFloat`, that provides sensible default settings to allow for intercepting map metric data appearing in the ObservationFeatures' metadata.

Additionally, for the purposes of specifying `fixed_features` down the line, when `_transform_observation_feature` is given an empty `ObservationFeatures` (more specifically, an `ObservationFeatures` with an empty `parameters` dict), it will populate it with the *upper bound* associated with each metadata key.

Differential Revision: D66945078
… rate for MapData (facebook#3106)

Summary:
Pull Request resolved: facebook#3106

This refines the logic for calculating per-metric subsampling rates in `MapData.subsample` and incorporates a (probably premature) performance optimization, achieved by utilizing binary search on a sorted list instead of linear search.

Differential Revision: D66366076

Reviewed By: Balandat
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Reviewed By: saitcakmak

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

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

ltiao pushed a commit to ltiao/Ax that referenced this pull request Dec 17, 2024
…ta to Observations (facebook#3001)

Summary:
Pull Request resolved: facebook#3001

This updates `observations_from_data` to include progression info as observation feature metadata by default. More specifically:

- Updates `observations_from_data` to subsume behavior of `observations_from_map_data` as special case.
- Updates calls to `observations_from_map_data` to instead call `observations_from_data`
- Removes `observations_from_map_data` which is used exclusively by `MapTorchModelBridge`

Differential Revision: D65255312

Reviewed By: saitcakmak
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants