Fix IS_TMP_WRITEABLE order of operations (#16294)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
fa6362a6f5
commit
2a17462367
2 changed files with 39 additions and 8 deletions
|
|
@ -1,13 +1,13 @@
|
|||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
from ultralytics.utils import ASSETS, ROOT, WEIGHTS_DIR, checks, is_dir_writeable
|
||||
from ultralytics.utils import ASSETS, ROOT, WEIGHTS_DIR, checks
|
||||
|
||||
# Constants used in tests
|
||||
MODEL = WEIGHTS_DIR / "path with spaces" / "yolov8n.pt" # test spaces in path
|
||||
CFG = "yolov8n.yaml"
|
||||
SOURCE = ASSETS / "bus.jpg"
|
||||
SOURCES_LIST = [ASSETS / "bus.jpg", ASSETS, ASSETS / "*", ASSETS / "**/*.jpg"]
|
||||
TMP = (ROOT / "../tests/tmp").resolve() # temp directory for test files
|
||||
IS_TMP_WRITEABLE = is_dir_writeable(TMP)
|
||||
CUDA_IS_AVAILABLE = checks.cuda_is_available()
|
||||
CUDA_DEVICE_COUNT = checks.cuda_device_count()
|
||||
|
||||
|
|
@ -15,6 +15,7 @@ __all__ = (
|
|||
"MODEL",
|
||||
"CFG",
|
||||
"SOURCE",
|
||||
"SOURCES_LIST",
|
||||
"TMP",
|
||||
"IS_TMP_WRITEABLE",
|
||||
"CUDA_IS_AVAILABLE",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue