Check for store_code_state to store git-diff

This commit is contained in:
Farbod Farshidian 2024-02-07 10:53:31 -05:00
parent a1d25d1fef
commit e23bb6819a
1 changed files with 1 additions and 1 deletions

View File

@ -155,7 +155,7 @@ class OnPolicyRunner:
if it % self.save_interval == 0:
self.save(os.path.join(self.log_dir, f"model_{it}.pt"))
ep_infos.clear()
if it == start_iter:
if it == start_iter and self.cfg.get("store_code_state", True):
# obtain all the diff files
git_file_paths = store_code_state(self.log_dir, self.git_status_repos)
# if possible store them to wandb