Skip to content

Commit ebbbdd7

Browse files
Fix IS_PYTHON_3_12 bug (#9258)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
1 parent 3523382 commit ebbbdd7

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ jobs:
222222
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
223223

224224
Conda:
225-
if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule_disabled' || github.event.inputs.conda == 'true')
225+
if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event.inputs.conda == 'true')
226226
runs-on: ${{ matrix.os }}
227227
strategy:
228228
fail-fast: false

ultralytics/utils/checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,4 +726,4 @@ def cuda_is_available() -> bool:
726726

727727

728728
# Define constants
729-
IS_PYTHON_3_12 = check_version(PYTHON_VERSION, "==3.12", name="Python ", hard=False)
729+
IS_PYTHON_3_12 = PYTHON_VERSION.startswith("3.12")

ultralytics/utils/torch_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
except ImportError:
2525
thop = None
2626

27+
# Version checks (all default to version>=min_version)
2728
TORCH_1_9 = check_version(torch.__version__, "1.9.0")
2829
TORCH_1_13 = check_version(torch.__version__, "1.13.0")
2930
TORCH_2_0 = check_version(torch.__version__, "2.0.0")

0 commit comments

Comments
 (0)