mirror of
https://github.com/gryf/coach.git
synced 2025-12-17 11:10:20 +01:00
Fixes for having NumpySharedRunningStats syncing on multi-node (#139)
1. Having the standard checkpoint prefix in order for the data store to grab it, and sync it to S3. 2. Removing the reference to Redis so that it won't try to pickle that in. 3. Enable restoring a checkpoint into a single-worker run, which was saved by a single-node-multiple-worker run.
This commit is contained in:
@@ -203,7 +203,7 @@ class NECAgent(ValueOptimizationAgent):
|
||||
self.networks['main'].online_network.output_heads[0].DND.add(self.current_episode_state_embeddings,
|
||||
actions, discounted_rewards)
|
||||
|
||||
def save_checkpoint(self, checkpoint_id):
|
||||
super().save_checkpoint(checkpoint_id)
|
||||
with open(os.path.join(self.ap.task_parameters.checkpoint_save_dir, str(checkpoint_id) + '.dnd'), 'wb') as f:
|
||||
def save_checkpoint(self, checkpoint_prefix):
|
||||
super().save_checkpoint(checkpoint_prefix)
|
||||
with open(os.path.join(self.ap.task_parameters.checkpoint_save_dir, str(checkpoint_prefix) + '.dnd'), 'wb') as f:
|
||||
pickle.dump(self.networks['main'].online_network.output_heads[0].DND, f, pickle.HIGHEST_PROTOCOL)
|
||||
|
||||
Reference in New Issue
Block a user