Skip to content

Commit a3fb1e5

Browse files
Add docstring to reliable message (#2788)
1 parent 47e6fe4 commit a3fb1e5

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

nvflare/apis/utils/reliable_message.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -467,20 +467,23 @@ def send_request(
467467
abort_signal: Signal,
468468
fl_ctx: FLContext,
469469
) -> Shareable:
470-
"""Send a reliable request.
470+
"""Send a request reliably.
471471
472472
Args:
473-
target: the target cell of this request
474-
topic: topic of the request;
475-
request: the request to be sent
476-
per_msg_timeout: timeout when sending a message
477-
tx_timeout: the timeout of the whole transaction
478-
abort_signal: abort signal
479-
fl_ctx: the FL context
473+
target: The target cell of this request.
474+
topic: The topic of the request.
475+
request: The request to be sent.
476+
per_msg_timeout (float): Number of seconds to wait for each message before timing out.
477+
tx_timeout (float): Timeout for the entire transaction.
478+
abort_signal (Signal): Signal to abort the request.
479+
fl_ctx (FLContext): Context for federated learning.
480480
481-
Returns: reply from the peer.
481+
Returns:
482+
The reply from the peer.
482483
483-
If tx_timeout is not specified or <= per_msg_timeout, the request will be sent only once without retrying.
484+
Note:
485+
If `tx_timeout` is not specified or is less than or equal to `per_msg_timeout`,
486+
the request will be sent only once without retrying.
484487
485488
"""
486489
check_positive_number("per_msg_timeout", per_msg_timeout)

0 commit comments

Comments
 (0)