16 Commits

Author SHA1 Message Date
a029675f6f More ruff SIM fixes (#164695)
This PR applies ruff `SIM` rules to more files. Most changes are about simplifying `dict.get` because `None` is already the default value.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164695
Approved by: https://github.com/ezyang
2025-10-09 03:24:50 +00:00
63360e64da [BE][Easy] do not install yanked types-pkg-resources in lint environment (#156462)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/156462
Approved by: https://github.com/ezyang
2025-06-20 16:00:43 +00:00
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
a32ce5ce34 Revert "[BE][Easy] enable postponed annotations in tools (#129375)"
This reverts commit 59eb2897f1745f513edb6c63065ffad481c4c8d0.

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
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
13664bb535 Revert "add oncall info individual info to failing alert job alert (#103915)"
This reverts commit 1b0d23708b74e7538242be2793d1046cdd3a3a0b.

Reverted https://github.com/pytorch/pytorch/pull/103915 on behalf of https://github.com/malfet due to Broke trunk with no module named tools, see https://github.com/pytorch/pytorch/actions/runs/5338343319/jobs/9675586967 ([comment](https://github.com/pytorch/pytorch/pull/103915#issuecomment-1601802715))
2023-06-21 23:06:45 +00:00
1b0d23708b add oncall info individual info to failing alert job alert (#103915)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103915
Approved by: https://github.com/huydhn
2023-06-21 19:25:39 +00:00
c9256ac609 add branch and sha info to alerting schema (#103631)
https://github.com/pytorch/pytorch/pull/103897 is used for testing
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103631
Approved by: https://github.com/huydhn
2023-06-20 22:58:37 +00:00
8c584028a7 add github action to upload alerts to rockset / aws (#102995)
Successful test run found at Test run found at https://github.com/pytorch/pytorch/actions/runs/5213244046/jobs/9410138550

<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8d7d860</samp>

This pull request adds a new feature to create and upload alerts for failing jobs in the pytorch/pytorch repo. It introduces a new script `tools/alerts/create_alerts.py` to generate alert entries and a new workflow `.github/workflows/upload-alerts.yml` to run the script and upload the alerts periodically.
<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at 8d7d860</samp>

> _To upload alerts to Rockset_
> _We added a workflow, you bet_
> _It runs every ten_
> _With concurrency then_
> _And `create_alerts.py` we edit_
Pull Request resolved: https://github.com/pytorch/pytorch/pull/102995
Approved by: https://github.com/huydhn, https://github.com/ZainRizvi
2023-06-09 01:33:40 +00:00
580958a338 Revert "add github action to upload alerts to rockset / aws (#102995)"
This reverts commit 49450fe021cc5d439f56580463461ff438f9ac96.

Reverted https://github.com/pytorch/pytorch/pull/102995 on behalf of https://github.com/PaliC due to failing with no credentials error ([comment](https://github.com/pytorch/pytorch/pull/102995#issuecomment-1582466491))
2023-06-08 12:09:52 +00:00
49450fe021 add github action to upload alerts to rockset / aws (#102995)
Successful test run found at Test run found at https://github.com/pytorch/pytorch/actions/runs/5179855118/jobs/9333292038 (uses equivalent PRs)

<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8d7d860</samp>

This pull request adds a new feature to create and upload alerts for failing jobs in the pytorch/pytorch repo. It introduces a new script `tools/alerts/create_alerts.py` to generate alert entries and a new workflow `.github/workflows/upload-alerts.yml` to run the script and upload the alerts periodically.
<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at 8d7d860</samp>

> _To upload alerts to Rockset_
> _We added a workflow, you bet_
> _It runs every ten_
> _With concurrency then_
> _And `create_alerts.py` we edit_
Pull Request resolved: https://github.com/pytorch/pytorch/pull/102995
Approved by: https://github.com/huydhn, https://github.com/ZainRizvi
2023-06-08 06:57:05 +00:00
fdd6375a80 Revert "fix alert upload action (#102840)"
This reverts commit 7af47f139d06e365f0ef6bad0382c16c29a0e5bb.

Reverted https://github.com/pytorch/pytorch/pull/102840 on behalf of https://github.com/PaliC due to does not actually work e2e ([comment](https://github.com/pytorch/pytorch/pull/102840#issuecomment-1574137743))
2023-06-02 18:24:29 +00:00
7af47f139d fix alert upload action (#102840)
<!--
copilot:all
-->

Test run found at https://github.com/pytorch/pytorch/actions/runs/5156296463/jobs/9287113913

### <samp>🤖 Generated by Copilot at a08e8ec</samp>

### Summary
🛠️🚀🐛

<!--
1.  🛠️ for improving and fixing the workflow
2.  🚀 for speeding up the checkout step by fetching only the latest commit
3.  🐛 for correcting the syntax error in the run command
-->
Improve and fix the workflow for uploading alerts to the dashboard. Optimize the checkout step and fix the `run` command in `.github/workflows/upload_alerts.yml`.

> _To upload alerts to the dashboard_
> _The workflow needed a quick fix_
> _It fetched only one commit_
> _And ran the script with the right syntax_
> _Now it works as smooth as a fish_

### Walkthrough
* Fix syntax error in `run` command that invokes `create_alerts.py` script ([link](https://github.com/pytorch/pytorch/pull/102840/files?diff=unified&w=0#diff-946b3ad914f86182b35d4b6db415ddc39393c3017ef8fdaeee2b0e866ea831d6L23-R25))
* Add `with` option to `actions/checkout@v2` step to specify `fetch-depth: 1` and improve workflow performance ([link](https://github.com/pytorch/pytorch/pull/102840/files?diff=unified&w=0#diff-946b3ad914f86182b35d4b6db415ddc39393c3017ef8fdaeee2b0e866ea831d6R15-R16))

Pull Request resolved: https://github.com/pytorch/pytorch/pull/102840
Approved by: https://github.com/malfet
2023-06-02 17:49:00 +00:00
8a52b5440e Revert "upload alerts to rockset/aws through github workflow (#102646)"
This reverts commit ddd741f38520804db5559b08b31ef0742457ce0f.

Reverted https://github.com/pytorch/pytorch/pull/102646 on behalf of https://github.com/malfet due to It did not work, how was it tested, see ddd741f385 ([comment](https://github.com/pytorch/pytorch/pull/102646#issuecomment-1573862275))
2023-06-02 14:52:26 +00:00
ddd741f385 upload alerts to rockset/aws through github workflow (#102646)
<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at 943f854</samp>

### Summary
:clock15:⬆️☁️

<!--
1.  :clock15: - This emoji represents the 15-minute interval of the cron schedule, and also suggests the idea of time-based triggers or events.
2.  ⬆️ - This emoji represents the upload action of the workflow, and also suggests the idea of moving data from one place to another.
3.  ☁️ - This emoji represents the AWS/Rockset destination of the alerts, and also suggests the idea of cloud-based services or platforms.
-->
Add a new workflow to upload alerts to a database. The workflow `.github/workflows/upload_alerts.yml` runs periodically on a cron schedule and uses AWS/Rockset as the backend.

> _`workflow` file added_
> _upload alerts to the cloud_
> _every quarter hour_

### Walkthrough
* Add a new workflow to upload alerts to AWS/Rockset every 15 minutes ([link](https://github.com/pytorch/pytorch/pull/102646/files?diff=unified&w=0#diff-946b3ad914f86182b35d4b6db415ddc39393c3017ef8fdaeee2b0e866ea831d6R1-R46))

Pull Request resolved: https://github.com/pytorch/pytorch/pull/102646
Approved by: https://github.com/huydhn
2023-06-02 02:24:19 +00:00
693114c0a2 Adds script to generate alerts for failing jobs (#102002)
Copies over bits of the script from test-infra to grab the relevant parts an alert and turns them into a json. Generally copied over from check_alerts in pytorch/test-infra

<!--
copilot:poem
-->
### <samp>🤖 Generated by Copilot at 1789c36</samp>

> _`Python 3` shebang_
> _added for compatibility_
> _a good practice / spring_

Pull Request resolved: https://github.com/pytorch/pytorch/pull/102002
Approved by: https://github.com/huydhn, https://github.com/ZainRizvi
2023-05-31 23:20:31 +00:00