mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Uses `dict.fromkeys` whenever possible as covered by flake8-comprehensions rule C420. While the ruff rule RUF025 is still in preview, flake8-comprehensions have added a new rule which covers this. Use dict.fromkeys is faster when the value being added to the dictionary is the same at every iteration and is immutable, it also removes an unnecessary dict comprehension. This rule will be enabled with our current ruleset in RUF in 0.6 as C420. Pull Request resolved: https://github.com/pytorch/pytorch/pull/130699 Approved by: https://github.com/lezcano, https://github.com/ezyang |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| fsdp2_mem_tracker.py | ||
| mem_tracker.py | ||
| memory_tracker.py | ||
| mod_tracker.py | ||