mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 13:44:15 +08:00
[BE][PYFMT] migrate PYFMT for torch.{distributed,distributions}
to ruff format
(#144547)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144547 Approved by: https://github.com/kwen2501
This commit is contained in:
committed by
PyTorch MergeBot
parent
4e160d5fd9
commit
995df34b19
@ -140,9 +140,9 @@ def _shard_dict_of_args(
|
||||
real_num_chunks = num_chunks
|
||||
first_tensor = True
|
||||
|
||||
assert len(args_dict) == len(
|
||||
args_chunk_spec
|
||||
), f"args_dict.keys() = {list(args_dict.keys())} args_chunk_spec.keys() = {list(args_chunk_spec.keys())}"
|
||||
assert len(args_dict) == len(args_chunk_spec), (
|
||||
f"args_dict.keys() = {list(args_dict.keys())} args_chunk_spec.keys() = {list(args_chunk_spec.keys())}"
|
||||
)
|
||||
|
||||
for arg_key, arg in args_dict.items():
|
||||
flat, spec = tree_flatten(arg)
|
||||
|
Reference in New Issue
Block a user