Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docstring to reliable message #2788

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions nvflare/apis/utils/reliable_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,20 +467,23 @@ def send_request(
abort_signal: Signal,
fl_ctx: FLContext,
) -> Shareable:
"""Send a reliable request.
"""Send a request reliably.

Args:
target: the target cell of this request
topic: topic of the request;
request: the request to be sent
per_msg_timeout: timeout when sending a message
tx_timeout: the timeout of the whole transaction
abort_signal: abort signal
fl_ctx: the FL context
target: The target cell of this request.
topic: The topic of the request.
request: The request to be sent.
per_msg_timeout (float): Number of seconds to wait for each message before timing out.
tx_timeout (float): Timeout for the entire transaction.
abort_signal (Signal): Signal to abort the request.
fl_ctx (FLContext): Context for federated learning.

Returns: reply from the peer.
Returns:
The reply from the peer.

If tx_timeout is not specified or <= per_msg_timeout, the request will be sent only once without retrying.
Note:
If `tx_timeout` is not specified or is less than or equal to `per_msg_timeout`,
the request will be sent only once without retrying.

"""
check_positive_number("per_msg_timeout", per_msg_timeout)
Expand Down
Loading