From cb78a0f0d6c3aabbdb63b61fb1b899085e8fa4d9 Mon Sep 17 00:00:00 2001 From: F Date: Mon, 6 Jan 2025 19:09:56 +0000 Subject: [PATCH] Officially mark Cog as supporting Python 3.13 --- docs/yaml.md | 2 +- pkg/config/torch_compatibility_matrix.json | 33 +++++++++++----------- pyproject.toml | 1 + tools/compatgen/internal/torch.go | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/yaml.md b/docs/yaml.md index 42181a0848..2b4e67e69b 100644 --- a/docs/yaml.md +++ b/docs/yaml.md @@ -100,7 +100,7 @@ build: python_version: "3.11.1" ``` -Cog supports all active branches of Python: 3.8, 3.9, 3.10, 3.11, 3.12. If you don't define a version, Cog will use the latest version of Python 3.12 or a version of Python that is compatible with the versions of PyTorch or TensorFlow you specify. +Cog supports all active branches of Python: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13. If you don't define a version, Cog will use the latest version of Python 3.12 or a version of Python that is compatible with the versions of PyTorch or TensorFlow you specify. Note that these are the versions supported **in the Docker container**, not your host machine. You can run any version(s) of Python you wish on your host machine. diff --git a/pkg/config/torch_compatibility_matrix.json b/pkg/config/torch_compatibility_matrix.json index 1bde2a3424..e5db5b3fc9 100644 --- a/pkg/config/torch_compatibility_matrix.json +++ b/pkg/config/torch_compatibility_matrix.json @@ -7,10 +7,10 @@ "ExtraIndexURL": "https://download.pytorch.org/whl/cpu", "CUDA": null, "Pythons": [ + "3.9", "3.10", "3.11", - "3.12", - "3.9" + "3.12" ] }, { @@ -21,10 +21,10 @@ "ExtraIndexURL": "https://download.pytorch.org/whl/cu118", "CUDA": "11.8", "Pythons": [ + "3.9", "3.10", "3.11", - "3.12", - "3.9" + "3.12" ] }, { @@ -35,10 +35,10 @@ "ExtraIndexURL": "https://download.pytorch.org/whl/cu121", "CUDA": "12.1", "Pythons": [ + "3.9", "3.10", "3.11", - "3.12", - "3.9" + "3.12" ] }, { @@ -49,10 +49,10 @@ "ExtraIndexURL": "https://download.pytorch.org/whl/cu124", "CUDA": "12.4", "Pythons": [ + "3.9", "3.10", "3.11", - "3.12", - "3.9" + "3.12" ] }, { @@ -63,11 +63,11 @@ "ExtraIndexURL": "https://download.pytorch.org/whl/cpu", "CUDA": null, "Pythons": [ + "3.9", "3.10", "3.11", "3.12", - "3.13", - "3.9" + "3.13" ] }, { @@ -78,11 +78,11 @@ "ExtraIndexURL": "https://download.pytorch.org/whl/cu118", "CUDA": "11.8", "Pythons": [ + "3.9", "3.10", "3.11", "3.12", - "3.13", - "3.9" + "3.13" ] }, { @@ -93,12 +93,11 @@ "ExtraIndexURL": "https://download.pytorch.org/whl/cu121", "CUDA": "12.1", "Pythons": [ + "3.9", "3.10", "3.11", "3.12", - "3.13", - "3.9", - "3.10" + "3.13" ] }, { @@ -109,11 +108,11 @@ "ExtraIndexURL": "https://download.pytorch.org/whl/cu124", "CUDA": "12.4", "Pythons": [ + "3.9", "3.10", "3.11", "3.12", - "3.13", - "3.9" + "3.13" ] }, { diff --git a/pyproject.toml b/pyproject.toml index bc8a52715a..becf97a209 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] requires-python = ">=3.8" diff --git a/tools/compatgen/internal/torch.go b/tools/compatgen/internal/torch.go index 6f3c4c18c0..650fa1bb8e 100644 --- a/tools/compatgen/internal/torch.go +++ b/tools/compatgen/internal/torch.go @@ -209,7 +209,7 @@ func parseTorchInstallString(s string, defaultVersions map[string]string, cuda * torchaudio := libVersions["torchaudio"] // TODO: this could be determined from https://download.pytorch.org/whl/torch/ - pythons := []string{"3.8", "3.9", "3.10", "3.11", "3.12"} + pythons := []string{"3.8", "3.9", "3.10", "3.11", "3.12", "3.13"} return &config.TorchCompatibility{ Torch: torch,