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

Refactor BestModelSelector to operate on ModelSpecs #2557

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

saitcakmak
Copy link
Contributor

Summary:
BestModelSelector was previously limited to selecting the best out of a given dictionary of CV diagnostics that were computed in ModelSpec.cross_validate. This setup limited extensibility, since any change would require updating ModelSpec code to the diagnostics that are computed.

This diff refactors BestModelSelector to directly operate on the ModelSpecs. This new modular design will let each BestModelSelector class compute the necessary diagnostics internally, without locking us up to any pre-specified list.

Other minor changes:

  • Removed CallableEnum and subclasses. These didn't offer a clear benefit over just passing in the callables, and they weren't being utilized in the code base.
  • Split off BestModelSelector into a separate file to avoid circular imports.

Differential Revision: D59249657

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

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

@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.22%. Comparing base (b97c394) to head (8de9b93).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2557   +/-   ##
=======================================
  Coverage   95.21%   95.22%           
=======================================
  Files         487      489    +2     
  Lines       47579    47601   +22     
=======================================
+ Hits        45304    45327   +23     
+ Misses       2275     2274    -1     

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

Summary:
Pull Request resolved: facebook#2557

`BestModelSelector` was previously limited to selecting the best out of a given dictionary of CV diagnostics that were computed in `ModelSpec.cross_validate`. This setup limited extensibility, since any change would require updating `ModelSpec` code to the diagnostics that are computed.

This diff refactors `BestModelSelector` to directly operate on the `ModelSpecs`. This new modular design will let each `BestModelSelector` class compute the necessary diagnostics internally, without locking us up to any pre-specified list.

Other minor changes:
- Removed `CallableEnum` and subclasses and replaced these with a single `ReductionCriterion` enum.
- Split off `BestModelSelector` into a separate file to avoid circular imports.

Differential Revision: D59249657
saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Jul 3, 2024
Summary:
Pull Request resolved: facebook#2557

`BestModelSelector` was previously limited to selecting the best out of a given dictionary of CV diagnostics that were computed in `ModelSpec.cross_validate`. This setup limited extensibility, since any change would require updating `ModelSpec` code to the diagnostics that are computed.

This diff refactors `BestModelSelector` to directly operate on the `ModelSpecs`. This new modular design will let each `BestModelSelector` class compute the necessary diagnostics internally, without locking us up to any pre-specified list.

Other minor changes:
- Removed `CallableEnum` and subclasses and replaced these with a single `ReductionCriterion` enum.
- Split off `BestModelSelector` into a separate file to avoid circular imports.

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

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

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Jul 4, 2024
Summary:
Pull Request resolved: facebook#2557

`BestModelSelector` was previously limited to selecting the best out of a given dictionary of CV diagnostics that were computed in `ModelSpec.cross_validate`. This setup limited extensibility, since any change would require updating `ModelSpec` code to the diagnostics that are computed.

This diff refactors `BestModelSelector` to directly operate on the `ModelSpecs`. This new modular design will let each `BestModelSelector` class compute the necessary diagnostics internally, without locking us up to any pre-specified list.

Other minor changes:
- Removed `CallableEnum` and subclasses and replaced these with a single `ReductionCriterion` enum.
- Split off `BestModelSelector` into a separate file to avoid circular imports.

Differential Revision: D59249657
saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Jul 5, 2024
Summary:
Pull Request resolved: facebook#2557

`BestModelSelector` was previously limited to selecting the best out of a given dictionary of CV diagnostics that were computed in `ModelSpec.cross_validate`. This setup limited extensibility, since any change would require updating `ModelSpec` code to the diagnostics that are computed.

This diff refactors `BestModelSelector` to directly operate on the `ModelSpecs`. This new modular design will let each `BestModelSelector` class compute the necessary diagnostics internally, without locking us up to any pre-specified list.

Other minor changes:
- Removed `CallableEnum` and subclasses and replaced these with a single `ReductionCriterion` enum.
- Split off `BestModelSelector` into a separate file to avoid circular imports.

Differential Revision: D59249657
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.

None yet

3 participants