nvflare.tool.cli_schema module
- handle_schema_flag(parser: ArgumentParser, command: str, examples: List[str], args_list: List[str], deprecated: bool = False, deprecated_message: str = '', streaming: bool | None = None, output_modes: List[str] | None = None, mutating: bool | None = None, idempotent: bool | None = None, retry_token: dict | None = None) None[source]
Handle the pre-parse –schema fast path.
This must run before parser.parse_args() because many commands want schema discovery even when the rest of the required arguments are absent.
- parser_to_schema(parser: ArgumentParser, command: str, examples: List[str] | None = None, deprecated: bool = False, deprecated_message: str = '', streaming: bool | None = None, output_modes: List[str] | None = None, mutating: bool | None = None, idempotent: bool | None = None, retry_token: dict | None = None) dict[source]
Serialize an argparse parser to a JSON-compatible schema dict.