Phase 3: Add Self type annotations to fluent/clone methods#4870
Open
Balandat wants to merge 1 commit intofacebook:mainfrom
Open
Phase 3: Add Self type annotations to fluent/clone methods#4870Balandat 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 Reviewed By: saitcakmak Differential Revision: D91648885
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4870 +/- ##
==========================================
- Coverage 96.76% 96.75% -0.01%
==========================================
Files 591 591
Lines 61879 61884 +5
==========================================
+ Hits 59875 59878 +3
- Misses 2004 2006 +2 ☔ 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:
Reviewed By: saitcakmak
Differential Revision: D91648885