Add an option to use json log for tune.Analysis

Currently, tune.Analysis uses the csv log. Could you add an option to use the json log instead?

The reason behind this request is that the csv logger does not support dynamic keys. For example, if I log {‘A’: 1} in the first iteration and {‘A’: 2, ‘B’: 3} in the second iteration, the csv log file will only contain ‘A’. The json logger does not seem to have such a limitation.

Of course, a workaround would be to use placeholders when part of the log is not available in the current iteration, such as {‘A’: 1, ‘B’: None}. But this is a little bit inconvenient. Since the json logger logs everything anyway, I think it makes sense to provide an option to tune.Analysis so that users can load and analyze their logs conveniently.

Thank you very much! :slight_smile:

This sounds like a reasonable request, thoughts @rliaw?

Sounds great. I created an issue to track this request: [tune] allow Analysis to load from json · Issue #14390 · ray-project/ray · GitHub