Migrate TL adapter utils tests to non-fb location and drop shims#5217
Closed
saitcakmak wants to merge 1 commit into
Closed
Migrate TL adapter utils tests to non-fb location and drop shims#5217saitcakmak wants to merge 1 commit into
saitcakmak wants to merge 1 commit into
Conversation
Summary: The TL adapter utilities `get_joint_search_space`, `merge_dependents`, `merge_parameters` (in `ax/adapter/transfer_learning/utils.py`) and `get_mapped_parameter_names` (in `ax/adapter/transfer_learning/utils_torch.py`) were previously migrated out of `ax/fb/adapter/`, which left behind pure re-export shims at `ax/fb/adapter/utils.py` and `ax/fb/adapter/utils_torch.py`. The only remaining coverage for these functions lived in `ax/fb/adapter/tests/test_utils.py` and `test_utils_torch.py`, exercising the migrated code through those shims -- and the non-fb destination had no test coverage of its own. This moves both test files to `ax/adapter/transfer_learning/tests/`, switches their imports to the real non-fb modules (`ax.adapter.transfer_learning.utils`/`utils_torch`, `ax.core.auxiliary_source.AuxiliarySource`, `ax.utils.common.testutils.TestCase`), and removes the now-unused `get_unordered_choice`/`get_ordered_choice` helpers from `test_utils.py`. Since the two test files were the only callers of the `ax.fb.adapter.utils`/`utils_torch` shims repo-wide, the shims are deleted and the BUCK targets are updated accordingly: a new `test_utils` `python_unittest` is added under `ax/adapter/transfer_learning/BUCK`, and the old `test_utils` target, the orphaned `:utils` library, and the `utils_torch.py` src are removed from `ax/fb/adapter/BUCK`. The broader `ax.fb.core.auxiliary_source` shim is left in place; it still has many callers across admarket, pts, automl, storage, and docs, so cleaning it up is a separate effort. Differential Revision: D107429272
|
@saitcakmak has exported this pull request. If you are a Meta employee, you can view the originating Diff in D107429272. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5217 +/- ##
==========================================
+ Coverage 96.50% 96.57% +0.07%
==========================================
Files 617 619 +2
Lines 69776 69904 +128
==========================================
+ Hits 67339 67512 +173
+ Misses 2437 2392 -45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been merged in 779b245. |
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:
The TL adapter utilities
get_joint_search_space,merge_dependents,merge_parameters(inax/adapter/transfer_learning/utils.py) andget_mapped_parameter_names(inax/adapter/transfer_learning/utils_torch.py) were previously migrated out ofax/fb/adapter/, which left behind pure re-export shims atax/fb/adapter/utils.pyandax/fb/adapter/utils_torch.py. The only remaining coverage for these functions lived inax/fb/adapter/tests/test_utils.pyandtest_utils_torch.py, exercising the migrated code through those shims -- and the non-fb destination had no test coverage of its own.This moves both test files to
ax/adapter/transfer_learning/tests/, switches their imports to the real non-fb modules (ax.adapter.transfer_learning.utils/utils_torch,ax.core.auxiliary_source.AuxiliarySource,ax.utils.common.testutils.TestCase), and removes the now-unusedget_unordered_choice/get_ordered_choicehelpers fromtest_utils.py.Since the two test files were the only callers of the
ax.fb.adapter.utils/utils_torchshims repo-wide, the shims are deleted and the BUCK targets are updated accordingly: a newtest_utilspython_unittestis added underax/adapter/transfer_learning/BUCK, and the oldtest_utilstarget, the orphaned:utilslibrary, and theutils_torch.pysrc are removed fromax/fb/adapter/BUCK.The broader
ax.fb.core.auxiliary_sourceshim is left in place; it still has many callers across admarket, pts, automl, storage, and docs, so cleaning it up is a separate effort.Differential Revision: D107429272