mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00
[tune] Pretty print params json in logger.py (#4903)
This commit is contained in:
parent
9aa1cd613d
commit
88bab5d3c4
1 changed files with 6 additions and 1 deletions
|
@ -95,7 +95,12 @@ class JsonLogger(Logger):
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue