Skip to content

Commit

Permalink
Merge branch 'main' into sdym/autocast
Browse files Browse the repository at this point in the history
  • Loading branch information
kit1980 authored Jan 24, 2025
2 parents 72cf9b0 + 867521e commit c6ba487
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
gpu-arch-version: "11.8"
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
runner: ${{ matrix.runner }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
jobs:
build:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
upload-artifact: docs
Expand Down Expand Up @@ -79,9 +82,10 @@ jobs:
needs: build
if: github.repository == 'pytorch/vision' && github.event_name == 'push' &&
((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag')
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: write
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
with:
repository: pytorch/vision
download-artifact: docs
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
jobs:
python-source-and-configs:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
test-infra-ref: main
Expand Down Expand Up @@ -39,6 +42,9 @@ jobs:
c-source:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
test-infra-ref: main
Expand Down Expand Up @@ -66,6 +72,9 @@ jobs:
python-types:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
test-infra-ref: main
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/prototype-tests-linux-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
gpu-arch-version: "11.8"
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
runner: ${{ matrix.runner }}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
gpu-arch-version: "11.8"
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
runner: ${{ matrix.runner }}
Expand Down Expand Up @@ -85,6 +88,9 @@ jobs:
gpu-arch-version: "11.8"
fail-fast: false
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
runner: ${{ matrix.runner }}
Expand All @@ -105,6 +111,9 @@ jobs:
onnx:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
repository: pytorch/vision
test-infra-ref: main
Expand Down Expand Up @@ -136,6 +145,9 @@ jobs:
unittests-extended:
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
if: contains(github.event.pull_request.labels.*.name, 'run-extended')
with:
repository: pytorch/vision
Expand Down
6 changes: 5 additions & 1 deletion docs/source/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ Most pre-trained models can be accessed directly via PyTorch Hub without having
model = torch.hub.load("pytorch/vision", "resnet50", weights="IMAGENET1K_V2")
# Option 2: passing weights param as enum
weights = torch.hub.load("pytorch/vision", "get_weight", weights="ResNet50_Weights.IMAGENET1K_V2")
weights = torch.hub.load(
"pytorch/vision",
"get_weight",
weights="ResNet50_Weights.IMAGENET1K_V2",
)
model = torch.hub.load("pytorch/vision", "resnet50", weights=weights)
You can also retrieve all the available weights of a specific model via PyTorch Hub by doing:
Expand Down
5 changes: 3 additions & 2 deletions test/smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import sys
import sysconfig
from pathlib import Path

import torch
Expand Down Expand Up @@ -134,8 +135,8 @@ def main() -> None:
smoke_test_torchvision_decode_jpeg("cuda")
smoke_test_torchvision_resnet50_classify("cuda")

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

if torch.backends.mps.is_available():
Expand Down

0 comments on commit c6ba487

Please sign in to comment.