-
Notifications
You must be signed in to change notification settings - Fork 358
Expose validation for TL experiments and fetching of candidate TL sources through AxService #4615
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
Conversation
|
@Cesar-Cardoso has exported this pull request. If you are a Meta employee, you can view the originating Diff in D84102485. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4615 +/- ##
==========================================
- Coverage 96.52% 96.51% -0.01%
==========================================
Files 568 568
Lines 58958 59227 +269
==========================================
+ Hits 56909 57163 +254
- Misses 2049 2064 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
afcc527 to
d388f46
Compare
…rces through AxService (facebook#4615) 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 (stores `overlap_metrics`) - **`TransferLearningMetadata`** - For TL experiments (stores `overlap_parameters`) - **`AuxiliaryExperimentValidation`** - Validation result containing `is_valid`, `invalid_reason`, and `metadata` ## Parameter Compatibility (`ax/core/parameter.py`) Added parameter compatibility checking: - New `is_compatible_with()` method on the base `Parameter` class - 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 returns `False` ## 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 supports `TRANSFERABLE_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
…rces through AxService (facebook#4615) 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 (stores `overlap_metrics`) - **`TransferLearningMetadata`** - For TL experiments (stores `overlap_parameters`) - **`AuxiliaryExperimentValidation`** - Validation result containing `is_valid`, `invalid_reason`, and `metadata` ## Parameter Compatibility (`ax/core/parameter.py`) Added parameter compatibility checking: - New `is_compatible_with()` method on the base `Parameter` class - 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 returns `False` ## 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 supports `TRANSFERABLE_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
0d7cfff to
975db3b
Compare
…rces through AxService (facebook#4615) 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 (stores `overlap_metrics`) - **`TransferLearningMetadata`** - For TL experiments (stores `overlap_parameters`) - **`AuxiliaryExperimentValidation`** - Validation result containing `is_valid`, `invalid_reason`, and `metadata` ## Parameter Compatibility (`ax/core/parameter.py`) Added parameter compatibility checking: - New `is_compatible_with()` method on the base `Parameter` class - 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 returns `False` ## 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 supports `TRANSFERABLE_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
…rces through AxService (facebook#4615) 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 (stores `overlap_metrics`) - **`TransferLearningMetadata`** - For TL experiments (stores `overlap_parameters`) - **`AuxiliaryExperimentValidation`** - Validation result containing `is_valid`, `invalid_reason`, and `metadata` ## Parameter Compatibility (`ax/core/parameter.py`) Added parameter compatibility checking: - New `is_compatible_with()` method on the base `Parameter` class - 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 returns `False` ## 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 supports `TRANSFERABLE_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
975db3b to
70af965
Compare
|
This pull request has been merged in 441f000. |
Summary:
Core Data Structures (
ax/core/auxiliary.py)Added new dataclasses for auxiliary experiment handling:
AuxiliaryExperimentMetadata- Abstract base class for metadataPreferenceExplorationMetadata- For PE experiments (storesoverlap_metrics)TransferLearningMetadata- For TL experiments (storesoverlap_parameters)AuxiliaryExperimentValidation- Validation result containingis_valid,invalid_reason, andmetadataParameter Compatibility (
ax/core/parameter.py)Added parameter compatibility checking:
is_compatible_with()method on the baseParameterclass_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 valuesFixedParameter: Compatible if they have the same valueDerivedParameter: Always returnsFalseSearch Space Overlap (
ax/core/search_space.py)get_overlapping_parameters()method to identify compatible overlapping parameters between two search spacesExperiment Validation (
ax/core/experiment.py)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:
_query_historical_experiments_given_parameters()- queries DB for historical experiments with specific parametersidentify_transferable_experiments()- finds transferable experiments based on parameter overlapload_candidate_source_auxiliary_experiments()- loads candidate source experiments for a target experimentReviewed By: lena-kashtelyan
Differential Revision: D84102485