Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
PR review feedback implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
grace-omotoso authored and akainth015 committed Apr 8, 2021
1 parent 5fdea84 commit a9764f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion vissl/trainer/trainer_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ def train(self):
logging.info("CUDA cache cleared")
task = train_step_fn(task)
iteration_num += 1
task.local_iteration_num = task.event_storage.iter = iteration_num
task.local_iteration_num = iteration_num
task.event_storage.iter = iteration_num
task.run_hooks(SSLClassyHookFunctions.on_step.name)
except StopIteration:
break
Expand Down
2 changes: 1 addition & 1 deletion vissl/utils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def save_file(data, filename):
with PathManager.open(filename, "wb") as fopen:
np.save(fopen, data)
elif file_ext == ".json":
with PathManager.open(filename, "a") as fopen:
with PathManager.open(filename, "w") as fopen:
fopen.write(json.dumps(data, sort_keys=True) + "\n")
fopen.flush()
else:
Expand Down

0 comments on commit a9764f1

Please sign in to comment.