From 68720288d3858d10868a380029ea8a40a8bd3e81 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Sun, 23 Jun 2024 17:57:24 +0200 Subject: [PATCH] Adjust `numpy<2.0.0` compatibility (#13906) Signed-off-by: Glenn Jocher --- pyproject.toml | 6 ++---- ultralytics/engine/model.py | 2 +- ultralytics/hub/__init__.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9b130e0b..7d40d3e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,7 +64,7 @@ classifiers = [ # Required dependencies ------------------------------------------------------------------------------------------------ dependencies = [ - "numpy<2.0.0", # temporary patch for compat errors https://github.com/ultralytics/yolov5/actions/runs/9538130424/job/26286956354 + "numpy>=1.23.5,<2.0.0", # temporary patch for compat errors https://github.com/ultralytics/yolov5/actions/runs/9538130424/job/26286956354 "matplotlib>=3.3.0", "opencv-python>=4.6.0", "pillow>=7.1.2", @@ -85,8 +85,6 @@ dependencies = [ [project.optional-dependencies] dev = [ "ipython", - "check-manifest", - "pre-commit", "pytest", "pytest-cov", "coverage[toml]", @@ -119,7 +117,7 @@ logging = [ "dvclive>=2.12.0", ] extra = [ - "hub-sdk>=0.0.5", # Ultralytics HUB + "hub-sdk>=0.0.8", # Ultralytics HUB "ipython", # interactive notebook "albumentations>=1.4.6", # training augmentations "pycocotools>=2.0.7", # COCO mAP diff --git a/ultralytics/engine/model.py b/ultralytics/engine/model.py index 6827264b..44b7539b 100644 --- a/ultralytics/engine/model.py +++ b/ultralytics/engine/model.py @@ -133,7 +133,7 @@ class Model(nn.Module): # Check if Ultralytics HUB model from https://hub.ultralytics.com if self.is_hub_model(model): # Fetch model from HUB - checks.check_requirements("hub-sdk>=0.0.6") + checks.check_requirements("hub-sdk>=0.0.8") self.session = HUBTrainingSession.create_session(model) model = self.session.model_file diff --git a/ultralytics/hub/__init__.py b/ultralytics/hub/__init__.py index daeed889..0e42662e 100644 --- a/ultralytics/hub/__init__.py +++ b/ultralytics/hub/__init__.py @@ -38,7 +38,7 @@ def login(api_key: str = None, save=True) -> bool: Returns: (bool): True if authentication is successful, False otherwise. """ - checks.check_requirements("hub-sdk>=0.0.6") + checks.check_requirements("hub-sdk>=0.0.8") from hub_sdk import HUBClient api_key_url = f"{HUB_WEB_ROOT}/settings?tab=api+keys" # set the redirect URL