Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix misnamed model_url query parameter in openapi docs #1008

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mulhod
Copy link

@mulhod mulhod commented Dec 29, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants