mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[1/N] Add strict parameter to Python zip calls (#165531)
Add `strict=True/False` to zip calls in test utils. `strict=True` is passed when possible. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165531 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
0f0b4bf029
commit
aaac8cb0f5
@ -1153,7 +1153,7 @@ def run_subtests(
|
||||
subtest_config_values: list[list[Any]] = [item[1] for item in subtest_config_items]
|
||||
for values in itertools.product(*subtest_config_values):
|
||||
# Map keyword to chosen value
|
||||
subtest_kwargs = dict(zip(subtest_config_keys, values))
|
||||
subtest_kwargs = dict(zip(subtest_config_keys, values, strict=True))
|
||||
with cls_inst.subTest(**subtest_kwargs):
|
||||
torch._dynamo.reset()
|
||||
test_fn(*test_args, **test_kwargs, **subtest_kwargs)
|
||||
|
Reference in New Issue
Block a user