nvflare.collab.api.group module
- class Group(app, abort_signal: Signal, proxies: List[Proxy], call_opt: CallOption | None = None, process_resp_cb=None, **cb_kwargs)[source]
Bases:
objectA Group is a group of remote apps to be called.
- Parameters:
app – the calling app.
abort_signal – signal to abort execution.
proxies – proxies of the remote apps to be called.
call_opt – call option that specifies call behavior
process_resp_cb – callback function to be called to process responses from remote apps.
**cb_kwargs – kwargs passed to process_resp_cb.
- property members
Returns the members of the group, which is the list of all remote apps to be called.
Returns: the members of the group
- property size
Size of the group, which is the number of remote apps to be called.
Returns: size of the group.
- group(ctx: Context, proxies: List[Proxy], call_opt: CallOption | None = None, process_resp_cb=None, **cb_kwargs)[source]
This is a convenience method for creating a group.
- Parameters:
ctx – call context.
proxies – list of proxies.
call_opt – call option that defines call behavior.
process_resp_cb – callback to be called to process response from remote site.
**cb_kwargs – kwargs to be passed to the CB.
Returns: a Group object.