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

Make deprecated SurrogateSpec arguments InitVars #3128

Closed
wants to merge 1 commit into from

Conversation

saitcakmak
Copy link
Contributor

Summary:
We do not want to keep the deprecated arguments as fields of the SurrogateSpec. We only convert them to ModelConfig in __post_init__ and ignore them after. InitVar is the perfect tool for doing this.

Keeping these as fields leads to issues in other diffs where the values of the deprecated attribute goes out of sync with the specified ModelConfig.

Differential Revision: D66553624

Summary:
We do not want to keep the deprecated arguments as fields of the `SurrogateSpec`. We only convert them to `ModelConfig` in `__post_init__` and ignore them after. `InitVar` is the perfect tool for doing this.

Keeping these as fields leads to issues in other diffs where the values of the deprecated attribute goes out of sync with the specified `ModelConfig`.

Differential Revision: D66553624
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 27, 2024
@facebook-github-bot
Copy link
Contributor

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

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.43%. Comparing base (5c12006) to head (40957ec).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3128   +/-   ##
=======================================
  Coverage   95.43%   95.43%           
=======================================
  Files         503      503           
  Lines       50381    50381           
=======================================
  Hits        48082    48082           
  Misses       2299     2299           

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

saitcakmak added a commit to saitcakmak/Ax that referenced this pull request Nov 27, 2024
Summary:

We do not want to keep the deprecated arguments as fields of the `SurrogateSpec`. We only convert them to `ModelConfig` in `__post_init__` and ignore them after. `InitVar` is the perfect tool for doing this.

Keeping these as fields leads to issues in other diffs where the values of the deprecated attribute goes out of sync with the specified `ModelConfig`.

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

This pull request has been merged in a44cb2f.

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