š DataChain Open-Source Release. Star us on !
Deploy a model to a target environment. Can use an existing deployment declaration or create a new one on-the-fly.
usage: mlem deployment run [-l <path>] [-m <path>] [--mp <path>]
[--mr <commitish>] [-p <path>]
[--rev <commitish>] [-h]The deployment run command creates a new deployment for a target environment.
One can either use an existing deployment declaration (created with
mlem declare deployment) or create a new one on-the-fly with various available
options (see below).
-l <path>, --load <path> - File to load deployment config from-m <path>, --model <path> - Path to MLEM model--mp <path>, --model-project <path> - Project with model--mr <commitish>, --model-rev <commitish> - Revision of model-p <path>, --project <path> - Path to MLEM project [default: (none)]--rev <commitish> - Repo revision to use [default: (none)]-h, --help - Show this message and exit.Here, we define an environment and then run a deployment on it, providing the deployment configuration on-the-fly
$ mlem declare env heroku staging --api_key=...
...
$ mlem deployment run service_name --model model --env staging --name=my_service
...Here, we define an environment, configure a deployment declaration on it using
mlem declare deployment, and then run our
deployment with a simple concise command which uses the existing pre-configured
deployment declaration
$ mlem declare env heroku staging --api_key=...
...
$ mlem declare deployment heroku service_name --app_name=my_service --model=model --env=staging
...
$ mlem deploy run service_name
...