diff --git a/python/ray/tune/logger.py b/python/ray/tune/logger.py index 4b9d5a914aa1..895f4819e0c0 100644 --- a/python/ray/tune/logger.py +++ b/python/ray/tune/logger.py @@ -95,7 +95,12 @@ def update_config(self, config): self.config = config config_out = os.path.join(self.logdir, "params.json") with open(config_out, "w") as f: - json.dump(self.config, f, cls=_SafeFallbackEncoder) + json.dump( + self.config, + f, + indent=2, + sort_keys=True, + cls=_SafeFallbackEncoder) config_pkl = os.path.join(self.logdir, "params.pkl") with open(config_pkl, "wb") as f: cloudpickle.dump(self.config, f)