awslabs / multi-model-server

Multi Model Server is a tool for serving neural net models for inference
Apache License 2.0
995 stars 231 forks source link

model-server-worker fails without "optional" arguments #909

Open johncolby opened 4 years ago

johncolby commented 4 years ago

Small bug in model-server-worker, which fails if the optional arguments handler, model-path, or model-name are not provided.

docstring:

Usage: model-server-worker [-h] --sock-type {unix,tcp} [--sock-name SOCK_NAME]
                           [--host HOST] [--port PORT] [--handler HANDLER]
                           [--model-path MODEL_PATH] [--model-name MODEL_NAME]
                           --preload-model PRELOAD_MODEL --tmp-dir TMP_DIR

When debugging custom service code, I usually invoke the model-server-worker manually like:

python model_service_worker.py --sock-type unix --sock-name /tmp/.mms.sock.9000 --preload-model false --tmp-dir /tmp

However, this fails under 1.1.0 due to the recent addition of the following argument encoding code, which fails when any of these arguments are None type:

https://github.com/awslabs/multi-model-server/blob/70e8f1f622dcc0a6619125a8a23309ebf568ffbc/mms/model_service_worker.py#L235-L237

johncolby commented 4 years ago

@alexgl-github Maybe can review wrt to your recent updates? thx.