File tree 7 files changed +40
-4
lines changed
7 files changed +40
-4
lines changed Original file line number Diff line number Diff line change 21
21
gpu-arch-version : " 11.8"
22
22
fail-fast : false
23
23
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
24
+ permissions :
25
+ id-token : write
26
+ contents : read
24
27
with :
25
28
repository : pytorch/vision
26
29
runner : ${{ matrix.runner }}
Original file line number Diff line number Diff line change 15
15
jobs :
16
16
build :
17
17
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
18
+ permissions :
19
+ id-token : write
20
+ contents : read
18
21
with :
19
22
repository : pytorch/vision
20
23
upload-artifact : docs
79
82
needs : build
80
83
if : github.repository == 'pytorch/vision' && github.event_name == 'push' &&
81
84
((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
85
+ uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
82
86
permissions :
87
+ id-token : write
83
88
contents : write
84
- uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
85
89
with :
86
90
repository : pytorch/vision
87
91
download-artifact : docs
Original file line number Diff line number Diff line change 12
12
jobs :
13
13
python-source-and-configs :
14
14
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
15
+ permissions :
16
+ id-token : write
17
+ contents : read
15
18
with :
16
19
repository : pytorch/vision
17
20
test-infra-ref : main
39
42
40
43
c-source :
41
44
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
45
+ permissions :
46
+ id-token : write
47
+ contents : read
42
48
with :
43
49
repository : pytorch/vision
44
50
test-infra-ref : main
66
72
67
73
python-types :
68
74
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
75
+ permissions :
76
+ id-token : write
77
+ contents : read
69
78
with :
70
79
repository : pytorch/vision
71
80
test-infra-ref : main
Original file line number Diff line number Diff line change 24
24
gpu-arch-version : " 11.8"
25
25
fail-fast : false
26
26
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
27
+ permissions :
28
+ id-token : write
29
+ contents : read
27
30
with :
28
31
repository : pytorch/vision
29
32
runner : ${{ matrix.runner }}
Original file line number Diff line number Diff line change 27
27
gpu-arch-version : " 11.8"
28
28
fail-fast : false
29
29
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
30
+ permissions :
31
+ id-token : write
32
+ contents : read
30
33
with :
31
34
repository : pytorch/vision
32
35
runner : ${{ matrix.runner }}
85
88
gpu-arch-version : " 11.8"
86
89
fail-fast : false
87
90
uses : pytorch/test-infra/.github/workflows/windows_job.yml@main
91
+ permissions :
92
+ id-token : write
93
+ contents : read
88
94
with :
89
95
repository : pytorch/vision
90
96
runner : ${{ matrix.runner }}
@@ -105,6 +111,9 @@ jobs:
105
111
106
112
onnx :
107
113
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
114
+ permissions :
115
+ id-token : write
116
+ contents : read
108
117
with :
109
118
repository : pytorch/vision
110
119
test-infra-ref : main
@@ -136,6 +145,9 @@ jobs:
136
145
137
146
unittests-extended :
138
147
uses : pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
148
+ permissions :
149
+ id-token : write
150
+ contents : read
139
151
if : contains(github.event.pull_request.labels.*.name, 'run-extended')
140
152
with :
141
153
repository : pytorch/vision
Original file line number Diff line number Diff line change @@ -172,7 +172,11 @@ Most pre-trained models can be accessed directly via PyTorch Hub without having
172
172
model = torch.hub.load(" pytorch/vision" , " resnet50" , weights = " IMAGENET1K_V2" )
173
173
174
174
# 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
+ )
176
180
model = torch.hub.load(" pytorch/vision" , " resnet50" , weights = weights)
177
181
178
182
You can also retrieve all the available weights of a specific model via PyTorch Hub by doing:
Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
import sys
5
+ import sysconfig
5
6
from pathlib import Path
6
7
7
8
import torch
@@ -134,8 +135,8 @@ def main() -> None:
134
135
smoke_test_torchvision_decode_jpeg ("cuda" )
135
136
smoke_test_torchvision_resnet50_classify ("cuda" )
136
137
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" ):
139
140
smoke_test_compile ()
140
141
141
142
if torch .backends .mps .is_available ():
You can’t perform that action at this time.
0 commit comments