From a06c3c6dddb9968bbbf77b6924c201cddef76de7 Mon Sep 17 00:00:00 2001 From: Nueramarcos Date: Thu, 18 Jun 2026 07:04:13 -0700 Subject: [PATCH 1/7] docs: add FORK.md and fork notice (Issue Agent) (#1) --- FORK.md | 14 ++++++++++++++ README.md | 6 ++++++ 2 files changed, 20 insertions(+) create mode 100644 FORK.md diff --git a/FORK.md b/FORK.md new file mode 100644 index 00000000000..618e9602c2e --- /dev/null +++ b/FORK.md @@ -0,0 +1,14 @@ +# Nueramarcos Fork of torchvision + +Personal fork of [pytorch/vision](https://github.com/pytorch/vision). + +## Install + +```bash +git clone https://github.com/Nueramarcos/vision.git +cd vision +pip install -e . +python -c "import torchvision; print(torchvision.__version__)" +``` + +Maintained by [Nueramarcos](https://github.com/Nueramarcos). diff --git a/README.md b/README.md index d861bca97cc..6ff4d26f86e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # torchvision +## Fork Notice + +Maintained by [Nueramarcos](https://github.com/Nueramarcos). See [FORK.md](FORK.md). + + + [![total torchvision downloads](https://pepy.tech/badge/torchvision)](https://pepy.tech/project/torchvision) [![documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchvision%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/vision/stable/index.html) From 3dae8c4859ba6575466a551e9369277513607995 Mon Sep 17 00:00:00 2001 From: Nueramarcos Date: Thu, 18 Jun 2026 07:31:04 -0700 Subject: [PATCH 2/7] Add fork notice to README (#3) * docs: Add fork notice to README Co-authored-by: aider (ollama/qwen2.5-coder:7b) * fix: correct typo in README.md Co-authored-by: aider (ollama/qwen2.5-coder:7b) * chore: sanitize artifacts for Add fork notice to README --------- Co-authored-by: aider (ollama/qwen2.5-coder:7b) --- .gitignore | 1 + README.md | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c2d4d2a1c42..e3ba2f35515 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ xcuserdata/ .envrc scripts/release_notes/data.json +.aider* diff --git a/README.md b/README.md index 6ff4d26f86e..1111438a857 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ Maintained by [Nueramarcos](https://github.com/Nueramarcos). See [FORK.md](FORK.md). - - [![total torchvision downloads](https://pepy.tech/badge/torchvision)](https://pepy.tech/project/torchvision) [![documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchvision%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/vision/stable/index.html) @@ -33,7 +31,6 @@ versions. | `2.9` | `0.24` | `>=3.10`, `<=3.14` | | `2.8` | `0.23` | `>=3.9`, `<=3.13` | | `2.7` | `0.22` | `>=3.9`, `<=3.13` | -| `2.6` | `0.21` | `>=3.9`, `<=3.12` |
older versions @@ -72,7 +69,7 @@ Torchvision currently supports the following image backends: - [Pillow](https://python-pillow.org/) - [Pillow-SIMD](https://github.com/uploadcare/pillow-simd) - a **much faster** drop-in replacement for Pillow with SIMD. -Read more in in our [docs](https://pytorch.org/vision/stable/transforms.html). +Read more in our [docs](https://pytorch.org/vision/stable/transforms.html). ## Documentation @@ -115,3 +112,4 @@ If you find TorchVision useful in your work, please consider citing the followin howpublished = {\url{https://github.com/pytorch/vision}} } ``` +``` \ No newline at end of file From 217a92faf40272888806882527ec2473ab504267 Mon Sep 17 00:00:00 2001 From: Nueramarcos Date: Thu, 18 Jun 2026 08:00:51 -0700 Subject: [PATCH 3/7] feat: Add fork smoke CI workflow for Python 3.12 (#4) Co-authored-by: aider (ollama/qwen2.5-coder:7b) --- .github/workflows/fork-smoke.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/fork-smoke.yml diff --git a/.github/workflows/fork-smoke.yml b/.github/workflows/fork-smoke.yml new file mode 100644 index 00000000000..cc1b438b33a --- /dev/null +++ b/.github/workflows/fork-smoke.yml @@ -0,0 +1,30 @@ +name: Fork Smoke Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + smoke-test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.12] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e . + - name: Run smoke test + run: | + python -c "import torchvision; print(torchvision.__version__)" From 3c9390f3e169083f3611ab4bbb24c2b78bba5f99 Mon Sep 17 00:00:00 2001 From: Nueramarcos Date: Thu, 18 Jun 2026 13:04:46 -0700 Subject: [PATCH 4/7] docs: Add README badges for license, language, and CI status (#5) Co-authored-by: aider (ollama/qwen2.5-coder:7b) --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1111438a857..e415f333143 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Maintained by [Nueramarcos](https://github.com/Nueramarcos). See [FORK.md](FORK.md). +[![License](https://img.shields.io/github/license/pytorch/vision)](https://github.com/pytorch/vision/blob/main/LICENSE) +[![Language](https://img.shields.io/github/languages/top/pytorch/vision?color=blue)](https://github.com/pytorch/vision/search?q=language:) +[![CI Status](https://img.shields.io/badge/ci-pending-brightgreen)](https://github.com/pytorch/vision/actions) + [![total torchvision downloads](https://pepy.tech/badge/torchvision)](https://pepy.tech/project/torchvision) [![documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchvision%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/vision/stable/index.html) From f32b6ac8274d26852d0fd7fd8808ca8606e1976e Mon Sep 17 00:00:00 2001 From: Nueramarcos Date: Thu, 18 Jun 2026 14:30:50 -0700 Subject: [PATCH 5/7] fix: add torch build artifacts and cache to .gitignore (#6) Co-authored-by: aider (ollama/qwen2.5-coder:7b) --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index e3ba2f35515..149c9358f68 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,6 @@ xcuserdata/ scripts/release_notes/data.json .aider* + +__pycache__/ +.pytest_cache/ From 98ab69adca5c76031eec5fb2605062e98d744ae1 Mon Sep 17 00:00:00 2001 From: Nueramarcos Date: Sat, 20 Jun 2026 07:00:14 -0700 Subject: [PATCH 6/7] docs: use fork-smoke CI badge in README (#7) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e415f333143..5be25012b0f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Maintained by [Nueramarcos](https://github.com/Nueramarcos). See [FORK.md](FORK. [![License](https://img.shields.io/github/license/pytorch/vision)](https://github.com/pytorch/vision/blob/main/LICENSE) [![Language](https://img.shields.io/github/languages/top/pytorch/vision?color=blue)](https://github.com/pytorch/vision/search?q=language:) -[![CI Status](https://img.shields.io/badge/ci-pending-brightgreen)](https://github.com/pytorch/vision/actions) +[![Fork Smoke](https://github.com/Nueramarcos/vision/actions/workflows/fork-smoke.yml/badge.svg)](https://github.com/Nueramarcos/vision/actions/workflows/fork-smoke.yml) [![total torchvision downloads](https://pepy.tech/badge/torchvision)](https://pepy.tech/project/torchvision) [![documentation](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Ftorchvision%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pytorch.org/vision/stable/index.html) From 6e28dda1e18e7ad2ddfb89002d617d53e14595c3 Mon Sep 17 00:00:00 2001 From: Nueramarcos Date: Wed, 24 Jun 2026 17:05:41 -0700 Subject: [PATCH 7/7] fix(datasets): SUN397 mirror fallbacks and clearer download errors Princeton's HTTP mirror now 404s after redirects. Try HTTPS then HTTP, and raise a actionable RuntimeError pointing to #9348 and dataset-mirror discussion when all mirrors fail. Fixes #9348 --- torchvision/datasets/sun397.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/torchvision/datasets/sun397.py b/torchvision/datasets/sun397.py index a27f86d9579..a49ce3dd877 100644 --- a/torchvision/datasets/sun397.py +++ b/torchvision/datasets/sun397.py @@ -1,5 +1,6 @@ from pathlib import Path from typing import Any, Callable, Optional, Union +from urllib.error import URLError from .folder import default_loader @@ -26,8 +27,11 @@ class SUN397(VisionDataset): ``torchvision.io.decode_image`` for decoding image data into tensors directly. """ - _DATASET_URL = "http://vision.princeton.edu/projects/2010/SUN/SUN397.tar.gz" _DATASET_MD5 = "8ca2778205c41d23104230ba66911c7a" + _DATASET_MIRRORS = ( + "https://vision.princeton.edu/projects/2010/SUN/SUN397.tar.gz", + "http://vision.princeton.edu/projects/2010/SUN/SUN397.tar.gz", + ) def __init__( self, @@ -78,4 +82,22 @@ def _check_exists(self) -> bool: def _download(self) -> None: if self._check_exists(): return - download_and_extract_archive(self._DATASET_URL, download_root=self.root, md5=self._DATASET_MD5) + + errors: list[BaseException] = [] + for url in self._DATASET_MIRRORS: + try: + download_and_extract_archive(url, download_root=self.root, md5=self._DATASET_MD5) + return + except (RuntimeError, URLError) as err: + errors.append(err) + + msg = "Error downloading SUN397:\n" + for url, err in zip(self._DATASET_MIRRORS, errors): + msg += f"Tried {url}, got:\n{err}\n" + msg += ( + "The Princeton and MIT mirrors for SUN397 are currently unavailable. " + "Download the archive manually and extract it under /SUN397/. " + "See https://github.com/pytorch/vision/issues/9348 and " + "https://github.com/pytorch/vision/issues/7637 (dataset mirroring)." + ) + raise RuntimeError(msg)