Expose validation for TL experiments and fetching of candidate TL sources through AxService
Summary:
Core Data Structures (ax/core/auxiliary.py)
Added new dataclasses for auxiliary experiment handling:
-
AuxiliaryExperimentMetadata- Abstract base class for metadata -
PreferenceExplorationMetadata- For PE experiments (storesoverlap_metrics) -
TransferLearningMetadata- For TL experiments (storesoverlap_parameters) -
AuxiliaryExperimentValidation- Validation result containingis_valid,invalid_reason, andmetadata
Parameter Compatibility (ax/core/parameter.py)
Added parameter compatibility checking:
- New
is_compatible_with()method on the baseParameterclass - New abstract
_is_domain_compatible()method with implementations for:-
RangeParameter: Compatible if both are RangeParameters (bounds don't need to overlap) -
ChoiceParameter: Compatible if they have the same set of values -
FixedParameter: Compatible if they have the same value -
DerivedParameter: Always returnsFalse
-
Search Space Overlap (ax/core/search_space.py)
- Added
get_overlapping_parameters()method to identify compatible overlapping parameters between two search spaces
Experiment Validation (ax/core/experiment.py)
- Added
validate_auxiliary_experiment()method that validates a source experiment against a target experiment for a given purpose (currently supportsTRANSFERABLE_EXPERIMENT)
Storage Layer Changes (ax/storage/sqa_store/load.py)
Moved and refactored transfer learning identification logic:
- Added
_query_historical_experiments_given_parameters()- queries DB for historical experiments with specific parameters - Added
identify_transferable_experiments()- finds transferable experiments based on parameter overlap - Added
load_candidate_source_auxiliary_experiments()- loads candidate source experiments for a target experiment
Reviewed By: lena-kashtelyan
Differential Revision: D84102485
@Cesar-Cardoso has exported this pull request. If you are a Meta employee, you can view the originating Diff in D84102485.
Codecov Report
:x: Patch coverage is 95.00000% with 14 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 96.53%. Comparing base (f2e1c70) to head (0d7cfff).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ax/core/experiment.py | 20.00% | 8 Missing :warning: |
| ax/core/parameter.py | 78.94% | 4 Missing :warning: |
| ax/core/search_space.py | 88.88% | 1 Missing :warning: |
| ax/storage/sqa_store/load.py | 97.91% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #4615 +/- ##
==========================================
- Coverage 96.53% 96.53% -0.01%
==========================================
Files 563 563
Lines 58649 58918 +269
==========================================
+ Hits 56619 56875 +256
- Misses 2030 2043 +13
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.