mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
Remove unused Python variables in torch/[_-a]* (#133492)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/133492 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
7667235a23
commit
dc23f1944a
@ -75,8 +75,8 @@ def check_tensor_metadata_matches(nv, rv, desc):
|
||||
|
||||
def check_metadata_matches(n, r, desc):
|
||||
assert callable(desc)
|
||||
n_vals, n_spec = pytree.tree_flatten(n)
|
||||
r_vals, r_spec = pytree.tree_flatten(r)
|
||||
n_vals, _n_spec = pytree.tree_flatten(n)
|
||||
r_vals, _r_spec = pytree.tree_flatten(r)
|
||||
# TODO: test the specs match; empirically sometimes we have a tuple
|
||||
# on one side and a list on the other
|
||||
assert len(n_vals) == len(r_vals), f"{len(n_vals)} != {len(r_vals)}"
|
||||
|
Reference in New Issue
Block a user