Nikita Shulga
84d8ec73f1
[CD] Build Mac wheels using setup-python action ( #162136 )
...
Biggest difference between both conda and homebrew CPython builds and one from python.org, is that later are universal binaries and they are always trying to build universal extension...
Workaround lots of universal binary build attempts by explicitly specifying both `_PYTHON_PLATFORM` and `--plat-name` as well as `ARCH_FLAGS`
Suppressed actionlint warning on use of `freethreaded` flag which is document in https://github.com/actions/setup-python/tree/v5
TODO: Remove lots of temporary workarounds when `3.14` is out in October 2025
Pull Request resolved: https://github.com/pytorch/pytorch/pull/162136
Approved by: https://github.com/atalman , https://github.com/huydhn
ghstack dependencies: #162297 , #162265
2025-09-12 00:16:31 +00:00
Xuehai Pan
8a67daf283
[BE][Easy] enable postponed annotations in tools ( #129375 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129375
Approved by: https://github.com/malfet
2024-06-29 09:23:35 +00:00
PyTorch MergeBot
a32ce5ce34
Revert "[BE][Easy] enable postponed annotations in tools ( #129375 )"
...
This reverts commit 59eb2897f1 .
Reverted https://github.com/pytorch/pytorch/pull/129375 on behalf of https://github.com/huydhn due to Sorry for reverting your change but I need to revert to cleanly revert https://github.com/pytorch/pytorch/pull/129374 , please do a rebase and reland this ([comment](https://github.com/pytorch/pytorch/pull/129375#issuecomment-2197800541 ))
2024-06-29 00:44:25 +00:00
Xuehai Pan
59eb2897f1
[BE][Easy] enable postponed annotations in tools ( #129375 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129375
Approved by: https://github.com/malfet
2024-06-28 15:37:54 +00:00
Jean Schmidt
821ad56ea6
[CI] Enables support for pytorch ci build in ARC + introduces _linux-build-rg.yml. ( #121930 )
...
Introduce changes related to enable ARC to run on build for linux-jammy-py3.8-gcc11
Depends on:
* https://github.com/pytorch/pytorch/pull/121908
* https://github.com/pytorch/pytorch/pull/121907
* Force docker to update credentials: https://github.com/pytorch/test-infra/pull/4991
* Add permissions to role to access ECR: acc0154aa0
* Add permissions to the role to access relevant S3 bucket: 496b0422c3
## Reasoning for introducing a new `_linux-build-rg.yml`
Old style `runs-on` definition accept a string, new style `runs-on` requires a object in the format:
```
--- old
...
runs-on: "linux.2xlarge"
...
--- new
...
runs-on:
group: "running-group"
...
```
In other words, to specify a group the format of the yaml needs to be changed. Unfortunately, there is no way to accomplish this change using any trick in the book that I am aware of. This is due to the fact that GH actions yaml are not templatable and support minimal functions / replacements. A few examples that did not work:
* [`e234f25` (#119544 )](e234f25ba1 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`087de4a` (#119544 )](087de4ad8b (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`f03512e` (#119544 )](f03512e344 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`67581fb` (#119544 )](67581fb737 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
Pull Request resolved: https://github.com/pytorch/pytorch/pull/121930
Approved by: https://github.com/seemethere
2024-03-20 19:06:10 +00:00
PyTorch MergeBot
ceb1910bad
Revert "[BE] Enables support for pytorch ci build in ARC + introduces _linux-build-rg.yml. ( #121930 )"
...
This reverts commit 11b36e163d .
Reverted https://github.com/pytorch/pytorch/pull/121930 on behalf of https://github.com/huydhn due to New action is breaking current ci in not rebased PRs ([comment](https://github.com/pytorch/pytorch/pull/121930#issuecomment-2004393980 ))
2024-03-18 16:33:23 +00:00
Jean Schmidt
11b36e163d
[BE] Enables support for pytorch ci build in ARC + introduces _linux-build-rg.yml. ( #121930 )
...
Introduce changes related to enable ARC to run on build for linux-jammy-py3.8-gcc11
Depends on:
* https://github.com/pytorch/pytorch/pull/121908
* https://github.com/pytorch/pytorch/pull/121907
* Force docker to update credentials: https://github.com/pytorch/test-infra/pull/4991
* Add permissions to role to access ECR: acc0154aa0
* Add permissions to the role to access relevant S3 bucket: 496b0422c3
## Reasoning for introducing a new `_linux-build-rg.yml`
Old style `runs-on` definition accept a string, new style `runs-on` requires a object in the format:
```
--- old
...
runs-on: "linux.2xlarge"
...
--- new
...
runs-on:
group: "running-group"
...
```
In other words, to specify a group the format of the yaml needs to be changed. Unfortunately, there is no way to accomplish this change using any trick in the book that I am aware of. This is due to the fact that GH actions yaml are not templatable and support minimal functions / replacements. A few examples that did not work:
* [`e234f25` (#119544 )](e234f25ba1 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`087de4a` (#119544 )](087de4ad8b (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`f03512e` (#119544 )](f03512e344 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`67581fb` (#119544 )](67581fb737 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
Pull Request resolved: https://github.com/pytorch/pytorch/pull/121930
Approved by: https://github.com/seemethere
2024-03-18 15:40:43 +00:00
PyTorch MergeBot
b717aa6f36
Revert "[BE] Enables support for pytorch ci build in ARC + introduces _linux-build-rg.yml. ( #121930 )"
...
This reverts commit 2c33e3a372 .
Reverted https://github.com/pytorch/pytorch/pull/121930 on behalf of https://github.com/huydhn due to I am seeing lots of inductor jobs failing after this change 2c33e3a372 . They looks unrelated though but this change updates Docker image so may be something sneaks in. I will try to revert this to see if it helps and will reland the change after ([comment](https://github.com/pytorch/pytorch/pull/121930#issuecomment-2000547641 ))
2024-03-15 22:05:21 +00:00
Jean Schmidt
2c33e3a372
[BE] Enables support for pytorch ci build in ARC + introduces _linux-build-rg.yml. ( #121930 )
...
Introduce changes related to enable ARC to run on build for linux-jammy-py3.8-gcc11
Depends on:
* https://github.com/pytorch/pytorch/pull/121908
* https://github.com/pytorch/pytorch/pull/121907
* Force docker to update credentials: https://github.com/pytorch/test-infra/pull/4991
* Add permissions to role to access ECR: acc0154aa0
* Add permissions to the role to access relevant S3 bucket: 496b0422c3
## Reasoning for introducing a new `_linux-build-rg.yml`
Old style `runs-on` definition accept a string, new style `runs-on` requires a object in the format:
```
--- old
...
runs-on: "linux.2xlarge"
...
--- new
...
runs-on:
group: "running-group"
...
```
In other words, to specify a group the format of the yaml needs to be changed. Unfortunately, there is no way to accomplish this change using any trick in the book that I am aware of. This is due to the fact that GH actions yaml are not templatable and support minimal functions / replacements. A few examples that did not work:
* [`e234f25` (#119544 )](e234f25ba1 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`087de4a` (#119544 )](087de4ad8b (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`f03512e` (#119544 )](f03512e344 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
* [`67581fb` (#119544 )](67581fb737 (diff-b317d4da565a9e329ccf67e669c2ff1f4d4bc5fb0ffa4d74132545ad66f84339R76) )
Pull Request resolved: https://github.com/pytorch/pytorch/pull/121930
Approved by: https://github.com/seemethere
2024-03-15 20:09:50 +00:00
Aaron Gokaslan
6d725e7d66
[BE]: enable ruff rules PLR1722 and PLW3301 ( #109461 )
...
Enables two ruff rules derived from pylint:
* PLR1722 replaces any exit() calls with sys.exit(). exit() is only designed to be used in repl contexts as may not always be imported by default. This always use the version in the sys module which is better
* PLW3301 replaces nested min / max calls with simplified versions (ie. `min(a, min(b, c))` => `min(a, b. c)`). The new version is more idiomatic and more efficient.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109461
Approved by: https://github.com/ezyang
2023-09-18 02:07:21 +00:00
Aaron Gokaslan
9171f7d4cd
[BE] Modernize PyTorch even more for 3.8 with pyupgrade ( #94520 )
...
Applies some more pyupgrade fixits to PyTorch
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94520
Approved by: https://github.com/ezyang
2023-02-10 18:02:50 +00:00
Huy Do
ef035d083e
Add ufmt to unify black and usort ( #81157 )
...
This reworks [80257](https://github.com/pytorch/pytorch/pull/80257 ) a bit to use ufmt:
* ufmt https://ufmt.omnilib.dev/en/stable/ unifies both black and usort to automatically format the file in the "most Pythonic" way
* Also make a demo run for all files in `tools/linter/**/*.py`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81157
Approved by: https://github.com/suo
2022-07-11 19:20:22 +00:00
Michael Suo
3f56a1b8c0
[lint] fix actionlint linter ( #81119 )
...
There seems to be a bug in actionlint when running it on multiple files
(reported here: https://github.com/rhysd/actionlint/issues/173 ). This
was causing CI to be green even though there are local linter failures.
This PR:
1. Changes our usage of actionlint to work around the aforementioned
bug.
2. Fixes the linter failures introduced
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81119
Approved by: https://github.com/malfet
2022-07-08 23:57:25 +00:00
Edward Z. Yang
a11c1bbdd0
Run Black on all of tools/
...
Signed-off-by: Edward Z. Yang <ezyangfb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76089
Approved by: https://github.com/albanD
2022-04-20 17:29:41 +00:00
Michael Suo
356f1478d8
[lint] add actionlint to lintrunner
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75857
Approved by: https://github.com/malfet
2022-04-15 04:03:54 +00:00