ultralytics 8.2.19 fix Conda CI relative import bug (#13006)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Burhan 2024-05-22 07:19:05 -04:00 committed by GitHub
parent 5298d57308
commit f0b7c510db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 8 additions and 9 deletions

View file

@ -3,7 +3,7 @@
import shutil
from pathlib import Path
TMP = Path(__file__).resolve().parent / "tmp" # temp directory for test files
from tests import TMP
def pytest_addoption(parser):

View file

@ -7,7 +7,7 @@ import pytest
from ultralytics.cfg import TASK2DATA, TASK2MODEL, TASKS
from ultralytics.utils import ASSETS, WEIGHTS_DIR, checks
from . import CUDA_DEVICE_COUNT, CUDA_IS_AVAILABLE
from tests import CUDA_DEVICE_COUNT, CUDA_IS_AVAILABLE
# Constants
TASK_MODEL_DATA = [(task, WEIGHTS_DIR / TASK2MODEL[task], TASK2DATA[task]) for task in TASKS]

View file

@ -10,7 +10,7 @@ from ultralytics import YOLO
from ultralytics.utils import ASSETS, WEIGHTS_DIR
from ultralytics.cfg import TASK2DATA, TASK2MODEL, TASKS
from . import CUDA_DEVICE_COUNT, CUDA_IS_AVAILABLE, MODEL, SOURCE
from tests import CUDA_DEVICE_COUNT, CUDA_IS_AVAILABLE, MODEL, SOURCE
def test_checks():

View file

@ -9,7 +9,7 @@ from ultralytics.engine.exporter import Exporter
from ultralytics.models.yolo import classify, detect, segment
from ultralytics.utils import ASSETS, DEFAULT_CFG, WEIGHTS_DIR
from . import MODEL
from tests import MODEL
def test_func(*args): # noqa

View file

@ -18,8 +18,7 @@ from ultralytics.utils import (
checks,
)
from ultralytics.utils.torch_utils import TORCH_1_9, TORCH_1_13
from . import MODEL, SOURCE
from tests import MODEL, SOURCE
def test_export_torchscript():

View file

@ -12,7 +12,7 @@ from ultralytics import YOLO, download
from ultralytics.utils import DATASETS_DIR, SETTINGS
from ultralytics.utils.checks import check_requirements
from . import MODEL, SOURCE, TMP
from tests import MODEL, SOURCE, TMP
@pytest.mark.skipif(not check_requirements("ray", install=False), reason="ray[tune] not installed")

View file

@ -27,7 +27,7 @@ from ultralytics.utils import (
)
from ultralytics.utils.downloads import download, is_url
from ultralytics.utils.torch_utils import TORCH_1_9
from . import CFG, IS_TMP_WRITEABLE, MODEL, SOURCE, TMP
from tests import CFG, IS_TMP_WRITEABLE, MODEL, SOURCE, TMP
def test_model_forward():