Phase 3: Add Self type annotations to fluent/clone methods#4907
Open
Balandat wants to merge 1 commit intofacebook:mainfrom
Open
Phase 3: Add Self type annotations to fluent/clone methods#4907Balandat wants to merge 1 commit intofacebook:mainfrom
Balandat wants to merge 1 commit intofacebook:mainfrom
Conversation
Summary: Add Self type annotation from typing module to methods that return self or cloned instances of the same class. This enables better type inference for subclasses and improves IDE support. Files changed: - ax/core/base_trial.py - run(), stop(), complete(), mark_*() methods - ax/core/batch_trial.py - mark_arm_abandoned() - ax/core/experiment.py - add_tracking_metric(), update_tracking_metric(), etc. - ax/core/multi_type_experiment.py - add_trial_type(), update_runner(), metric methods - ax/core/arm.py - clone() - ax/core/objective.py - clone() on Objective, MultiObjective, ScalarizedObjective - ax/core/optimization_config.py - clone() - ax/core/runner.py - clone() - ax/core/parameter.py - clone() abstract method Differential Revision: D93186334
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4907 +/- ##
==========================================
- Coverage 96.78% 96.78% -0.01%
==========================================
Files 593 593
Lines 62284 62289 +5
==========================================
+ Hits 60282 60286 +4
- Misses 2002 2003 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Add Self type annotation from typing module to methods that return self
or cloned instances of the same class. This enables better type inference
for subclasses and improves IDE support.
Files changed:
Differential Revision: D93186334