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

URL prediction error #29

Closed
IgnacioHeredia opened this issue Feb 1, 2019 · 1 comment
Closed

URL prediction error #29

IgnacioHeredia opened this issue Feb 1, 2019 · 1 comment
Labels
bug Something isn't working invalid This doesn't seem right
Milestone

Comments

@IgnacioHeredia
Copy link
Collaborator

Description

Deepaas returns an error when trying to predict an url after having predicted a file.
If this same url is being predicted at the beginning, just after having launched deepaas (and before having predicted a local file), the prediction runs just fine.

Steps to Reproduce

This error has been found while using the image classification model but this should be model independent as it is a deepaas error.

  1. Launch deepaas
  2. Try to predict a local file. You should get a json dict with your prediction.
  3. Try to predict a URL.You get the following error:

image

400Undocumented | Error: BAD REQUEST
Response bodyDownload{ "message": "You must provide either 'url' or 'data' in the payload" }

Expected behavior:

If the url corresponded to an image you should get a json dict with the prediction from your model.

Actual behavior

Got a Bad Request error instead,

Versions

deepaas 0.2.1.dev1

@IgnacioHeredia IgnacioHeredia added the bug Something isn't working label Feb 1, 2019
@alvarolopez alvarolopez added this to the 0.3.0 milestone Feb 6, 2019
@alvarolopez alvarolopez added the invalid This doesn't seem right label Feb 7, 2019
@alvarolopez
Copy link
Collaborator

This is not a bug, but a limitation of the Swagger UI. If I understood it correctly you 1st performed a prediction using a file, then you made a prediction using the URL (both actions are done in a row, without reloading the page). The Swagger UI that Flask-RESTPlus provides us does not clean parameters that have been set between requests, therefore it is actually doing a prediction with two parameters (the leftover file, and the new URL). If you have a look before the 2nd call (i.e. with URL) you will see that the file is still there, thus the failure you get.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants