Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pytree] Extract reusable generic tests for pytree (pytorch#110395)
Part of pytorch#109684 - pytorch#109684 Changes: - Add new functions `tree_structure`, `tree_leaves`, `tree_map_` and `tree_map_only_` to Python pytree. - Extract reusable tests for pytree to `TestGenericPytree`. - Change `treespec_dumps` and `treespec_loads` in C++ pytree to call Python pytree and use JSON string as serialization type. - Rename `torch.utils.pytree` -> `torch.utils._cxx_pytree`. Pull Request resolved: pytorch#110395 Approved by: https://github.com/zou3519
- Loading branch information