diff --git a/python/ray/tune/logger.py b/python/ray/tune/logger.py index d2c79e6d8..183ba6490 100644 --- a/python/ray/tune/logger.py +++ b/python/ray/tune/logger.py @@ -9,6 +9,7 @@ import numpy as np import os import yaml +import ray.cloudpickle as cloudpickle from ray.tune.log_sync import get_syncer from ray.tune.result import NODE_IP, TRAINING_ITERATION, TIME_TOTAL_S, \ TIMESTEPS_TOTAL @@ -103,6 +104,9 @@ class _JsonLogger(Logger): 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) local_file = os.path.join(self.logdir, "result.json") self.local_out = open(local_file, "w")