mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 21:38:18 +08:00
Automatically indent tune logger params (#3399)
This commit is contained in:
committed by
Eric Liang
parent
c46ea2ff4b
commit
7e319dbf0c
@@ -97,7 +97,12 @@ class _JsonLogger(Logger):
|
||||
def _init(self):
|
||||
config_out = os.path.join(self.logdir, "params.json")
|
||||
with open(config_out, "w") as f:
|
||||
json.dump(self.config, f, sort_keys=True, cls=_SafeFallbackEncoder)
|
||||
json.dump(
|
||||
self.config,
|
||||
f,
|
||||
indent=2,
|
||||
sort_keys=True,
|
||||
cls=_SafeFallbackEncoder)
|
||||
local_file = os.path.join(self.logdir, "result.json")
|
||||
self.local_out = open(local_file, "w")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user