Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
johncolby opened this issue Apr 24, 2020 · 1 comment · May be fixed by #910
Open

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

johncolby opened this issue Apr 24, 2020 · 1 comment · May be fixed by #910

Comments

@johncolby
Copy link

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:

model_req["handler"] = args.handler.encode('utf-8')
model_req["modelPath"] = args.model_path.encode('utf-8')
model_req["modelName"] = args.model_name.encode('utf-8')

johncolby added a commit to johncolby/multi-model-server that referenced this issue Apr 24, 2020
@johncolby
Copy link
Author

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

@johncolby johncolby linked a pull request Apr 24, 2020 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
1 participant