def export(
    model_tag: str,
    out_path: str,
    model_store: ModelStore = Provide[BentoMLContainer.model_store],
) -> None:  # type: ignore (not accessed)
    """Export a Model to an external archive file

    arguments:

    \b
    MODEL_TAG: model identifier
    OUT_PATH: output path of exported model.
        If this argument is not provided, model is exported to name-version.bentomodel in the current directory.
        Besides native .bentomodel format, we also support formats like tar('tar'), tar.gz ('gz'), tar.xz ('xz'), tar.bz2 ('bz2'), and zip.

    examples:

    \b
    bentoml models export FraudDetector:latest
    bentoml models export FraudDetector:latest ./my_model.bentomodel
    bentoml models export FraudDetector:20210709_DE14C9 ./my_model.bentomodel
    bentoml models export FraudDetector:20210709_DE14C9 s3://mybucket/models/my_model.bentomodel
    """
    bentomodel = model_store.get(model_tag)
    out_path = bentomodel.export(out_path)
    rich.print(f"[green]{bentomodel}[/] exported to {out_path}.")
Export a Model to an external archive file

arguments:

\b
MODEL_TAG: model identifier
OUT_PATH: output path of exported model.
If this argument is not provided, model is exported to name-version.bentomodel in the current directory.
Besides native .bentomodel format, we also support formats like tar('tar'), tar.gz ('gz'), tar.xz ('xz'), tar.bz2 ('bz2'), and zip.

examples:

\b
bentoml models export FraudDetector:latest
bentoml models export FraudDetector:latest ./my_model.bentomodel
bentoml models export FraudDetector:20210709_DE14C9 ./my_model.bentomodel
bentoml models export FraudDetector:20210709_DE14C9 s3://mybucket/models/my_model.bentomodel
src/bentoml_cli/models.py