|
7 | 7 | import sys
|
8 | 8 | import time
|
9 | 9 | import zipfile
|
10 |
| -from importlib import import_module |
11 | 10 | from typing import TYPE_CHECKING, Optional, Union
|
12 | 11 |
|
13 | 12 | import requests
|
@@ -206,19 +205,6 @@ def download(self, model_format=None, location=None, overwrite: bool = False):
|
206 | 205 |
|
207 | 206 | self.__wait_if_generating()
|
208 | 207 |
|
209 |
| - if model_format == "yolov8": |
210 |
| - # if ultralytics is installed, we will assume users will want to use yolov8 and we check for the supported version # noqa: E501 // docs |
211 |
| - try: |
212 |
| - import_module("ultralytics") |
213 |
| - print_warn_for_wrong_dependencies_versions([("ultralytics", "==", "8.0.196")]) |
214 |
| - except ImportError: |
215 |
| - print( |
216 |
| - "[WARNING] we noticed you are downloading a `yolov8` datasets but you don't have `ultralytics` installed. " # noqa: E501 // docs |
217 |
| - "Roboflow `.deploy` supports only models trained with `ultralytics==8.0.196`, to intall it `pip install ultralytics==8.0.196`." # noqa: E501 // docs |
218 |
| - ) |
219 |
| - # silently fail |
220 |
| - pass |
221 |
| - |
222 | 208 | model_format = self.__get_format_identifier(model_format)
|
223 | 209 |
|
224 | 210 | if model_format not in self.exports:
|
@@ -246,7 +232,7 @@ def download(self, model_format=None, location=None, overwrite: bool = False):
|
246 | 232 |
|
247 | 233 | self.__download_zip(link, location, model_format)
|
248 | 234 | self.__extract_zip(location, model_format)
|
249 |
| - self.__reformat_yaml(location, model_format) |
| 235 | + self.__reformat_yaml(location, model_format) # TODO: is roboflow-python a place to be munging yaml files? |
250 | 236 |
|
251 | 237 | return Dataset(self.name, self.version, model_format, os.path.abspath(location))
|
252 | 238 |
|
@@ -957,7 +943,7 @@ def data_yaml_callback(content: dict) -> dict:
|
957 | 943 | content["train"] = location + content["train"].lstrip(".")
|
958 | 944 | content["val"] = location + content["val"].lstrip(".")
|
959 | 945 | content["test"] = location + content["test"].lstrip(".")
|
960 |
| - if format in ["yolov5pytorch", "yolov7pytorch", "yolov8", "yolov9"]: |
| 946 | + if format in ["yolov5pytorch", "yolov7pytorch"]: |
961 | 947 | content["train"] = location + content["train"].lstrip("..")
|
962 | 948 | content["val"] = location + content["val"].lstrip("..")
|
963 | 949 | try:
|
|
0 commit comments