How to change the directory for the trial?

I can not find the idea to set a new trial path.
I tried : os.environ[“TUNE_TRIAL_DIR”] = trial_path

My code so far is:

hyperparam_tuner_bayes = tune.Tuner(tune.with_parameters(_train_cblof, hp_optimizer="bayes", data=_data_distribution()),
                                    tune_config=tune.TuneConfig(search_alg=bayesopt, mode="max", num_samples=2),
                                    param_space=search_space_bayes, run_config=train.RunConfig(storage_path=path))
results_bayes =

I could change the result path to a new one but can not find a hint on changing the trial path. This is a huge problem for me because I am littering the server with the trials. I would like to change the directory to an other path. Can somebody give me a hint.

I already found the docstring: Tune Internals — Ray 2.22.0
but do not know how to set the path. I think i need so add something like path = path or local_path = path.

Thanks for helping.

Is TuneConfig.trial_dirname_creator what you are a looking for?

Thank you for answering, but I do not get it to run. (Perhaps it is just due to the missing description of the function. Could you provide an example on how to set it to c:\ray\train\session…)
Perhaps i do need to specify the problem a little bit more.

I need to switch the temp/ray (Configuring Logging — Ray 2.24.0) path to a specific location. On a local machine I can run my code, but not on a cluster, because ray tune tries to write to disk without permission.

I also found this Issue to prevent all logging, but the folders are created and therefore fail too. [Bug] Can not turn off logging to disk · Issue #23451 · ray-project/ray · GitHub