Abandon with Retry(): context manager (#13159)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
22de23ec8d
commit
25c9f77c8f
3 changed files with 4 additions and 27 deletions
|
|
@ -15,7 +15,6 @@ from ultralytics.utils import (
|
|||
LINUX,
|
||||
MACOS,
|
||||
WINDOWS,
|
||||
Retry,
|
||||
checks,
|
||||
)
|
||||
from ultralytics.utils.torch_utils import TORCH_1_9, TORCH_1_13
|
||||
|
|
@ -69,8 +68,7 @@ def test_export_openvino_matrix(task, dynamic, int8, half, batch):
|
|||
file = Path(file)
|
||||
file = file.rename(file.with_stem(f"{file.stem}-{uuid.uuid4()}"))
|
||||
YOLO(file)([SOURCE] * batch, imgsz=64 if dynamic else 32) # exported model inference
|
||||
with Retry(times=3, delay=1): # retry in case of potential lingering multi-threaded file usage errors
|
||||
shutil.rmtree(file)
|
||||
shutil.rmtree(file, ignore_errors=True) # retry in case of potential lingering multi-threaded file usage errors
|
||||
|
||||
|
||||
@pytest.mark.slow
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue