Allow tuning directory to be set using name (#18760)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
42a220c71d
commit
a8e2464a9c
2 changed files with 6 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
||||
|
||||
from ultralytics.cfg import TASK2DATA, TASK2METRIC, get_save_dir
|
||||
from ultralytics.cfg import TASK2DATA, TASK2METRIC, get_cfg, get_save_dir
|
||||
from ultralytics.utils import DEFAULT_CFG, DEFAULT_CFG_DICT, LOGGER, NUM_THREADS, checks
|
||||
|
||||
|
||||
|
|
@ -134,7 +134,9 @@ def run_ray_tune(
|
|||
tuner_callbacks = [WandbLoggerCallback(project="YOLOv8-tune")] if wandb else []
|
||||
|
||||
# Create the Ray Tune hyperparameter search tuner
|
||||
tune_dir = get_save_dir(DEFAULT_CFG, name="tune").resolve() # must be absolute dir
|
||||
tune_dir = get_save_dir(
|
||||
get_cfg(DEFAULT_CFG, train_args), name=train_args.pop("name", "tune")
|
||||
).resolve() # must be absolute dir
|
||||
tune_dir.mkdir(parents=True, exist_ok=True)
|
||||
tuner = tune.Tuner(
|
||||
trainable_with_resources,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue