Skip to content

RuntimeError: Tune is not installed, so get_tune_resources is not supported. You can install Ray Tune via pip install ray[tune]. #313

@ksneab7

Description

@ksneab7

Problem

When running the example code for ray.tune integration in the readme,
The script successfully exectures from ray import tune but fails on the line resources_per_trial=ray_params.get_tune_resources())
I think this is due to the TUNE_INSTALLED global set in the xgboost_ray/tune.py file.

It seems that line 15 in that script (from ray.tune import is_session_enabled) is failing due to ray.tune not having that attribute.

Steps to reproduce:

in this section of the readme

Error

Traceback (most recent call last):
  File "./testing_ray_data_load.py", line 46, in <module>
    resources_per_trial=ray_params.get_tune_resources())
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/xgboost_ray/main.py", line 484, in get_tune_resources
    return _get_tune_resources(
           ^^^^^^^^^^^^^^^^^^^^
  File "./venv/lib/python3.11/site-packages/xgboost_ray/tune.py", line 180, in _get_tune_resources
    raise RuntimeError(
RuntimeError: Tune is not installed, so `get_tune_resources` is not supported. You can install Ray Tune via `pip install ray[tune]`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions