mirror of
https://github.com/clearml/clearml-serving
synced 2025-02-07 13:22:16 +00:00
Update readme.md
This commit is contained in:
parent
a49fa0321e
commit
f2f0c07c38
@ -16,15 +16,19 @@ The output will be a model created on the project "serving examples", by the nam
|
|||||||
|
|
||||||
2. Create model endpoint:
|
2. Create model endpoint:
|
||||||
|
|
||||||
3. `clearml-serving --id <service_id> model add --engine lightgbm --endpoint "test_model_lgbm" --preprocess "examples/lightgbm/preprocess.py" --name "train lightgbm model" --project "serving examples"`
|
`clearml-serving --id <service_id> model add --engine lightgbm --endpoint "test_model_lgbm" --preprocess "examples/lightgbm/preprocess.py" --name "train lightgbm model" --project "serving examples"`
|
||||||
|
|
||||||
Or auto-update
|
Or auto-update
|
||||||
|
|
||||||
`clearml-serving --id <service_id> model auto-update --engine lightgbm --endpoint "test_model_auto" --preprocess "examples/lightgbm/preprocess.py" --name "train lightgbm model" --project "serving examples" --max-versions 2`
|
`clearml-serving --id <service_id> model auto-update --engine lightgbm --endpoint "test_model_auto" --preprocess "examples/lightgbm/preprocess.py" --name "train lightgbm model" --project "serving examples" --max-versions 2`
|
||||||
|
|
||||||
Or add Canary endpoint
|
Or add Canary endpoint
|
||||||
|
|
||||||
`clearml-serving --id <service_id> model canary --endpoint "test_model_auto" --weights 0.1 0.9 --input-endpoint-prefix test_model_auto`
|
`clearml-serving --id <service_id> model canary --endpoint "test_model_auto" --weights 0.1 0.9 --input-endpoint-prefix test_model_auto`
|
||||||
|
|
||||||
4. Run the clearml-serving container `docker run -v ~/clearml.conf:/root/clearml.conf -p 8080:8080 -e CLEARML_SERVING_TASK_ID=<service_id> clearml-serving:latest`
|
3. Run the clearml-serving container `docker run -v ~/clearml.conf:/root/clearml.conf -p 8080:8080 -e CLEARML_SERVING_TASK_ID=<service_id> clearml-serving:latest`
|
||||||
|
|
||||||
5. Test new endpoint: `curl -X POST "http://127.0.0.1:8080/serve/test_model_lgbm" -H "accept: application/json" -H "Content-Type: application/json" -d '{"x0": 1, "x1": 2, "x2": 3, "x3": 4}'`
|
4. Test new endpoint: `curl -X POST "http://127.0.0.1:8080/serve/test_model_lgbm" -H "accept: application/json" -H "Content-Type: application/json" -d '{"x0": 1, "x1": 2, "x2": 3, "x3": 4}'`
|
||||||
|
|
||||||
> **_Notice:_** You can also change the serving service while it is already running!
|
> **_Notice:_** You can also change the serving service while it is already running!
|
||||||
This includes adding/removing endpoints, adding canary model routing etc.
|
This includes adding/removing endpoints, adding canary model routing etc.
|
||||||
|
Loading…
Reference in New Issue
Block a user