From dd8c5f6654811c0778d5a0f9ba6fc7203dd2f861 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Tue, 29 Oct 2024 18:33:54 -0400 Subject: [PATCH] Add python3.13 to package classifiers and test matrix --- .github/workflows/ci.yaml | 4 +- docs/yaml.md | 2 +- pkg/config/config.go | 2 +- pkg/config/config_test.go | 2 +- pkg/config/cuda_base_images.json | 24 +- pkg/config/tf_compatibility_matrix.json | 13 + pkg/config/torch_compatibility_matrix.json | 352 +++++++++++++-------- pyproject.toml | 1 + tools/compatgen/internal/torch.go | 2 +- tox.ini | 8 +- 10 files changed, 263 insertions(+), 147 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ac8f32c19d..813bb80836 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,7 +48,7 @@ jobs: go-version-file: go.mod - uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: "3.13" - uses: hynek/setup-cached-uv@v2 - name: Prepare tox run: uv pip install --system tox tox-uv @@ -143,7 +143,7 @@ jobs: go-version-file: go.mod - uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: "3.13" - uses: hynek/setup-cached-uv@v2 - name: Prepare tox run: uv pip install --system tox tox-uv diff --git a/docs/yaml.md b/docs/yaml.md index 42181a0848..399cd0e2fb 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.13 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/config.go b/pkg/config/config.go index 4a282deebd..3495d145d0 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -74,7 +74,7 @@ func DefaultConfig() *Config { return &Config{ Build: &Build{ GPU: false, - PythonVersion: "3.12", + PythonVersion: "3.13", }, } } diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index d0ec825ab8..4884ab0de8 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -19,7 +19,7 @@ func TestValidateModelPythonVersion(t *testing.T) { }{ { name: "ValidVersion", - input: "3.12", + input: "3.13", expectedErr: false, }, { diff --git a/pkg/config/cuda_base_images.json b/pkg/config/cuda_base_images.json index e08d09060e..dcc8c81ec3 100644 --- a/pkg/config/cuda_base_images.json +++ b/pkg/config/cuda_base_images.json @@ -2,77 +2,77 @@ { "Tag": "12.6.2-cudnn-devel-ubuntu24.04", "CUDA": "12.6.2", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "24.04" }, { "Tag": "12.6.2-cudnn-devel-ubuntu22.04", "CUDA": "12.6.2", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "22.04" }, { "Tag": "12.6.2-cudnn-devel-ubuntu20.04", "CUDA": "12.6.2", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "20.04" }, { "Tag": "12.6.1-cudnn-devel-ubuntu24.04", "CUDA": "12.6.1", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "24.04" }, { "Tag": "12.6.1-cudnn-devel-ubuntu22.04", "CUDA": "12.6.1", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "22.04" }, { "Tag": "12.6.1-cudnn-devel-ubuntu20.04", "CUDA": "12.6.1", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "20.04" }, { "Tag": "12.6.0-cudnn-devel-ubuntu24.04", "CUDA": "12.6.0", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "24.04" }, { "Tag": "12.6.0-cudnn-devel-ubuntu22.04", "CUDA": "12.6.0", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "22.04" }, { "Tag": "12.6.0-cudnn-devel-ubuntu20.04", "CUDA": "12.6.0", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "20.04" }, { "Tag": "12.5.1-cudnn-devel-ubuntu22.04", "CUDA": "12.5.1", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "22.04" }, { "Tag": "12.5.1-cudnn-devel-ubuntu20.04", "CUDA": "12.5.1", - "CuDNN": "", + "CuDNN": "9", "IsDevel": true, "Ubuntu": "20.04" }, @@ -363,4 +363,4 @@ "IsDevel": true, "Ubuntu": "16.04" } -] \ No newline at end of file +] diff --git a/pkg/config/tf_compatibility_matrix.json b/pkg/config/tf_compatibility_matrix.json index 761a959d4a..fc5b2c187b 100644 --- a/pkg/config/tf_compatibility_matrix.json +++ b/pkg/config/tf_compatibility_matrix.json @@ -1,4 +1,17 @@ [ + { + "TF": "2.18.0", + "TFCPUPackage": "tensorflow==2.18.0", + "TFGPUPackage": "tensorflow==2.18.0", + "CUDA": "12.5", + "CuDNN": "9.3", + "Pythons": [ + "3.9", + "3.10", + "3.11", + "3.12" + ] + }, { "TF": "2.17.0", "TFCPUPackage": "tensorflow==2.17.0", diff --git a/pkg/config/torch_compatibility_matrix.json b/pkg/config/torch_compatibility_matrix.json index b9db732f5a..d10c1da4d8 100644 --- a/pkg/config/torch_compatibility_matrix.json +++ b/pkg/config/torch_compatibility_matrix.json @@ -1,26 +1,27 @@ [ { - "Torch": "2.5.0+cpu", - "Torchvision": "0.20.0", - "Torchaudio": "2.5.0", + "Torch": "2.5.1+cu121", + "Torchvision": "0.20.1", + "Torchaudio": "2.5.1", "FindLinks": "", - "ExtraIndexURL": "https://download.pytorch.org/whl/cpu", - "CUDA": null, + "ExtraIndexURL": "https://download.pytorch.org/whl/cu121", + "CUDA": "12.1", "Pythons": [ "3.10", "3.11", "3.12", "3.13", - "3.9" + "3.9", + "3.10" ] }, { - "Torch": "2.5.0+cu118", - "Torchvision": "0.20.0", - "Torchaudio": "2.5.0", + "Torch": "2.5.1+cu124", + "Torchvision": "0.20.1", + "Torchaudio": "2.5.1", "FindLinks": "", - "ExtraIndexURL": "https://download.pytorch.org/whl/cu118", - "CUDA": "11.8", + "ExtraIndexURL": "https://download.pytorch.org/whl/cu124", + "CUDA": "12.4", "Pythons": [ "3.10", "3.11", @@ -30,28 +31,27 @@ ] }, { - "Torch": "2.5.0+cu121", - "Torchvision": "0.20.0", - "Torchaudio": "2.5.0", + "Torch": "2.5.1+cpu", + "Torchvision": "0.20.1", + "Torchaudio": "2.5.1", "FindLinks": "", - "ExtraIndexURL": "https://download.pytorch.org/whl/cu121", - "CUDA": "12.1", + "ExtraIndexURL": "https://download.pytorch.org/whl/cpu", + "CUDA": null, "Pythons": [ "3.10", "3.11", "3.12", "3.13", - "3.9", - "3.10" + "3.9" ] }, { - "Torch": "2.5.0+cu124", - "Torchvision": "0.20.0", - "Torchaudio": "2.5.0", + "Torch": "2.5.1+cu118", + "Torchvision": "0.20.1", + "Torchaudio": "2.5.1", "FindLinks": "", - "ExtraIndexURL": "https://download.pytorch.org/whl/cu124", - "CUDA": "12.4", + "ExtraIndexURL": "https://download.pytorch.org/whl/cu118", + "CUDA": "11.8", "Pythons": [ "3.10", "3.11", @@ -72,7 +72,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -87,7 +88,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -102,7 +104,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -117,7 +120,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -132,7 +136,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -147,7 +152,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -162,7 +168,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -177,7 +184,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -192,7 +200,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -207,7 +216,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -222,7 +232,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -237,7 +248,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -252,7 +264,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -267,7 +280,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -282,7 +296,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -297,7 +312,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -312,7 +328,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -327,7 +344,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -342,7 +360,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -357,7 +376,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -372,7 +392,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -387,7 +408,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -402,7 +424,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -417,7 +440,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -432,7 +456,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -447,7 +472,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -462,7 +488,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -477,7 +504,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -492,7 +520,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -507,7 +536,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -522,7 +552,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -537,7 +568,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -552,7 +584,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -567,7 +600,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -582,7 +616,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -597,7 +632,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -612,7 +648,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -627,7 +664,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -642,7 +680,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -657,7 +696,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -672,7 +712,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -687,7 +728,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -702,7 +744,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -717,7 +760,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -732,7 +776,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -747,7 +792,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -762,7 +808,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -777,7 +824,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -792,7 +840,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -807,7 +856,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -822,7 +872,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -837,7 +888,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -852,7 +904,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -867,7 +920,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -882,7 +936,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -897,7 +952,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -912,7 +968,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -927,7 +984,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -942,7 +1000,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -957,7 +1016,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -972,7 +1032,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -987,7 +1048,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1002,7 +1064,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1017,7 +1080,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1032,7 +1096,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1047,7 +1112,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1062,7 +1128,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1077,7 +1144,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1092,7 +1160,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1107,7 +1176,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1122,7 +1192,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1137,7 +1208,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1152,7 +1224,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1167,7 +1240,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1182,7 +1256,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1197,7 +1272,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1212,7 +1288,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1227,7 +1304,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1242,7 +1320,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1257,7 +1336,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1272,7 +1352,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1287,7 +1368,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1302,7 +1384,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1317,7 +1400,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1332,7 +1416,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1347,7 +1432,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1362,7 +1448,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1377,7 +1464,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1392,7 +1480,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1407,7 +1496,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1422,7 +1512,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1437,7 +1528,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1452,7 +1544,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1467,7 +1560,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1482,7 +1576,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1497,7 +1592,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1512,7 +1608,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1527,7 +1624,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1542,7 +1640,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1557,7 +1656,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1572,7 +1672,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] }, { @@ -1587,7 +1688,8 @@ "3.9", "3.10", "3.11", - "3.12" + "3.12", + "3.13" ] } ] \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cfe833b8ac..270ec055c1 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, diff --git a/tox.ini b/tox.ini index 19b8a5d8fa..1fd4c05fa2 100644 --- a/tox.ini +++ b/tox.ini @@ -32,7 +32,7 @@ commands = tests: pytest python/tests --cov={env_site_packages_dir}/cog --cov-report term-missing:skip-covered {posargs:-n auto -vv} [testenv:lint] -base_python = python3.12 +base_python = python3.13 skip_install = true deps = ruff commands = @@ -40,7 +40,7 @@ commands = ruff format --check python [testenv:typecheck-pydantic1] -base_python = python3.12 +base_python = python3.13 deps = pyright==1.1.375 pydantic>=1,<2 @@ -54,14 +54,14 @@ allowlist_externals = sed [testenv:typecheck-pydantic2] -base_python = python3.12 +base_python = python3.13 deps = pyright==1.1.375 pydantic>=2,<3 commands = pyright {posargs} [testenv:integration] -base_python = python3.12 +base_python = python3.13 changedir = test-integration skip_install = true deps =