Aaron Gokaslan
292af3cc89
[BE][Ez]: ISC001 Auto concatenate implicit one line strings ( #146408 )
...
Apply ruff rule about implicit string concatenation, this autofixes strings that are all the same type and on the same line. These lines are broken up likely as the result of autoformatters in the past. All fixes are automated using the autofixes in ISC001.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/146408
Approved by: https://github.com/justinchuby , https://github.com/janeyx99
2025-02-04 19:07:04 +00:00
Aaron Orenstein
316808e4e9
PEP585 update - torch/distributed/elastic torch/distributed/checkpoint ( #145163 )
...
See #145101 for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/145163
Approved by: https://github.com/Skylion007
2025-01-19 20:55:59 +00:00
Xuehai Pan
758a0a88a2
[BE][Easy] enable ruff rule PIE790: unnecessary pass statement ( #133200 )
...
This PR removes unnecessary `pass` statement. This is semanticly safe because the bytecode for the Python code does not change.
Note that if there is a docstring in the function, a empty function does not need a `pass` statement as placeholder.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/133200
Approved by: https://github.com/malfet , https://github.com/eqy , https://github.com/kit1980
2024-08-15 15:50:19 +00:00
Xuehai Pan
e6d4451ae8
[BE][Easy] enable UFMT for torch/distributed/{algorithms,autograd,benchmarks,checkpoint,elastic}/ ( #128866 )
...
Part of #123062
- #123062
Pull Request resolved: https://github.com/pytorch/pytorch/pull/128866
Approved by: https://github.com/fegin
2024-06-18 13:51:53 +00:00
Aaron Orenstein
3a0d088517
Flip default value for mypy disallow_untyped_defs [5/11] ( #127842 )
...
See #127836 for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/127842
Approved by: https://github.com/oulgen
2024-06-08 18:49:18 +00:00
Chirag Pandya
b6201a60c5
[BE] minor logging cleanup in distributed ( #122921 )
...
Summary:
Minor logging cleanup in distributed library
1. Don't use "f" formatted strings - address linter issues.
2. Nits: Make use of unused `e` (error) in a few logs.
3. Change info->debug as asked in issue #113545
4. Nit: rename log -> logger in a few files for consistency
5. Fix a linter error.
Test Plan:
1. Local build passes.
2. Linter is happy.
Reviewers: wanchaol
Pull Request resolved: https://github.com/pytorch/pytorch/pull/122921
Approved by: https://github.com/wanchaol
2024-03-29 03:34:01 +00:00
Edward Z. Yang
46712b019d
Enable local_partial_types ( #118467 )
...
When using dmypy, this setting is enabled and cannot be turned off. Force it for regular mypy too.
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/118467
Approved by: https://github.com/Skylion007
ghstack dependencies: #118414 , #118418 , #118432
2024-01-28 13:38:22 +00:00
Aaron Gokaslan
4bb3a02d02
[BE]: Enable Ruff + Flake8 G201,G202 logging format rule. ( #114474 )
...
Standardizes logging calls to always use logging.exception instead of logging.error where appropriate and enforces it with a lint.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/114474
Approved by: https://github.com/jansel , https://github.com/malfet
2023-11-27 17:38:08 +00:00
PyTorch MergeBot
8232d4d1c3
Revert "[BE]: Enable Ruff + Flake8 G201,G202 logging format rule. ( #114474 )"
...
This reverts commit d30497f6b6 .
Reverted https://github.com/pytorch/pytorch/pull/114474 on behalf of https://github.com/huydhn due to Sorry for reverting your change, but I see a bunch of inductor failure after the commit d30497f6b6 , trying to revert to see if it helps fix the issues ([comment](https://github.com/pytorch/pytorch/pull/114474#issuecomment-1827271887 ))
2023-11-27 07:36:08 +00:00
Aaron Gokaslan
d30497f6b6
[BE]: Enable Ruff + Flake8 G201,G202 logging format rule. ( #114474 )
...
Standardizes logging calls to always use logging.exception instead of logging.error where appropriate and enforces it with a lint.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/114474
Approved by: https://github.com/jansel
2023-11-24 23:29:51 +00:00
Edward Z. Yang
5a7aad9681
Convert logging f-strings to use % format, part four ( #98705 )
...
This does multi-line concatenated string literals.
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98705
Approved by: https://github.com/voznesenskym
2023-04-11 13:17:59 +00:00
Edward Z. Yang
b09722f540
Convert logging f-strings to use % format, part two ( #98700 )
...
This hits multi-line logging strings
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98700
Approved by: https://github.com/voznesenskym
2023-04-10 12:19:31 +00:00
Edward Z. Yang
9a8f71f23e
Convert logging f-strings to use % format ( #98697 )
...
Codemod done with
https://gist.github.com/ezyang/2e8b0463cdc6be278478495b23ff0530 with
assistance from ChatGPT.
Signed-off-by: Edward Z. Yang <ezyang@meta.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98697
Approved by: https://github.com/voznesenskym
2023-04-10 12:19:31 +00:00
Kazuaki Ishizaki
35fd5c548e
Fix typos under torch/distributed directory ( #95638 )
...
This PR fixes typos in comments and messages of `.py` files under torch/distributed directory
Pull Request resolved: https://github.com/pytorch/pytorch/pull/95638
Approved by: https://github.com/usamah1 , https://github.com/H-Huang , https://github.com/kit1980
2023-03-27 21:13:44 +00:00
Edward Z. Yang
eef019c14a
Lint rule to forbid direct use of logging.info/etc APIs ( #90907 )
...
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/90907
Approved by: https://github.com/jansel
2022-12-16 05:13:51 +00:00
PyTorch MergeBot
14a7cf79c1
Add __all__ to torch.distributed and tensorboard submodules ( #80444 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80444
Approved by: https://github.com/rohan-varma
2022-06-28 16:33:22 +00:00
Kiuk Chung
b03c92a9c5
[2/n][torch/elastic][upstream] Move torchelastic/timer torchelastic/multiprocessing to torch/distributed/elastic ( #53574 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53574
Upstreams `torchelastic/timer|multiprocessing` to `torch/distributed/elastic/timer|multiprocessing`
Test Plan:
```
buck test mode/dev-nosan //caffe2/torch/distributed/elastic/...
buck test mode/dev-nosan //caffe2/test/distributed/elastic/...
buck test mode/dev-nosan //pytorch/elastic/torchelastic/...
buck test mode/dev-nosan //hpc/...
buck test mode/dev-nosan //caffe2/torch/fb/training_toolkit/...
```
Reviewed By: borovsky-d, wilson100hong
Differential Revision: D26899809
fbshipit-source-id: e6dbc2a78282eac296c262b3206a979e3ef1ff53
2021-03-10 12:32:53 -08:00