From 11b419434487a894656fe46d819d2ae868f25cc1 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Wed, 30 Oct 2024 13:42:39 +0100 Subject: [PATCH] Disable Ray tests (#17266) Co-authored-by: UltralyticsAssistant --- .github/workflows/ci.yaml | 4 ++-- ultralytics/utils/tuner.py | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6963156ce9..381e92c4c1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -184,7 +184,7 @@ jobs: torch="torch==1.8.0 torchvision==0.9.0" fi if [[ "${{ github.event_name }}" =~ ^(schedule|workflow_dispatch)$ ]]; then - slow="pycocotools mlflow ray[tune]" + slow="pycocotools mlflow" fi pip install -e ".[export]" $torch $slow pytest-cov --extra-index-url https://download.pytorch.org/whl/cpu - name: Check environment @@ -247,7 +247,7 @@ jobs: - name: Install requirements run: | python -m pip install --upgrade pip wheel - pip install -e ".[export]" pytest mlflow pycocotools "ray[tune]" + pip install -e ".[export]" pytest mlflow pycocotools - name: Check environment run: | yolo checks diff --git a/ultralytics/utils/tuner.py b/ultralytics/utils/tuner.py index e611fa9af8..165c788a75 100644 --- a/ultralytics/utils/tuner.py +++ b/ultralytics/utils/tuner.py @@ -1,12 +1,16 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license - from ultralytics.cfg import TASK2DATA, TASK2METRIC, get_save_dir from ultralytics.utils import DEFAULT_CFG, DEFAULT_CFG_DICT, LOGGER, NUM_THREADS, checks def run_ray_tune( - model, space: dict = None, grace_period: int = 10, gpu_per_trial: int = None, max_samples: int = 10, **train_args + model, + space: dict = None, + grace_period: int = 10, + gpu_per_trial: int = None, + max_samples: int = 10, + **train_args, ): """ Runs hyperparameter tuning using Ray Tune. @@ -38,7 +42,7 @@ def run_ray_tune( train_args = {} try: - checks.check_requirements(("ray[tune]", "numpy<2.0.0")) + checks.check_requirements("ray[tune]") import ray from ray import tune