From 3fc14b5fec93f365e7a2318e410b79f879cf5004 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 3 Sep 2024 12:43:48 +0200 Subject: [PATCH] `ultralytics 8.2.87` Ray `shutdown()` workers after tuning (#15976) --- tests/test_python.py | 2 +- ultralytics/__init__.py | 2 +- ultralytics/utils/tuner.py | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/test_python.py b/tests/test_python.py index 8fbab54cf..f15dd48ef 100644 --- a/tests/test_python.py +++ b/tests/test_python.py @@ -202,7 +202,7 @@ def test_workflow(): model.train(data="coco8.yaml", epochs=1, imgsz=32, optimizer="SGD") model.val(imgsz=32) model.predict(SOURCE, imgsz=32) - model.export(format="onnx") + model.export(format="torchscript") def test_predict_callback_and_setup(): diff --git a/ultralytics/__init__.py b/ultralytics/__init__.py index e1bbd6561..37925ac9e 100644 --- a/ultralytics/__init__.py +++ b/ultralytics/__init__.py @@ -1,6 +1,6 @@ # Ultralytics YOLO 🚀, AGPL-3.0 license -__version__ = "8.2.86" +__version__ = "8.2.87" import os diff --git a/ultralytics/utils/tuner.py b/ultralytics/utils/tuner.py index 1d52e3e0b..1329bfe6e 100644 --- a/ultralytics/utils/tuner.py +++ b/ultralytics/utils/tuner.py @@ -143,5 +143,10 @@ def run_ray_tune( # Run the hyperparameter search tuner.fit() - # Return the results of the hyperparameter search - return tuner.get_results() + # Get the results of the hyperparameter search + results = tuner.get_results() + + # Shut down Ray to clean up workers + ray.shutdown() + + return results