18 KiB
title
| title |
|---|
| ClearML Serving CLI |
The clearml-serving utility is a CLI tool for model deployment and orchestration.
The following page provides a reference for clearml-serving's CLI commands:
- list - List running Serving Services
- create - Create a new Serving Service
- metrics - Configure inference metrics Service
- config - Configure a new Serving Service
- model - Configure model endpoints for a running Service
Global Parameters
clearml-serving [-h] [--debug] [--yes] [--id ID] {list,create,metrics,config,model}
:::info Service ID
The Serving Service's ID (--id) is required to execute the metrics, config, and model commands.
:::
list
List running Serving Services.
clearml-serving list [-h]
create
Create a new Serving Service.
clearml-serving create [-h] [--name NAME] [--tags TAGS [TAGS ...]] [--project PROJECT]
Parameters
metrics
Configure inference metrics Service.
clearml-serving metrics [-h] {add,remove,list}
add
Add/modify metric for a specific endpoint.
clearml-serving metrics add [-h] --endpoint ENDPOINT [--log-freq LOG_FREQ]
[--variable-scalar VARIABLE_SCALAR [VARIABLE_SCALAR ...]]
[--variable-enum VARIABLE_ENUM [VARIABLE_ENUM ...]]
[--variable-value VARIABLE_VALUE [VARIABLE_VALUE ...]]
Parameters
| Name | Description | Mandatory |
|---|---|---|
--endpoint |
Metric endpoint name including version (e.g. "model/1" or a prefix "model/*"). Notice: it will override any previous endpoint logged metrics |
|
--log-freq |
Logging request frequency, between 0.0 to 1.0. Example: 1.0 means all requests are logged, 0.5 means half of the requests are logged if not specified. To use global logging frequency, see config --metric-log-freq |
|
--variable-scalar |
Add float (scalar) argument to the metric logger, <name>=<histogram>. Example: with specific buckets: "x1=0,0.2,0.4,0.6,0.8,1" or with min/max/num_buckets "x1=0.0/1.0/5". Notice: In cases where 1000s of requests per second reach the serving, it makes no sense to display every datapoint. So scalars can be divided in buckets, and for each minute for example. Then it's possible to calculate what % of the total traffic fell in bucket 1, bucket 2, bucket 3 etc. The Y axis represents the buckets, color is the value in % of traffic in that bucket, and X is time. |
|
--variable-enum |
Add enum (string) argument to the metric logger, <name>=<optional_values>. Example: "detect=cat,dog,sheep" |
|
--variable-value |
Add non-samples scalar argument to the metric logger, <name>. Example: "latency" |
remove
Remove metric from a specific endpoint.
clearml-serving metrics remove [-h] [--endpoint ENDPOINT]
[--variable VARIABLE [VARIABLE ...]]
Parameters
list
List metrics logged on all endpoints.
clearml-serving metrics list [-h]
config
Configure a new Serving Service.
clearml-serving config [-h] [--base-serving-url BASE_SERVING_URL]
[--triton-grpc-server TRITON_GRPC_SERVER]
[--kafka-metric-server KAFKA_METRIC_SERVER]
[--metric-log-freq METRIC_LOG_FREQ]
Parameters
model
Configure model endpoints for an already running Service.
clearml-serving model [-h] {list,remove,upload,canary,auto-update,add}
list
List current models.
clearml-serving model list [-h]
remove
Remove model by its endpoint name.
clearml-serving model remove [-h] [--endpoint ENDPOINT]
Parameter
upload
Upload and register model files/folder.
clearml-serving model upload [-h] --name NAME [--tags TAGS [TAGS ...]] --project PROJECT
[--framework {tensorflow,tensorflowjs,tensorflowlite,pytorch,torchscript,caffe,caffe2,onnx,keras,mknet,cntk,torch,darknet,paddlepaddle,scikitlearn,xgboost,lightgbm,parquet,megengine,catboost,tensorrt,openvino,custom}]
[--publish] [--path PATH] [--url URL]
[--destination DESTINATION]
Parameters
canary
Add model Canary/A/B endpoint.
clearml-serving model canary [-h] [--endpoint ENDPOINT] [--weights WEIGHTS [WEIGHTS ...]]
[--input-endpoints INPUT_ENDPOINTS [INPUT_ENDPOINTS ...]]
[--input-endpoint-prefix INPUT_ENDPOINT_PREFIX]
Parameters
auto-update
Add/Modify model auto-update service.
clearml-serving model auto-update [-h] [--endpoint ENDPOINT] --engine ENGINE
[--max-versions MAX_VERSIONS] [--name NAME]
[--tags TAGS [TAGS ...]] [--project PROJECT]
[--published] [--preprocess PREPROCESS]
[--input-size INPUT_SIZE [INPUT_SIZE ...]]
[--input-type INPUT_TYPE] [--input-name INPUT_NAME]
[--output-size OUTPUT_SIZE [OUTPUT_SIZE ...]]
[--output_type OUTPUT_TYPE] [--output-name OUTPUT_NAME]
[--aux-config AUX_CONFIG [AUX_CONFIG ...]]
Parameters
add
Add/Update model.
clearml-serving model add [-h] --engine ENGINE --endpoint ENDPOINT [--version VERSION]
[--model-id MODEL_ID] [--preprocess PREPROCESS]
[--input-size INPUT_SIZE [INPUT_SIZE ...]]
[--input-type INPUT_TYPE] [--input-name INPUT_NAME]
[--output-size OUTPUT_SIZE [OUTPUT_SIZE ...]]
[--output-type OUTPUT_TYPE] [--output-name OUTPUT_NAME]
[--aux-config AUX_CONFIG [AUX_CONFIG ...]] [--name NAME]
[--tags TAGS [TAGS ...]] [--project PROJECT] [--published]
Parameters