Check out our new VS Code extension for experiment tracking and model development
Deploy a model to target environment. Can use existing deployment declaration or create a new one on-the-fly.
def deploy(
deploy_meta_or_path: Union[MlemDeploy, str],
model: Union[MlemModel, str] = None,
env: Union[MlemEnv, str] = None,
project: Optional[str] = None,
fs: Optional[AbstractFileSystem] = None,
external: bool = None,
index: bool = None,
**deploy_kwargs,
) -> MlemDeploy
This API is the underlying mechanism for the mlem deployment run command and provides a programmatic way to create deployments for a target environment.
deploy_meta_or_path
(required) - Path to deployment meta (will be
created if it does not exist)model
(optional) - Path to modelenv
(optional) - Path to target environmentproject
(optional) - Path to MLEM projectfs
(optional) - filesystem to load deploy meta from. If not provided, will
be inferred from deploy_meta_or_path
external
(optional) - Save result not in mlem dir, but directly in projectindex
(optional) - Whether to index output in .mlem directorydeploy_kwargs
(optional) - Configuration for new deployment meta if it does
not existMlemObjectNotFound
- Thrown if we can't find MLEM objectValueError
- Please provide model and env args for new deployment