emmi_inference.cli ================== .. py:module:: emmi_inference.cli Attributes ---------- .. autoapisummary:: emmi_inference.cli.RICH_MARKUP_MODE emmi_inference.cli.CONTEXT_SETTINGS emmi_inference.cli.app Functions --------- .. autoapisummary:: emmi_inference.cli.main emmi_inference.cli.run Module Contents --------------- .. py:data:: RICH_MARKUP_MODE :type: Literal['markdown', 'rich'] :value: 'rich' .. py:data:: CONTEXT_SETTINGS .. py:data:: app .. py:function:: main(debug = typer.Option(False, '--debug', help='Enable debug logging')) CLI entry hook to configure logging and ensure loaders are registered. :param debug: If True, enables verbose logging and leaves third-party logs unsuppressed. If False, reduces external noise. .. py:function:: run(config_path = typer.Argument(...), model_type = typer.Argument(...), model_path = typer.Argument(..., exists=True, dir_okay=False, file_okay=True, help='Path to model .pt/.pth/.th'), device = typer.Option(DeviceEnum.AUTO, '--device', '-d', case_sensitive=False), autocast = typer.Option(False, '--autocast/--no-autocast'), dtype = typer.Option(None, '--dtype', help='float16|bfloat16|float32|float64'), destination = typer.Option(None, '--destination', case_sensitive=True, help="Output destination. Can be a local path (e.g., './results') or a remote URI (e.g., 's3://bucket/key'). If not set, uses 'save_dir' from the config file for local-only output."), upload_mode = typer.Option(UploadMode.SPOOL, '--upload-mode', case_sensitive=False, help='Upload mode when --destination is set.'), remove_local_spool = typer.Option(False, '--remove-local-spool', help='Remove local spool/cache after successful upload.'), upload_batch_size = typer.Option(100, '--upload-batch-size', help="Batch size for 'spool' mode uploads."), upload_workers = typer.Option(8, '--upload-workers', help='Number of parallel upload workers.')) Run inference based on the input config and the provided arguments. :param config_path: Path to config file (YAML) to use. :param model_type: A string name of the model type to use. :param model_path: Path to the model checkpoint. :param device: Device to use. Defaults to "auto". :param autocast: Either or not autocast to be enabled. Works only for CUDA. Defaults to False. :param dtype: Datatype to use. Defaults to None. :param destination: Output destination. Can be a local path (e.g., './results') or a remote URI (e.g., 's3://bucket/key'). If not set, uses 'save_dir' from the config file for local-only output. :param upload_mode: Upload mode when `destination` is set. Defaults to 'spool'. :param remove_local_spool: Remove local spool/cache after successful upload. :param upload_batch_size: Batch size for 'spool' mode uploads. :param upload_workers: Number of parallel upload workers.