Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Fix misnamed model_url query parameter in openapi docs#1008

Open
mulhod wants to merge 2 commits intoawslabs:masterfrom
mulhod:feature/fix_misnamed_paramter_in_openapi_docs
Open

Fix misnamed model_url query parameter in openapi docs#1008
mulhod wants to merge 2 commits intoawslabs:masterfrom
mulhod:feature/fix_misnamed_paramter_in_openapi_docs

Conversation

@mulhod
Copy link
Copy Markdown

@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants