Fix `IS_PYTHON_3_12` bug (#9258)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
pull/9151/head^2
Glenn Jocher 8 months ago committed by GitHub
parent 35233822d8
commit ebbbdd7e25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/ci.yaml
  2. 2
      ultralytics/utils/checks.py
  3. 1
      ultralytics/utils/torch_utils.py

@ -222,7 +222,7 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Conda:
if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule_disabled' || github.event.inputs.conda == 'true')
if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event.inputs.conda == 'true')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false

@ -726,4 +726,4 @@ def cuda_is_available() -> bool:
# Define constants
IS_PYTHON_3_12 = check_version(PYTHON_VERSION, "==3.12", name="Python ", hard=False)
IS_PYTHON_3_12 = PYTHON_VERSION.startswith("3.12")

@ -24,6 +24,7 @@ try:
except ImportError:
thop = None
# Version checks (all default to version>=min_version)
TORCH_1_9 = check_version(torch.__version__, "1.9.0")
TORCH_1_13 = check_version(torch.__version__, "1.13.0")
TORCH_2_0 = check_version(torch.__version__, "2.0.0")

Loading…
Cancel
Save