Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
output log fix (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
farizrahman4u committed Sep 16, 2020
1 parent 215e853 commit cea3358
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion wandb/sdk/wandb_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,4 +1521,8 @@ def write(self, *args, **kargs):
self.lock.release()

def close(self):
self.f.close()
self.lock.acquire() # wait for pending writes
try:
self.f.close()
finally:
self.lock.release()
6 changes: 5 additions & 1 deletion wandb/sdk_py27/wandb_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,4 +1521,8 @@ def write(self, *args, **kargs):
self.lock.release()

def close(self):
self.f.close()
self.lock.acquire() # wait for pending writes
try:
self.f.close()
finally:
self.lock.release()

0 comments on commit cea3358

Please sign in to comment.