awslabs / multi-model-server

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

Fix misnamed model_url query parameter in openapi docs #1008

Open mulhod opened 1 year ago

mulhod commented 1 year ago

Issue #, if available: no issue

Description of changes:

The openapi documentation claims that there is a model_url query parameter for the /models/ POST endpoint. However, it appears the parameter name is actually just url.

Observe:

❯ curl -X POST http://127.0.0.1:8080/models/\?model_name\=test_2.0\&model_url\=/opt/ml/model/test_2.0
{
  "code": 400,
  "type": "BadRequestException",
  "message": "Parameter url is required."
}

If model_url is changed to url, this works, however:

❯ curl -X POST http://127.0.0.1:8080/models/\?model_name\=test_2.0\&url\=/opt/ml/model/test_2.0
{
  "status": "Workers scaled"
}

Furthermore, this seems to be how it's even used in tests, e.g., here.

Testing done:

I can set up a local environment to test this, but it's just a change to documentation, basically.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.