Commit Graph

13 Commits

Author SHA1 Message Date
KarhouTam
bf5aeb3148 [torch/utils][Code Clean] Clean asserts in hipify/, jit/, model_dump and tensorboard of torch/utils (#165311)
Including:
- `torch/utils/hipify/`
- `torch/utils/jit/`
- `torch/utils/model_dump/`
- `torch/utils/tensorboard/`

Fixes part of #164878

Pull Request resolved: https://github.com/pytorch/pytorch/pull/165311
Approved by: https://github.com/albanD
2025-10-14 15:26:23 +00:00
Aaron Orenstein
2f9d378f7b PEP585 update - torch/utils (#145201)
See #145101 for details.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/145201
Approved by: https://github.com/bobrenjc93
2025-01-21 21:04:10 +00:00
Tom Ritchford
c0582fd0f8 Remove unused Python variables in torch/[b-z]* (#136963)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/136963
Approved by: https://github.com/ezyang
2024-10-19 16:45:22 +00:00
Aaron Orenstein
57536286e2 Flip default value for mypy disallow_untyped_defs [10/11] (#127847)
See #127836 for details.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/127847
Approved by: https://github.com/oulgen
ghstack dependencies: #127842, #127843, #127844, #127845, #127846
2024-06-08 18:50:06 +00:00
Aaron Orenstein
a8574a9719 Fix global flake8 issues (#124771)
Prior to this `lintrunner --all-files --take FLAKE8` failed.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/124771
Approved by: https://github.com/Skylion007
ghstack dependencies: #124428
2024-04-26 15:35:53 +00:00
PyTorch MergeBot
1ac60484c1 Revert "Fix global flake8 issues (#124771)"
This reverts commit f01275934b.

Reverted https://github.com/pytorch/pytorch/pull/124771 on behalf of https://github.com/jeanschmidt due to Unfortunately, I needed to revert #123735 and this one depends on it. So please check if there are no merge conflicts or breakages and feel free to merge this PR again ([comment](https://github.com/pytorch/pytorch/pull/124428#issuecomment-2078699836))
2024-04-26 06:15:17 +00:00
Aaron Orenstein
f01275934b Fix global flake8 issues (#124771)
Prior to this `lintrunner --all-files --take FLAKE8` failed.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/124771
Approved by: https://github.com/Skylion007
ghstack dependencies: #124428
2024-04-25 14:25:00 +00:00
Justin Chu
abc1cadddb [BE] Enable ruff's UP rules and autoformat utils/ (#105424)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105424
Approved by: https://github.com/ezyang, https://github.com/malfet
2023-07-18 20:17:25 +00:00
Nikita Shulga
40e2aadf47 Create __init__.py (#78629)
To make `torch.utils.jit` a proper package, otherwise it will not be added to the wheel

Pull Request resolved: https://github.com/pytorch/pytorch/pull/78629
Approved by: https://github.com/seemethere, https://github.com/xuzhao9, https://github.com/davidberard98
2022-06-03 18:14:21 +00:00
David Berard
fa44e165ff Retry "[JIT] parse prim::Constant[value=annotate()] and prim::Constant[value={0}]"
Retry of https://github.com/pytorch/pytorch/pull/76875. It was reverted
due to torchvision failures, but it turned out that the failures were
caused by a different PR.

irparser previously didn't support these, which would cause failures in
log_extract.py

Pull Request resolved: https://github.com/pytorch/pytorch/pull/77377

Approved by: https://github.com/datumbox
2022-05-13 15:12:07 +00:00
PyTorch MergeBot
2083b16f68 Revert "[JIT] parse prim::Constant[value=annotate()] and prim::Constant[value={0}]"
This reverts commit 31d3ce7000.

Reverted https://github.com/pytorch/pytorch/pull/76875 on behalf of https://github.com/janeyx99
2022-05-11 13:50:20 +00:00
David Berard
31d3ce7000 [JIT] parse prim::Constant[value=annotate()] and prim::Constant[value={0}]
irparser previously didn't support these, which would cause failures in
log_extract.py

Pull Request resolved: https://github.com/pytorch/pytorch/pull/76875

Approved by: https://github.com/eellison, https://github.com/tugsbayasgalan
2022-05-06 19:40:09 +00:00
David Berard
9d05ce602e [JIT] Move log_extract.py helper functions to torch.utils
This will allow us to reuse the log_extract.py tools in torchbench

Pull Request resolved: https://github.com/pytorch/pytorch/pull/75436

Approved by: https://github.com/eellison
2022-04-07 22:17:58 +00:00