ray[tune]==2.10.0
bug AttributeError: module 'ray.tune' has no attribute 'is_session_enabled' #44258
Description
What happened + What you expected to happen
Ultralytics tuning of YOLO models using ray[tune] stopped working on the 2.10.0 release. Works correctly with <=2.9.3 so we've been forced to pin ray[tune]<=2.9.3
now in ultralytics/ultralytics#9254.
See https://github.com/ultralytics/ultralytics/actions/runs/8383428601/job/22959118875 for CI failure.
Versions / Dependencies
ray[tune]==2.10.0
Reproduction script
pip install 'ultralytics==8.1.30' 'ray[tune]==2.10.0'
from ultralytics import YOLO
# Load a YOLOv8 model
model = YOLO('yolov8n.pt')
# Tune with Ray tune
results = model.tune(use_ray=True)
results in
File "/usr/local/lib/python3.10/dist-packages/ultralytics/utils/callbacks/raytune.py", line 17, in on_fit_epoch_end
if ray.tune.is_session_enabled():
AttributeError: module 'ray.tune' has no attribute 'is_session_enabled'
Issue Severity
High: It blocks me from completing my task.