Split base factory helpers#1682
Open
vmoens wants to merge 1 commit intopytorch:mainfrom
Open
Conversation
Contributor
PR Title Label ErrorPR title must start with a label prefix in brackets (e.g., Current title: Supported PrefixesYour PR title must start with exactly one of these prefixes (case-insensitive):
Note: Matching is case-insensitive. Common variations (singular/plural) are supported. |
Contributor
PR Title Label ErrorPR title must start with a label prefix in brackets (e.g., Current title: Supported PrefixesYour PR title must start with exactly one of these prefixes (case-insensitive):
Note: Matching is case-insensitive. Common variations (singular/plural) are supported. |
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
tensordict.basefactory helpers intotensordict._base.factoriestensordict.baseas the compatibility facade for the moved helpers__module__valuesBC notes
tensordict,tensordict.base,tensordict._td,tensordict._lazy,tensordict.tensorclass, andtensordict.store._storeremain valid__module__ == "tensordict.base"Test plan
python -m pytest test/test_compatibility.py::test_legacy_import_paths_are_preserved test/test_compatibility.py::test_public_class_modules_are_preserved -qpython -m pytest test/test_tensordict.py -k "from_dict or from_namedtuple or from_struct_array or from_tuple or from_csv or from_json or from_parquet or from_pandas" -qpython -m pytest test/test_compatibility.py -q -k "not redis and not StoreFromSchema and not Preallocation"python -m compileall -q tensordict/_base tensordict/base.pyFull
test/test_compatibility.pyis not runnable in my local environment because Redis Python support is installed but no Redis server is listening onlocalhost:6379.