bf7e290854
Add __main__ guards to jit tests ( #154725 )
...
This PR is part of a series attempting to re-submit https://github.com/pytorch/pytorch/pull/134592 as smaller PRs.
In jit tests:
- Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run.
- Raise a RuntimeError on tests which have been disabled (not run)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/154725
Approved by: https://github.com/clee2000
2025-06-16 10:28:45 +00:00
20912673a6
Revert "Add __main__ guards to jit tests ( #154725 )"
...
This reverts commit 1a55fb0ee87eaa8b376aaa82d95d213fe0fbe64b.
Reverted https://github.com/pytorch/pytorch/pull/154725 on behalf of https://github.com/malfet due to This added 2nd copy of raise_on_run to common_utils.py which caused lint failures, see https://github.com/pytorch/pytorch/actions/runs/15445374980/job/43473457466 ([comment](https://github.com/pytorch/pytorch/pull/154725#issuecomment-2940503905 ))
2025-06-04 15:42:52 +00:00
1a55fb0ee8
Add __main__ guards to jit tests ( #154725 )
...
This PR is part of a series attempting to re-submit https://github.com/pytorch/pytorch/pull/134592 as smaller PRs.
In jit tests:
- Add and use a common raise_on_run_directly method for when a user runs a test file directly which should not be run this way. Print the file which the user should have run.
- Raise a RuntimeError on tests which have been disabled (not run)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/154725
Approved by: https://github.com/Skylion007
2025-06-04 14:44:08 +00:00
6ff1e43a41
[BE][Easy][13/19] enforce style for empty lines in import segments in test/j*/ ( #129764 )
...
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/129764
Approved by: https://github.com/ezyang
2024-08-01 12:13:42 +00:00
604c9c5601
Enable UFMT on all of test/jit ( #123623 )
...
Partially addresses #123062
Ran lintrunner on:
- `test/jit`
with command:
```bash
lintrunner -a --take UFMT --all-files
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/123623
Approved by: https://github.com/ezyang
2024-04-11 23:45:05 +00:00
fdd12a9f4c
Support tensor.__getitem__() in TorchScript compilation ( #73952 )
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/73952
Reviewed By: tugsbayasgalan
Differential Revision: D34743346
Pulled By: gmagogsfm
fbshipit-source-id: 2273c289c2224166cb1eed10a138d4ac7043ed83
(cherry picked from commit 37aefb9a95e0df4586bb623a1aaa974fbe799687)
2022-03-11 01:45:18 +00:00