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

Handle errors in findDepth endpoint #2

Open
Waidhoferj opened this issue Apr 11, 2021 · 2 comments
Open

Handle errors in findDepth endpoint #2

Waidhoferj opened this issue Apr 11, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Waidhoferj
Copy link
Member

The find depth functionality takes in a URL to an image stored in Cloudinary. It should download the image, run the depth estimation algorithm on it and return a 2D array of depth values. Most of this already works, but some edge cases aren't covered.

  • What if URL doesn't point to a valid Cloudinary resource (video instead of image)?
  • What if no URL is provided?
  • What if the model fails to process the time?

Handle these edge cases in the findDepth function in main.py

@Waidhoferj Waidhoferj added the enhancement New feature or request label Apr 11, 2021
@bjtat bjtat self-assigned this Apr 18, 2021
@snekiam
Copy link
Member

snekiam commented Apr 18, 2021

@bjtat this should help you get started on this:
You can run the server by running python3 main.py -l, which will use the local mocked database.
You can make a call to the API by using Postman, which I'd recommend as a nice GUI for making post/get requests - you can download it here

Here's my setup to hit the findDepth() function with a valid URL:
image

This should get you started running that function, and you'll be able to feed it bad URLs, stuff like that to test error handling - just change the raw data being provided by postman. I'm not sure if we have any non-image files in Cloudinary, but you could test with a non-cloudinary URL to a non-image resource (you can use this as an MP4 if you wanna test with non-images).

Let me know if you have any questions!

@snekiam
Copy link
Member

snekiam commented Apr 18, 2021

Timeouts might be something we have to define in Gunicorn, or whatever we use for our production hosting.

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

No branches or pull requests

5 participants