Logging Console Output when log_to_file=True

When setting tune.run (log_to_file=True) which generates the stdout and stderr files, API reference here, the output on the Console is not included in the stdout. Is this by design? Is there a setting/way to include the console output in the stdout file? At the moment I am using Tensorboard to see the metrics, and can confirm that whatever I include in logger.warning/debug goes to stderr and whatever custom prints I use go into stdout file, but nothing from the console makes it to stdout (except [INFO 2021-06-08 03:32:15,574] trainable.py: 101 Trainable.setup took 13.045 seconds. which is actually a logger info object).

I will appreciate if someone can let me know whether Console Outputs can be logged into stdout or some other file.

Thanks!

Right now, you would have to manually implement this with some teeing mechanism similar to (Redirect stdout to a file in Python? - Stack Overflow).

Can you file a feature request for this?

1 Like

thanks @rliaw , I will try to experiment with what you suggested and will file a feature request too. Thanks for your time.