nvflare.app_common.tie.cli_applet module¶
- class CLIApplet[source]¶
Bases:
Applet
,ABC
Constructor of CLIApplet, which runs the applet as a subprocess started with CLI command.
- abstract get_command(app_ctx: dict) CommandDescriptor [source]¶
Subclass must implement this method to return the CLI command to be executed.
- Parameters:
app_ctx – the applet context that contains execution env info
Returns: a CommandDescriptor that describes the CLI command
- is_stopped() -> (<class 'bool'>, <class 'int'>)[source]¶
Called to check whether the applet is already stopped.
Returns: whether the applet is stopped, and the exit code if stopped.