Skip to content

Commit

Permalink
Bugfix/ Model upload logs (#155)
Browse files Browse the repository at this point in the history
* Update deploy URL to correct path

* Check for ultralytics version 8.0.134
  • Loading branch information
SolomonLake committed Jul 20, 2023
1 parent 781c553 commit bbf5fa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion roboflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
14 changes: 7 additions & 7 deletions roboflow/core/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit bbf5fa5

Please sign in to comment.