Set root temporary path with ray tune

I have a working pipeline where I load a dataset with ray.data and train/tune models with ray tune.

I’d like to change the location of the root temporary directory which is /tmp/ray by default (this fills up the /tmp directory for some tuning runs).

However, the suggestions on the linked page above (change the root temporary directory by passing --temp-dir={your temp path} to ray start, or provide the _temp_dir argument to ray.init()). don’t apply to workflows like mine: when using the datasets and tune APIs, I don’t ever explicitly call ray start or ray.init(). I also can’t identify where these calls are happening, or where I would provide either of those parameters.

Is there a way to specify the location of the root temporary directory in this case (when using tune)?

How severe does this issue affect your experience of using Ray?

  • High: It blocks me to complete my task.

See Cannot set root temporary path with ray tune · Issue #31478 · ray-project/ray · GitHub, solution is to call ray.init(_temp_dir=my_dir) manually.