Adjust numpy<2.0.0 compatibility (#13906)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-06-23 17:57:24 +02:00 committed by GitHub
parent c636fe0f35
commit 68720288d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 6 deletions

View file

@ -64,7 +64,7 @@ classifiers = [
# Required dependencies ------------------------------------------------------------------------------------------------ # Required dependencies ------------------------------------------------------------------------------------------------
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", "matplotlib>=3.3.0",
"opencv-python>=4.6.0", "opencv-python>=4.6.0",
"pillow>=7.1.2", "pillow>=7.1.2",
@ -85,8 +85,6 @@ dependencies = [
[project.optional-dependencies] [project.optional-dependencies]
dev = [ dev = [
"ipython", "ipython",
"check-manifest",
"pre-commit",
"pytest", "pytest",
"pytest-cov", "pytest-cov",
"coverage[toml]", "coverage[toml]",
@ -119,7 +117,7 @@ logging = [
"dvclive>=2.12.0", "dvclive>=2.12.0",
] ]
extra = [ extra = [
"hub-sdk>=0.0.5", # Ultralytics HUB "hub-sdk>=0.0.8", # Ultralytics HUB
"ipython", # interactive notebook "ipython", # interactive notebook
"albumentations>=1.4.6", # training augmentations "albumentations>=1.4.6", # training augmentations
"pycocotools>=2.0.7", # COCO mAP "pycocotools>=2.0.7", # COCO mAP

View file

@ -133,7 +133,7 @@ class Model(nn.Module):
# Check if Ultralytics HUB model from https://hub.ultralytics.com # Check if Ultralytics HUB model from https://hub.ultralytics.com
if self.is_hub_model(model): if self.is_hub_model(model):
# Fetch model from HUB # 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) self.session = HUBTrainingSession.create_session(model)
model = self.session.model_file model = self.session.model_file

View file

@ -38,7 +38,7 @@ def login(api_key: str = None, save=True) -> bool:
Returns: Returns:
(bool): True if authentication is successful, False otherwise. (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 from hub_sdk import HUBClient
api_key_url = f"{HUB_WEB_ROOT}/settings?tab=api+keys" # set the redirect URL api_key_url = f"{HUB_WEB_ROOT}/settings?tab=api+keys" # set the redirect URL