Skip to content

Commit

Permalink
Rely on launcher check_run_status to pause/resume hb (#2502)
Browse files Browse the repository at this point in the history
Co-authored-by: Chester Chen <512707+chesterxgchen@users.noreply.github.com>
  • Loading branch information
YuanTingHsieh and chesterxgchen authored Apr 17, 2024
1 parent 08ac13f commit 44af5de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions nvflare/app_common/executors/launcher_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,6 @@ def _monitor_launcher(self, fl_ctx: FLContext):
if self.launcher is None:
break

# no task is running
if self._current_task is None:
continue

task_name = self._current_task
run_status = self._execute_launcher_method_in_thread_executor(
method_name="check_run_status",
Expand Down
2 changes: 1 addition & 1 deletion nvflare/app_common/executors/task_exchanger.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def execute(self, task_name: str, shareable: Shareable, fl_ctx: FLContext, abort
task_id = shareable.get_header(key=FLContextKey.TASK_ID)

# send to peer
self.log_debug(fl_ctx, f"sending task to peer {self.peer_read_timeout=}")
self.log_info(fl_ctx, f"sending task to peer {self.peer_read_timeout=}")
req = Message.new_request(topic=task_name, data=shareable, msg_id=task_id)
start_time = time.time()
has_been_read = self.pipe_handler.send_to_peer(req, timeout=self.peer_read_timeout, abort_signal=abort_signal)
Expand Down

0 comments on commit 44af5de

Please sign in to comment.