8000 [pytree] hardcode values for `none_is_leaf` and `namespace` in C++ pytree by XuehaiPan · Pull Request #114858 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[pytree] hardcode values for none_is_leaf and namespace in C++ pytree #114858

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

Closed
wants to merge 8 commits into from
Closed
12 changes: 2 additions & 10 deletions test/test_pytree.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,10 @@ def test_aligned_public_apis(self):
cxx_signature = inspect.signature(cxx_api)
py_signature = inspect.signature(py_api)

# The C++ pytree APIs provide more features than the Python APIs.
# The Python APIs are a subset of the C++ APIs.
# Check the signature of the Python API is a subset of the C++ API.
# Check the parameter names are the same.
cxx_param_names = list(cxx_signature.parameters)
py_param_names = list(py_signature.parameters)
self.assertTrue(
set(cxx_param_names).issuperset(py_param_names),
msg=(
f"C++ parameter(s) ({cxx_param_names}) "
f"not in Python parameter(s) ({py_param_names})"
),
)
self.assertEqual(cxx_param_names, py_param_names)

# Check the positional parameters are the same.
cxx_positional_param_names = [
Expand Down
Loading
0