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

Commit

Permalink
Make file_pusher block like it promised
Browse files Browse the repository at this point in the history
  • Loading branch information
raubitsj committed Aug 7, 2020
1 parent b24c416 commit e6cb00a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 2 additions & 0 deletions wandb/internal/file_pusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def commit_artifact(self, artifact_id, on_commit=None):

def finish(self):
self._incoming_queue.put(step_checksum.RequestFinish())
while self.is_alive():
time.sleep(0.2)

def is_alive(self):
return (self._step_checksum.is_alive()
Expand Down
7 changes: 1 addition & 6 deletions wandb/internal/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ def handle_final(self, data):

if self._pusher:
self._pusher.finish()
# TODO: move this into pusher.finish()
while self._pusher.is_alive():
time.sleep(0.1)

if self._fs:
# TODO(jhr): now is a good time to output pending output lines
Expand All @@ -157,9 +154,7 @@ def handle_final(self, data):
# TODO(david): this info should be in exit_result footer?
if self._pusher:
self._pusher.print_status()

# Dont let anyone else touch pusher
self._pusher = None
self._pusher = None

def handle_run(self, data):
run = data.run
Expand Down

0 comments on commit e6cb00a

Please sign in to comment.