Reset trainer before each trial with Ray Tune (#23793)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
d0f665ff0e
commit
7bd3b2ce19
@ -88,6 +88,7 @@ def run_ray_tune(
|
||||
def _tune(config):
|
||||
"""Train the YOLO model with the specified hyperparameters and return results."""
|
||||
model_to_train = ray.get(model_in_store) # get the model from ray store for tuning
|
||||
model_to_train.trainer = None
|
||||
model_to_train.reset_callbacks()
|
||||
config.update(train_args)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user