From bbf5fa57127612877cc1b23feb3f38da8312f560 Mon Sep 17 00:00:00 2001 From: SolomonLake Date: Thu, 20 Jul 2023 10:33:48 -0500 Subject: [PATCH] Bugfix/ Model upload logs (#155) * Update deploy URL to correct path * Check for ultralytics version 8.0.134 --- roboflow/__init__.py | 2 +- roboflow/core/version.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/roboflow/__init__.py b/roboflow/__init__.py index 3e0be7aa..b93cca20 100644 --- a/roboflow/__init__.py +++ b/roboflow/__init__.py @@ -12,7 +12,7 @@ from roboflow.core.workspace import Workspace from roboflow.util.general import write_line -__version__ = "1.1.1" +__version__ = "1.1.2" def check_key(api_key, model, notebook, num_retries=0): diff --git a/roboflow/core/version.py b/roboflow/core/version.py index fdc573ab..6261a273 100644 --- a/roboflow/core/version.py +++ b/roboflow/core/version.py @@ -181,11 +181,11 @@ def download(self, model_format=None, location=None, overwrite: bool = True): try: import_module("ultralytics") print_warn_for_wrong_dependencies_versions( - [("ultralytics", "<=", "8.0.20")] + [("ultralytics", "==", "8.0.134")] ) except ImportError as e: print( - "[WARNING] we noticed you are downloading a `yolov8` datasets but you don't have `ultralytics` installed. Roboflow `.deploy` supports only models trained with `ultralytics<=8.0.20`, to intall it `pip install ultralytics<=8.0.20`." + "[WARNING] we noticed you are downloading a `yolov8` datasets but you don't have `ultralytics` installed. Roboflow `.deploy` supports only models trained with `ultralytics==8.0.134`, to intall it `pip install ultralytics==8.0.134`." ) # silently fail pass @@ -434,7 +434,7 @@ def live_plot(epochs, mAP, loss, title=""): # return the model object return self.model - # @warn_for_wrong_dependencies_versions([("ultralytics", "<=", "8.0.20")]) + # @warn_for_wrong_dependencies_versions([("ultralytics", "==", "8.0.134")]) def deploy(self, model_type: str, model_path: str) -> None: """Uploads provided weights file to Roboflow @@ -464,7 +464,7 @@ def deploy(self, model_type: str, model_path: str) -> None: ) print_warn_for_wrong_dependencies_versions( - [("ultralytics", "<=", "8.0.20")] + [("ultralytics", "==", "8.0.134")] ) elif "yolov5" in model_type or "yolov7" in model_type: @@ -593,14 +593,14 @@ def deploy(self, model_type: str, model_path: str) -> None: if self.public: print( - f"View the status of your deployment at: {APP_URL}/{self.workspace}/{self.project}/deploy/{self.version}" + f"View the status of your deployment at: {APP_URL}/{self.workspace}/{self.project}/{self.version}" ) print( f"Share your model with the world at: {UNIVERSE_URL}/{self.workspace}/{self.project}/model/{self.version}" ) else: print( - f"View the status of your deployment at: {APP_URL}/{self.workspace}/{self.project}/deploy/{self.version}" + f"View the status of your deployment at: {APP_URL}/{self.workspace}/{self.project}/{self.version}" ) except Exception as e: @@ -730,7 +730,7 @@ def data_yaml_callback(content: dict) -> dict: try: # get_wrong_dependencies_versions raises exception if ultralytics is not installed at all if format == "yolov8" and not get_wrong_dependencies_versions( - dependencies_versions=[("ultralytics", ">=", "8.0.30")] + dependencies_versions=[("ultralytics", "==", "8.0.134")] ): content["train"] = "train/images" content["val"] = "valid/images"