0

I'm running an Experiment with multiple trials and I would like to log the STDOUT for the process for each trial in a file in the directory created in ray_results for that trial.

I have set log_to_driver to false since the driver couldn't keep up and I have set redirect_worker_output to true but that doesn't seem to result in what I want either.

Perhaps there is an option in ray.tune.run? I have set verbose=2 but that doesn't work.

Lubed Up Slug
  • 168
  • 1
  • 11
  • Would it be possible to simply set `sys.stdout` to an open file? – richliaw Jul 08 '19 at 07:59
  • That's what I ended up doing. I just thought that `redirect_worker_output` [would do that](https://github.com/ray-project/ray/blob/c2349cf12daac0b831f54d6baa2117d9f6923655/python/ray/parameter.py#L41). What is the intended purpose of that argument? – Lubed Up Slug Jul 15 '19 at 01:17
  • Is it possible to get the directory of the current trial from the `reporter`? – Lubed Up Slug Jul 19 '19 at 03:25
  • redirect_worker_output is deprecated; but I also think the logging mechanisms need to be improved (but this is a ray core issue). You can get `os.getcwd` to access the directory. – richliaw Jul 20 '19 at 01:15
  • oh that's interesting I didn't know `ray` used the trial directory as the working directory for the newly created trial processes – Lubed Up Slug Jul 22 '19 at 16:40
  • yeah, we'll fix the docs so that it's clearer – richliaw Jul 22 '19 at 18:32

0 Answers0