I’m trying to save a custom NP array at the end of each episode. I created a callback like:
def on_episode_end(self, *, worker, base_env, policies, episode, env_index, **kwargs): envs = base_env.get_unwrapped() episode.custom_metrics["rollout_arrays"] = [ env.gat_arr() for env in envs ]
and then in a custom logger:
def log_trial_result(self, iteration, trial, result): # save rollout_arrays from result
But the data in
custom_metrics seems to be processed and not passed in directly to the logger. What would be the best way to handle this?