跳至内容

参考资料 ultralytics/utils/callbacks/raytune.py

备注

该文件可在https://github.com/ultralytics/ultralytics/blob/main/ultralytics/utils/callbacks/raytune .py 下找到。如果您发现问题,请通过提交 Pull Request🛠️ 帮助修复。谢谢🙏!



ultralytics.utils.callbacks.raytune.on_fit_epoch_end(trainer)

在每个周期结束时向 Ray Tune 发送训练指标。

源代码 ultralytics/utils/callbacks/raytune.py
def on_fit_epoch_end(trainer):
    """Sends training metrics to Ray Tune at end of each epoch."""
    if ray.train._internal.session._get_session():  # replacement for deprecated ray.tune.is_session_enabled()
        metrics = trainer.metrics
        metrics["epoch"] = trainer.epoch
        session.report(metrics)





Created 2023-11-12, Updated 2024-06-02
Authors: glenn-jocher (5), Burhan-Q (1)