The biggest change in release 0.6.0 is revamped BentoML CLI, introducing new model/deployment management commands and new syntax for CLI inferencing.
- New commands for managing your model repository:
> bentoml list
BENTO_SERVICE CREATED_AT APIS ARTIFACTS
IrisClassifier:20200123004254_CB6865 2020-01-23 08:43 predict::DataframeHandler model::SklearnModelArtifact
IrisClassifier:20200122010013_E0292E 2020-01-22 09:00 predict::DataframeHandler clf::PickleArtifact
> bentoml get IrisClassifier
> bentoml get IrisClassifier:20200123004254_CB6865
> bentoml get IrisClassifier:latest
- Add support for using saved BentoServices by
name:version
tag instead of {saved_path}, here are some example commands:
> bentoml serve {saved_path}
> bentoml serve IrisClassifier:latest
> bentoml serve IrisClassifier:20200123004254_CB6865
> bentoml run IrisClassifier:latest predict --input='[[5.1, 3.5, 1.4, 0.2]]'
> bentoml get IrisClassifier:latest
- Separated deployment commands to sub-commands
AWS Lambda model serving deployment:
https://docs.bentoml.org/en/latest/deployment/aws_lambda.html
AWS Sagemaker model serving deployment:
https://docs.bentoml.org/en/latest/deployment/aws_sagemaker.html
- Breaking Change: Improved
bentoml run
command for inferencing from CLI
Changing from:
> bentoml {API_NAME} {saved_path} {run_args}
> bentoml predict {saved_path} --input=my_test_data.csvo:
To:
> bentoml run {BENTO/saved_path} {API_NAME} {run_args}
> bentoml run IrisClassifier:latest predict --input='[[1,2,3,4]]'
previous users can directly use the API name as the command to load and run a model API from cli, it looks like this: bentoml predict {saved_path} --input=my_test_data.csv
. The problem is that the API names are dynamically loaded and this makes it hard for bentoml command to provide useful --help
docs. And the default command
workaround with Click, makes it very confusing when the user types a wrong command. So we decided to make this change.
- Breaking Change:
--quiet
and--verbose
options position
Previously both --quiet
and --verbose
options must follow immediately after bentoml
command, now they are being added to options list of all subcommands.
If you are using these two options, you will need to change your CLI from:
> bentoml --verbose serve ...
To:
> bentoml serve ... --verbose