From 02a4198aedaf4e4bf14abe8f5899cc682a1d2538 Mon Sep 17 00:00:00 2001 From: Thomas Hansen Date: Wed, 27 Nov 2024 14:33:30 -0600 Subject: [PATCH 1/7] update packages and actions to allow and test python 3.13 --- .github/workflows/docs.yml | 2 +- .github/workflows/hosted_inference_e2e_test_production.yml | 4 ++-- .github/workflows/hosted_inference_e2e_test_staging.yml | 4 ++-- .github/workflows/integration_tests_inference_cli_x86.yml | 2 +- .github/workflows/integration_tests_inference_models.yml | 2 +- .github/workflows/integration_tests_workflows_x86.yml | 2 +- .github/workflows/load_test_hosted_inference.yml | 4 ++-- .github/workflows/publish.pypi.yml | 2 +- .github/workflows/test_package_install_inference.yml | 4 ++-- .github/workflows/test_package_install_inference_cli.yml | 4 ++-- .github/workflows/test_package_install_inference_gpu.yml | 4 ++-- .../test_package_install_inference_gpu_with_extras.yml | 4 ++-- .github/workflows/test_package_install_inference_sdk.yml | 4 ++-- .../workflows/test_package_install_inference_with_extras.yml | 4 ++-- .github/workflows/unit_tests_inference_cli_x86.yml | 2 +- .github/workflows/unit_tests_inference_sdk_x86.yml | 2 +- .github/workflows/unit_tests_inference_x86.yml | 2 +- .github/workflows/unit_tests_workflows_x86.yml | 2 +- .release/pypi/inference.core.setup.py | 2 +- .release/pypi/inference.cpu.setup.py | 2 +- .release/pypi/inference.gpu.setup.py | 2 +- .release/pypi/inference.sdk.setup.py | 2 +- .release/pypi/inference.setup.py | 2 +- 23 files changed, 32 insertions(+), 32 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 23157abeb..76b648e26 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: token: ${{ secrets.GH_TOKEN_FOR_WORKFLOWS_ENTERPRISE }} - uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.13" check-latest: true - run: pip install mkdocs-material - run: pip install "mkdocstrings[python]" diff --git a/.github/workflows/hosted_inference_e2e_test_production.yml b/.github/workflows/hosted_inference_e2e_test_production.yml index 8bddcaf21..09a395ec8 100644 --- a/.github/workflows/hosted_inference_e2e_test_production.yml +++ b/.github/workflows/hosted_inference_e2e_test_production.yml @@ -19,10 +19,10 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: 🐍 Set up Python 3.10 + - name: 🐍 Set up Python 3.13 uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.13" - name: 📦 Cache Python packages uses: actions/cache@v3 with: diff --git a/.github/workflows/hosted_inference_e2e_test_staging.yml b/.github/workflows/hosted_inference_e2e_test_staging.yml index 645f269eb..99cbc2059 100644 --- a/.github/workflows/hosted_inference_e2e_test_staging.yml +++ b/.github/workflows/hosted_inference_e2e_test_staging.yml @@ -19,10 +19,10 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: 🐍 Set up Python 3.10 + - name: 🐍 Set up Python 3.13 uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.13" - name: 📦 Cache Python packages uses: actions/cache@v3 with: diff --git a/.github/workflows/integration_tests_inference_cli_x86.yml b/.github/workflows/integration_tests_inference_cli_x86.yml index b2527851c..37a0f0171 100644 --- a/.github/workflows/integration_tests_inference_cli_x86.yml +++ b/.github/workflows/integration_tests_inference_cli_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 30 strategy: matrix: - python-version: ["3.9", "3.10"] + python-version: ["3.9", "3.10", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/integration_tests_inference_models.yml b/.github/workflows/integration_tests_inference_models.yml index ea951c0ce..f5ffcc7c9 100644 --- a/.github/workflows/integration_tests_inference_models.yml +++ b/.github/workflows/integration_tests_inference_models.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 45 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/integration_tests_workflows_x86.yml b/.github/workflows/integration_tests_workflows_x86.yml index 47755481d..a16968f08 100644 --- a/.github/workflows/integration_tests_workflows_x86.yml +++ b/.github/workflows/integration_tests_workflows_x86.yml @@ -19,7 +19,7 @@ jobs: group: public-depot strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] timeout-minutes: 15 steps: - name: 🛎️ Checkout diff --git a/.github/workflows/load_test_hosted_inference.yml b/.github/workflows/load_test_hosted_inference.yml index 4aa697501..0935c7dbd 100644 --- a/.github/workflows/load_test_hosted_inference.yml +++ b/.github/workflows/load_test_hosted_inference.yml @@ -29,10 +29,10 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: 🐍 Set up Python 3.10 + - name: 🐍 Set up Python 3.13 uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.13" - name: 📦 Cache Python packages uses: actions/cache@v3 with: diff --git a/.github/workflows/publish.pypi.yml b/.github/workflows/publish.pypi.yml index bc7a024d7..abccf261f 100644 --- a/.github/workflows/publish.pypi.yml +++ b/.github/workflows/publish.pypi.yml @@ -16,7 +16,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - python-version: [3.9] + python-version: ["3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/test_package_install_inference.yml b/.github/workflows/test_package_install_inference.yml index 845741734..decc245e3 100644 --- a/.github/workflows/test_package_install_inference.yml +++ b/.github/workflows/test_package_install_inference.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.9" + python-version: "3.13" - name: 🛞 Create Wheels run: | make create_wheels diff --git a/.github/workflows/test_package_install_inference_cli.yml b/.github/workflows/test_package_install_inference_cli.yml index 60fb93c49..fd6375cc4 100644 --- a/.github/workflows/test_package_install_inference_cli.yml +++ b/.github/workflows/test_package_install_inference_cli.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.9" + python-version: "3.13" - name: 🛞 Create Wheels run: | make create_wheels diff --git a/.github/workflows/test_package_install_inference_gpu.yml b/.github/workflows/test_package_install_inference_gpu.yml index 8b13d3b4b..1f55661cd 100644 --- a/.github/workflows/test_package_install_inference_gpu.yml +++ b/.github/workflows/test_package_install_inference_gpu.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 15 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.9" + python-version: "3.13" - name: 🛞 Create Wheels run: | make create_wheels diff --git a/.github/workflows/test_package_install_inference_gpu_with_extras.yml b/.github/workflows/test_package_install_inference_gpu_with_extras.yml index 77cbe76d3..bb3a7b0cf 100644 --- a/.github/workflows/test_package_install_inference_gpu_with_extras.yml +++ b/.github/workflows/test_package_install_inference_gpu_with_extras.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 30 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.9" + python-version: "3.13" - name: 🚧 Install GDAL OS library run: sudo apt-get update && sudo apt-get install libgdal-dev - name: 🛞 Create Wheels diff --git a/.github/workflows/test_package_install_inference_sdk.yml b/.github/workflows/test_package_install_inference_sdk.yml index 1e82242f5..2ac5ddcee 100644 --- a/.github/workflows/test_package_install_inference_sdk.yml +++ b/.github/workflows/test_package_install_inference_sdk.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.9" + python-version: "3.13" - name: 🛞 Create Wheels run: | make create_wheels diff --git a/.github/workflows/test_package_install_inference_with_extras.yml b/.github/workflows/test_package_install_inference_with_extras.yml index b32ab00db..43ac1b675 100644 --- a/.github/workflows/test_package_install_inference_with_extras.yml +++ b/.github/workflows/test_package_install_inference_with_extras.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 35 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.9" + python-version: "3.13" - name: 🚧 Install GDAL OS library run: sudo apt-get update && sudo apt-get install libgdal-dev - name: 🛞 Create Wheels diff --git a/.github/workflows/unit_tests_inference_cli_x86.yml b/.github/workflows/unit_tests_inference_cli_x86.yml index 758850b7b..5ed595536 100644 --- a/.github/workflows/unit_tests_inference_cli_x86.yml +++ b/.github/workflows/unit_tests_inference_cli_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/unit_tests_inference_sdk_x86.yml b/.github/workflows/unit_tests_inference_sdk_x86.yml index a8561cdf0..536af38b7 100644 --- a/.github/workflows/unit_tests_inference_sdk_x86.yml +++ b/.github/workflows/unit_tests_inference_sdk_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/unit_tests_inference_x86.yml b/.github/workflows/unit_tests_inference_x86.yml index 62e9a5664..91b019e9e 100644 --- a/.github/workflows/unit_tests_inference_x86.yml +++ b/.github/workflows/unit_tests_inference_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/unit_tests_workflows_x86.yml b/.github/workflows/unit_tests_workflows_x86.yml index 969b488e0..be4137041 100644 --- a/.github/workflows/unit_tests_workflows_x86.yml +++ b/.github/workflows/unit_tests_workflows_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.release/pypi/inference.core.setup.py b/.release/pypi/inference.core.setup.py index 398337a2c..789af6aa9 100644 --- a/.release/pypi/inference.core.setup.py +++ b/.release/pypi/inference.core.setup.py @@ -84,5 +84,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8,<3.12", + python_requires=">=3.8", ) diff --git a/.release/pypi/inference.cpu.setup.py b/.release/pypi/inference.cpu.setup.py index d79e7417e..b3d625a24 100644 --- a/.release/pypi/inference.cpu.setup.py +++ b/.release/pypi/inference.cpu.setup.py @@ -83,5 +83,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8,<3.12", + python_requires=">=3.8", ) diff --git a/.release/pypi/inference.gpu.setup.py b/.release/pypi/inference.gpu.setup.py index fdd3ce9e0..7d486e929 100644 --- a/.release/pypi/inference.gpu.setup.py +++ b/.release/pypi/inference.gpu.setup.py @@ -83,5 +83,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8,<3.12", + python_requires=">=3.8", ) diff --git a/.release/pypi/inference.sdk.setup.py b/.release/pypi/inference.sdk.setup.py index d958f2482..e4030d169 100644 --- a/.release/pypi/inference.sdk.setup.py +++ b/.release/pypi/inference.sdk.setup.py @@ -70,5 +70,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8,<3.12", + python_requires=">=3.8", ) diff --git a/.release/pypi/inference.setup.py b/.release/pypi/inference.setup.py index ac8ee2d79..b98948a38 100644 --- a/.release/pypi/inference.setup.py +++ b/.release/pypi/inference.setup.py @@ -83,5 +83,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8,<3.12", + python_requires=">=3.8", ) From 4f4bb87f6ce790bdd4c836442e10ac2041c7d49d Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:18:44 +0100 Subject: [PATCH 2/7] Update github workflows to include Python 3.12 --- .github/workflows/docs.yml | 2 +- .github/workflows/hosted_inference_e2e_test_production.yml | 4 ++-- .github/workflows/hosted_inference_e2e_test_staging.yml | 4 ++-- .github/workflows/integration_tests_inference_cli_x86.yml | 2 +- .github/workflows/integration_tests_inference_models.yml | 2 +- .github/workflows/integration_tests_workflows_x86.yml | 2 +- .github/workflows/load_test_hosted_inference.yml | 4 ++-- .github/workflows/publish.pypi.yml | 2 +- .github/workflows/test_package_install_inference.yml | 4 ++-- .github/workflows/test_package_install_inference_cli.yml | 4 ++-- .github/workflows/test_package_install_inference_gpu.yml | 4 ++-- .../test_package_install_inference_gpu_with_extras.yml | 4 ++-- .github/workflows/test_package_install_inference_sdk.yml | 4 ++-- .../workflows/test_package_install_inference_with_extras.yml | 4 ++-- .github/workflows/unit_tests_inference_cli_x86.yml | 2 +- .github/workflows/unit_tests_inference_sdk_x86.yml | 2 +- .github/workflows/unit_tests_inference_x86.yml | 2 +- .github/workflows/unit_tests_workflows_x86.yml | 2 +- 18 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 76b648e26..2ed6d99e0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -24,7 +24,7 @@ jobs: token: ${{ secrets.GH_TOKEN_FOR_WORKFLOWS_ENTERPRISE }} - uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.12" check-latest: true - run: pip install mkdocs-material - run: pip install "mkdocstrings[python]" diff --git a/.github/workflows/hosted_inference_e2e_test_production.yml b/.github/workflows/hosted_inference_e2e_test_production.yml index 09a395ec8..c0acbb807 100644 --- a/.github/workflows/hosted_inference_e2e_test_production.yml +++ b/.github/workflows/hosted_inference_e2e_test_production.yml @@ -19,10 +19,10 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: 🐍 Set up Python 3.13 + - name: 🐍 Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.12" - name: 📦 Cache Python packages uses: actions/cache@v3 with: diff --git a/.github/workflows/hosted_inference_e2e_test_staging.yml b/.github/workflows/hosted_inference_e2e_test_staging.yml index 99cbc2059..143ecdc47 100644 --- a/.github/workflows/hosted_inference_e2e_test_staging.yml +++ b/.github/workflows/hosted_inference_e2e_test_staging.yml @@ -19,10 +19,10 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: 🐍 Set up Python 3.13 + - name: 🐍 Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.12" - name: 📦 Cache Python packages uses: actions/cache@v3 with: diff --git a/.github/workflows/integration_tests_inference_cli_x86.yml b/.github/workflows/integration_tests_inference_cli_x86.yml index 37a0f0171..1a6772a4a 100644 --- a/.github/workflows/integration_tests_inference_cli_x86.yml +++ b/.github/workflows/integration_tests_inference_cli_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 30 strategy: matrix: - python-version: ["3.9", "3.10", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/integration_tests_inference_models.yml b/.github/workflows/integration_tests_inference_models.yml index f5ffcc7c9..a858f5fa8 100644 --- a/.github/workflows/integration_tests_inference_models.yml +++ b/.github/workflows/integration_tests_inference_models.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 45 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/integration_tests_workflows_x86.yml b/.github/workflows/integration_tests_workflows_x86.yml index a16968f08..e6208768c 100644 --- a/.github/workflows/integration_tests_workflows_x86.yml +++ b/.github/workflows/integration_tests_workflows_x86.yml @@ -19,7 +19,7 @@ jobs: group: public-depot strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] timeout-minutes: 15 steps: - name: 🛎️ Checkout diff --git a/.github/workflows/load_test_hosted_inference.yml b/.github/workflows/load_test_hosted_inference.yml index 0935c7dbd..d3cf5b319 100644 --- a/.github/workflows/load_test_hosted_inference.yml +++ b/.github/workflows/load_test_hosted_inference.yml @@ -29,10 +29,10 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: 🐍 Set up Python 3.13 + - name: 🐍 Set up Python 3.12 uses: actions/setup-python@v5 with: - python-version: "3.13" + python-version: "3.12" - name: 📦 Cache Python packages uses: actions/cache@v3 with: diff --git a/.github/workflows/publish.pypi.yml b/.github/workflows/publish.pypi.yml index abccf261f..f530a54ec 100644 --- a/.github/workflows/publish.pypi.yml +++ b/.github/workflows/publish.pypi.yml @@ -16,7 +16,7 @@ jobs: timeout-minutes: 20 strategy: matrix: - python-version: ["3.13"] + python-version: ["3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/test_package_install_inference.yml b/.github/workflows/test_package_install_inference.yml index decc245e3..e65c1645d 100644 --- a/.github/workflows/test_package_install_inference.yml +++ b/.github/workflows/test_package_install_inference.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.13" + python-version: "3.9" - name: 🛞 Create Wheels run: | make create_wheels diff --git a/.github/workflows/test_package_install_inference_cli.yml b/.github/workflows/test_package_install_inference_cli.yml index fd6375cc4..db560f08f 100644 --- a/.github/workflows/test_package_install_inference_cli.yml +++ b/.github/workflows/test_package_install_inference_cli.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.13" + python-version: "3.9" - name: 🛞 Create Wheels run: | make create_wheels diff --git a/.github/workflows/test_package_install_inference_gpu.yml b/.github/workflows/test_package_install_inference_gpu.yml index 1f55661cd..ecffb6410 100644 --- a/.github/workflows/test_package_install_inference_gpu.yml +++ b/.github/workflows/test_package_install_inference_gpu.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 15 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.13" + python-version: "3.9" - name: 🛞 Create Wheels run: | make create_wheels diff --git a/.github/workflows/test_package_install_inference_gpu_with_extras.yml b/.github/workflows/test_package_install_inference_gpu_with_extras.yml index bb3a7b0cf..b4ed9dfc4 100644 --- a/.github/workflows/test_package_install_inference_gpu_with_extras.yml +++ b/.github/workflows/test_package_install_inference_gpu_with_extras.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 30 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.13" + python-version: "3.9" - name: 🚧 Install GDAL OS library run: sudo apt-get update && sudo apt-get install libgdal-dev - name: 🛞 Create Wheels diff --git a/.github/workflows/test_package_install_inference_sdk.yml b/.github/workflows/test_package_install_inference_sdk.yml index 2ac5ddcee..a6bbbb3d0 100644 --- a/.github/workflows/test_package_install_inference_sdk.yml +++ b/.github/workflows/test_package_install_inference_sdk.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.13" + python-version: "3.9" - name: 🛞 Create Wheels run: | make create_wheels diff --git a/.github/workflows/test_package_install_inference_with_extras.yml b/.github/workflows/test_package_install_inference_with_extras.yml index 43ac1b675..87f301492 100644 --- a/.github/workflows/test_package_install_inference_with_extras.yml +++ b/.github/workflows/test_package_install_inference_with_extras.yml @@ -23,14 +23,14 @@ jobs: timeout-minutes: 35 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 - name: 🐍 Set up Python 3.9 to create wheels uses: actions/setup-python@v2 with: - python-version: "3.13" + python-version: "3.9" - name: 🚧 Install GDAL OS library run: sudo apt-get update && sudo apt-get install libgdal-dev - name: 🛞 Create Wheels diff --git a/.github/workflows/unit_tests_inference_cli_x86.yml b/.github/workflows/unit_tests_inference_cli_x86.yml index 5ed595536..758850b7b 100644 --- a/.github/workflows/unit_tests_inference_cli_x86.yml +++ b/.github/workflows/unit_tests_inference_cli_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/unit_tests_inference_sdk_x86.yml b/.github/workflows/unit_tests_inference_sdk_x86.yml index 536af38b7..a8561cdf0 100644 --- a/.github/workflows/unit_tests_inference_sdk_x86.yml +++ b/.github/workflows/unit_tests_inference_sdk_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/unit_tests_inference_x86.yml b/.github/workflows/unit_tests_inference_x86.yml index 91b019e9e..965a562fa 100644 --- a/.github/workflows/unit_tests_inference_x86.yml +++ b/.github/workflows/unit_tests_inference_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/unit_tests_workflows_x86.yml b/.github/workflows/unit_tests_workflows_x86.yml index be4137041..74c7f7e18 100644 --- a/.github/workflows/unit_tests_workflows_x86.yml +++ b/.github/workflows/unit_tests_workflows_x86.yml @@ -20,7 +20,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: 🛎️ Checkout uses: actions/checkout@v4 From 6622cd021f51ecfffa59ae497c02b1b08349cb5e Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:03:50 +0100 Subject: [PATCH 3/7] include python 3.12 --- .release/pypi/inference.cli.setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.release/pypi/inference.cli.setup.py b/.release/pypi/inference.cli.setup.py index 858ead459..58622c7e8 100644 --- a/.release/pypi/inference.cli.setup.py +++ b/.release/pypi/inference.cli.setup.py @@ -84,5 +84,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8,<3.12", + python_requires=">=3.8,<=3.12", ) From b63cb9f3fa5dbbf64bcbd8e4ab85c2495365555e Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:18:43 +0100 Subject: [PATCH 4/7] include python 3.12 --- .release/pypi/inference.cli.setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.release/pypi/inference.cli.setup.py b/.release/pypi/inference.cli.setup.py index 58622c7e8..93944a11c 100644 --- a/.release/pypi/inference.cli.setup.py +++ b/.release/pypi/inference.cli.setup.py @@ -84,5 +84,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8,<=3.12", + python_requires=">=3.8,<3.13", ) From 6c8bfe036e6f717ccf8a86a2702e77d218277674 Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:06:12 +0100 Subject: [PATCH 5/7] Add back upper bound on python version --- .release/pypi/inference.cli.setup.py | 2 +- .release/pypi/inference.core.setup.py | 2 +- .release/pypi/inference.cpu.setup.py | 2 +- .release/pypi/inference.gpu.setup.py | 2 +- .release/pypi/inference.sdk.setup.py | 2 +- .release/pypi/inference.setup.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.release/pypi/inference.cli.setup.py b/.release/pypi/inference.cli.setup.py index 93944a11c..9b5287f28 100644 --- a/.release/pypi/inference.cli.setup.py +++ b/.release/pypi/inference.cli.setup.py @@ -84,5 +84,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8,<3.13", + python_requires=">=3.8,<3.13" ) diff --git a/.release/pypi/inference.core.setup.py b/.release/pypi/inference.core.setup.py index 789af6aa9..4337f2250 100644 --- a/.release/pypi/inference.core.setup.py +++ b/.release/pypi/inference.core.setup.py @@ -84,5 +84,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8", + python_requires=">=3.8,<3.13" ) diff --git a/.release/pypi/inference.cpu.setup.py b/.release/pypi/inference.cpu.setup.py index b3d625a24..4a50f3c0f 100644 --- a/.release/pypi/inference.cpu.setup.py +++ b/.release/pypi/inference.cpu.setup.py @@ -83,5 +83,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8", + python_requires=">=3.8,<3.13" ) diff --git a/.release/pypi/inference.gpu.setup.py b/.release/pypi/inference.gpu.setup.py index 7d486e929..902ae88ed 100644 --- a/.release/pypi/inference.gpu.setup.py +++ b/.release/pypi/inference.gpu.setup.py @@ -83,5 +83,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8", + python_requires=">=3.8,<3.13" ) diff --git a/.release/pypi/inference.sdk.setup.py b/.release/pypi/inference.sdk.setup.py index e4030d169..78faab261 100644 --- a/.release/pypi/inference.sdk.setup.py +++ b/.release/pypi/inference.sdk.setup.py @@ -70,5 +70,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8", + python_requires=">=3.8,<3.13" ) diff --git a/.release/pypi/inference.setup.py b/.release/pypi/inference.setup.py index b98948a38..9a894d770 100644 --- a/.release/pypi/inference.setup.py +++ b/.release/pypi/inference.setup.py @@ -83,5 +83,5 @@ def read_requirements(path): "Typing :: Typed", "Operating System :: OS Independent", ], - python_requires=">=3.8", + python_requires=">=3.8,<3.13" ) From 4f60ca926a101bfee8fd68ef6903e7cacda95454 Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:32:30 +0100 Subject: [PATCH 6/7] replace GPUtil with nvidia-ml-py --- inference/core/devices/utils.py | 13 +++++++------ inference_cli/lib/benchmark/platform.py | 17 ++++++++++++++--- requirements/requirements.cli.txt | 2 +- requirements/requirements.cpu.txt | 2 +- 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/inference/core/devices/utils.py b/inference/core/devices/utils.py index a26d47472..f1ca572bd 100644 --- a/inference/core/devices/utils.py +++ b/inference/core/devices/utils.py @@ -19,20 +19,21 @@ def is_running_in_docker(): def get_gpu_id(): """Fetches the GPU ID if a GPU is present. - Tries to import and use the `GPUtil` module to retrieve the GPU information. + Tries to import and use the `pynvml` (delivered by nvidia-ml-py) module to retrieve the GPU information. Returns: Optional[int]: GPU ID if available, None otherwise. """ try: - import GPUtil + from pynvml import nvmlInit, nvmlDeviceGetCount - GPUs = GPUtil.getGPUs() - if GPUs: - return GPUs[0].id + nvmlInit() + gpus_count = nvmlDeviceGetCount() + if gpus_count: + return 0 except ImportError: return None - except Exception as e: + except Exception: return None diff --git a/inference_cli/lib/benchmark/platform.py b/inference_cli/lib/benchmark/platform.py index 483c09a30..edba58530 100644 --- a/inference_cli/lib/benchmark/platform.py +++ b/inference_cli/lib/benchmark/platform.py @@ -1,11 +1,22 @@ from cpuinfo import get_cpu_info -from GPUtil import GPUtil +from pynvml import nvmlInit, nvmlDeviceGetCount, nvmlDeviceGetHandleByIndex, nvmlDeviceGetName def retrieve_platform_specifics() -> dict: + gpus_count = 0 + gpu_names = [] + try: + nvmlInit() + gpus_count = nvmlDeviceGetCount() + for i in range(gpus_count): + handle = nvmlDeviceGetHandleByIndex(i) + gpu_name = nvmlDeviceGetName(handle) + gpu_names.append(gpu_name) + except Exception: + # No GPUs + pass + cpu_info = get_cpu_info() - gpus = GPUtil.getGPUs() - gpu_names = list({gpu.name for gpu in gpus}) return { "python_version": cpu_info["python_version"], "architecture": cpu_info["arch_string_raw"], diff --git a/requirements/requirements.cli.txt b/requirements/requirements.cli.txt index 023ec54ae..50acf7439 100644 --- a/requirements/requirements.cli.txt +++ b/requirements/requirements.cli.txt @@ -6,7 +6,7 @@ PyYAML~=6.0.0 supervision>=0.21.0,<=0.22.0 opencv-python>=4.8.1.78,<=4.10.0.84 tqdm>=4.0.0,<5.0.0 -GPUtil~=1.4.0 +nvidia-ml-py<13.0.0 py-cpuinfo~=9.0.0 aiohttp>=3.9.0,<=3.10.11 backoff~=2.2.0 diff --git a/requirements/requirements.cpu.txt b/requirements/requirements.cpu.txt index 5a464946c..cc5958eec 100644 --- a/requirements/requirements.cpu.txt +++ b/requirements/requirements.cpu.txt @@ -1,2 +1,2 @@ onnxruntime>=1.15.1,<1.20.0 -GPUtil==1.4.0 \ No newline at end of file +nvidia-ml-py<13.0.0 From 2c47382b3705faaf3a81e2d6b7ecc40481ad17aa Mon Sep 17 00:00:00 2001 From: Grzegorz Klimaszewski <166530809+grzegorz-roboflow@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:46:42 +0100 Subject: [PATCH 7/7] formatting --- inference/core/devices/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inference/core/devices/utils.py b/inference/core/devices/utils.py index f1ca572bd..b4d7891f2 100644 --- a/inference/core/devices/utils.py +++ b/inference/core/devices/utils.py @@ -25,7 +25,7 @@ def get_gpu_id(): Optional[int]: GPU ID if available, None otherwise. """ try: - from pynvml import nvmlInit, nvmlDeviceGetCount + from pynvml import nvmlDeviceGetCount, nvmlInit nvmlInit() gpus_count = nvmlDeviceGetCount()