0afd335174
PEP585 update - torch/nn torch/optim torch/package torch/profiler torch/serialization torch/sparse torch/xpu ( #145175 )
...
See #145101 for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/145175
Approved by: https://github.com/bobrenjc93
2025-01-21 16:57:27 +00:00
5fd881a5b6
Revert "PEP585 update - torch/nn torch/optim torch/package torch/profiler torch/serialization torch/sparse torch/xpu ( #145175 )"
...
This reverts commit 54a00af2c6026a830f40d9e6a659ff81d51f9bc6.
Reverted https://github.com/pytorch/pytorch/pull/145175 on behalf of https://github.com/huydhn due to Sorry for reverting your change but it seems to break some trunk tests ([comment](https://github.com/pytorch/pytorch/pull/145175#issuecomment-2603418267 ))
2025-01-21 00:49:55 +00:00
54a00af2c6
PEP585 update - torch/nn torch/optim torch/package torch/profiler torch/serialization torch/sparse torch/xpu ( #145175 )
...
See #145101 for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/145175
Approved by: https://github.com/bobrenjc93
2025-01-20 22:32:59 +00:00
30293319a8
[BE][Easy][19/19] enforce style for empty lines in import segments in torch/[o-z]*/
( #129771 )
...
See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501 . Most changes are auto-generated by linter.
You can review these PRs via:
```bash
git diff --ignore-all-space --ignore-blank-lines HEAD~1
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129771
Approved by: https://github.com/justinchuby , https://github.com/janeyx99
2024-08-01 17:07:14 +00:00
8db9dfa2d7
Flip default value for mypy disallow_untyped_defs [9/11] ( #127846 )
...
See #127836 for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/127846
Approved by: https://github.com/ezyang
ghstack dependencies: #127842 , #127843 , #127844 , #127845
2024-06-08 18:50:06 +00:00
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
1ac60484c1
Revert "Fix global flake8 issues ( #124771 )"
...
This reverts commit f01275934bfa1ff358b1c01d3754f2807cd04ee2.
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
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
3721fa5612
[BE] Enable ruff's UP rules and autoformat optim/ ( #105426 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105426
Approved by: https://github.com/malfet , https://github.com/albanD , https://github.com/aaronenyeshi , https://github.com/janeyx99
2023-07-18 21:07:43 +00:00
3bcc19b29a
Add __all__ to various submodules in torch.fx, distributions, distributed, package ( #80367 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80367
Approved by: https://github.com/albanD
2022-06-27 21:27:30 +00:00
f625bb4bc9
[codemod][usort] apply import merging for fbcode (1 of 11) ( #78973 )
...
Summary:
Applies new import merging and sorting from µsort v1.0.
When merging imports, µsort will make a best-effort to move associated
comments to match merged elements, but there are known limitations due to
the diynamic nature of Python and developer tooling. These changes should
not produce any dangerous runtime changes, but may require touch-ups to
satisfy linters and other tooling.
Note that µsort uses case-insensitive, lexicographical sorting, which
results in a different ordering compared to isort. This provides a more
consistent sorting order, matching the case-insensitive order used when
sorting import statements by module name, and ensures that "frog", "FROG",
and "Frog" always sort next to each other.
For details on µsort's sorting and merging semantics, see the user guide:
https://usort.readthedocs.io/en/stable/guide.html#sorting
Test Plan: S271899
Reviewed By: lisroach
Differential Revision: D36402110
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78973
Approved by: https://github.com/osalpekar
2022-06-06 23:44:28 +00:00
c7890b4a8e
[package] doc string cleanup extravaganza ( #59843 )
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/59843
Test Plan: Imported from OSS
Reviewed By: SplitInfinity
Differential Revision: D29049342
Pulled By: Lilyjjo
fbshipit-source-id: 3330fb439f28dda0cafef5797ff61311f4afbf76
2021-06-10 21:21:48 -07:00
ed4cda0183
[pkg] opt into autoformat
...
Summary: woooo
Test Plan: arc lint --apply-patches --take BLACK --paths-cmd 'hg files -I "caffe2/**/*.py"'
Reviewed By: SplitInfinity
Differential Revision: D28608934
fbshipit-source-id: 7768fed50a87883a95319376c0a6d73a9492bdcc
2021-05-21 15:03:52 -07:00
31e59c3869
torch.package change Folder
to Directory
and add doc strings ( #56925 )
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56925
Test Plan: Imported from OSS
Reviewed By: suo
Differential Revision: D28002145
Pulled By: Lilyjjo
fbshipit-source-id: 6265970202d1530c4fb7ea10011b0e09094037d5
2021-04-28 13:03:12 -07:00