Reference for ultralytics/utils/callbacks/raytune.py
Note
This file is available at https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/raytune.py. If you spot a problem please help fix it by contributing a Pull Request π οΈ. Thank you π!
ultralytics.utils.callbacks.raytune.on_fit_epoch_end
on_fit_epoch_end(trainer)
Reports training metrics to Ray Tune at epoch end when a Ray session is active.
Captures metrics from the trainer object and sends them to Ray Tune with the current epoch number, enabling hyperparameter tuning optimization. Only executes when within an active Ray Tune session.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
trainer
|
BaseTrainer
|
The Ultralytics trainer object containing metrics and epochs. |
required |
Examples:
>>> # Called automatically by the Ultralytics training loop
>>> on_fit_epoch_end(trainer)
References
Ray Tune docs: https://docs.ray.io/en/latest/tune/index.html
Source code in ultralytics/utils/callbacks/raytune.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
π
Created 1 year ago
βοΈ Updated 7 months ago