Skip to content

Commit c6ba487

Browse files
authored
Merge branch 'main' into sdym/autocast
2 parents 72cf9b0 + 867521e commit c6ba487

File tree

7 files changed

+40
-4
lines changed

7 files changed

+40
-4
lines changed

.github/workflows/build-cmake.yml

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ jobs:
2121
gpu-arch-version: "11.8"
2222
fail-fast: false
2323
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
24+
permissions:
25+
id-token: write
26+
contents: read
2427
with:
2528
repository: pytorch/vision
2629
runner: ${{ matrix.runner }}

.github/workflows/docs.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
jobs:
1616
build:
1717
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
18+
permissions:
19+
id-token: write
20+
contents: read
1821
with:
1922
repository: pytorch/vision
2023
upload-artifact: docs
@@ -79,9 +82,10 @@ jobs:
7982
needs: build
8083
if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
8184
((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
85+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
8286
permissions:
87+
id-token: write
8388
contents: write
84-
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
8589
with:
8690
repository: pytorch/vision
8791
download-artifact: docs

.github/workflows/lint.yml

+9
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
jobs:
1313
python-source-and-configs:
1414
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
15+
permissions:
16+
id-token: write
17+
contents: read
1518
with:
1619
repository: pytorch/vision
1720
test-infra-ref: main
@@ -39,6 +42,9 @@ jobs:
3942
4043
c-source:
4144
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
45+
permissions:
46+
id-token: write
47+
contents: read
4248
with:
4349
repository: pytorch/vision
4450
test-infra-ref: main
@@ -66,6 +72,9 @@ jobs:
6672
6773
python-types:
6874
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
75+
permissions:
76+
id-token: write
77+
contents: read
6978
with:
7079
repository: pytorch/vision
7180
test-infra-ref: main

.github/workflows/prototype-tests-linux-gpu.yml

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
gpu-arch-version: "11.8"
2525
fail-fast: false
2626
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
27+
permissions:
28+
id-token: write
29+
contents: read
2730
with:
2831
repository: pytorch/vision
2932
runner: ${{ matrix.runner }}

.github/workflows/tests.yml

+12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
gpu-arch-version: "11.8"
2828
fail-fast: false
2929
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
30+
permissions:
31+
id-token: write
32+
contents: read
3033
with:
3134
repository: pytorch/vision
3235
runner: ${{ matrix.runner }}
@@ -85,6 +88,9 @@ jobs:
8588
gpu-arch-version: "11.8"
8689
fail-fast: false
8790
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
91+
permissions:
92+
id-token: write
93+
contents: read
8894
with:
8995
repository: pytorch/vision
9096
runner: ${{ matrix.runner }}
@@ -105,6 +111,9 @@ jobs:
105111
106112
onnx:
107113
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
114+
permissions:
115+
id-token: write
116+
contents: read
108117
with:
109118
repository: pytorch/vision
110119
test-infra-ref: main
@@ -136,6 +145,9 @@ jobs:
136145
137146
unittests-extended:
138147
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
148+
permissions:
149+
id-token: write
150+
contents: read
139151
if: contains(github.event.pull_request.labels.*.name, 'run-extended')
140152
with:
141153
repository: pytorch/vision

docs/source/models.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ Most pre-trained models can be accessed directly via PyTorch Hub without having
172172
model = torch.hub.load("pytorch/vision", "resnet50", weights="IMAGENET1K_V2")
173173
174174
# Option 2: passing weights param as enum
175-
weights = torch.hub.load("pytorch/vision", "get_weight", weights="ResNet50_Weights.IMAGENET1K_V2")
175+
weights = torch.hub.load(
176+
"pytorch/vision",
177+
"get_weight",
178+
weights="ResNet50_Weights.IMAGENET1K_V2",
179+
)
176180
model = torch.hub.load("pytorch/vision", "resnet50", weights=weights)
177181
178182
You can also retrieve all the available weights of a specific model via PyTorch Hub by doing:

test/smoke_test.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import sys
5+
import sysconfig
56
from pathlib import Path
67

78
import torch
@@ -134,8 +135,8 @@ def main() -> None:
134135
smoke_test_torchvision_decode_jpeg("cuda")
135136
smoke_test_torchvision_resnet50_classify("cuda")
136137

137-
# TODO: remove once pytorch/pytorch#110436 is resolved
138-
if sys.version_info < (3, 12, 0):
138+
# torch.compile is not supported on Python 3.14+ and Python built with GIL disabled
139+
if sys.version_info < (3, 14, 0) and not sysconfig.get_config_var("Py_GIL_DISABLED"):
139140
smoke_test_compile()
140141

141142
if torch.backends.mps.is_available():

0 commit comments

Comments
 (0)