Ray: How to manually change tensorboard event files with rllib

Created on 2 Oct 2019  路  5Comments  路  Source: ray-project/ray

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):"Ubuntu 16.04.6
  • Ray installed from (source or binary): binary
  • Ray version: 0.7.3
  • Python version:3.68
  • Exact command to reproduce:

Describe the problem

How can one change the default path "~/ray_results" where rllib stores the log files and event files of tensorboard.
I know that via Tune one can define this path via the parameter log_dir.

However I want to use Tune in combination with a trainable function and I do not manage to store the corresponding event files in the experiment folder defined via log_dir and Tune.

Source code / logs

Most helpful comment

You can technically set os.environ.get("TUNE_RESULT_DIR") if using RLlib. The other thing you should do is just report the results to the reporter (or tune.track.log) and then Tune should take care of the log_dir rerouting for you.

All 5 comments

Can you provide more info as to what you're trying to do?

If you want to use Tune in combination with a trainable function, why not just change log_dir?

Hi,
I used the parameter log_dir in tune. However the trainable function calls train function in Ray.

As I am not aware of a parameter like log_dir for ray (and not tune) the result is the following:

Tune does produce folders in the given log_dir path. However they are mainly empty.
The files generated by train in ray (e.g. the tensorboard event files) are saved in the default folder ~/ray_results.

So basically the question is: does there exist a parameter log_dir for ray (without using tune) to change the default path.

You can technically set os.environ.get("TUNE_RESULT_DIR") if using RLlib. The other thing you should do is just report the results to the reporter (or tune.track.log) and then Tune should take care of the log_dir rerouting for you.

it didn't work for me

I set "TUNE_RESULT_DIR" in system path and then it works. Thanks!
Seemingly set it in python will not work.

Was this page helpful?
0 / 5 - 0 ratings