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

Index out of range #24

Open
zarabash opened this issue Nov 26, 2021 · 2 comments
Open

Index out of range #24

zarabash opened this issue Nov 26, 2021 · 2 comments

Comments

@zarabash
Copy link

Hello, I am using your guide for an obesity dataset. Everything works fine on local. But when I deployed on PaaS, I keep getting this error whenever I want to post for a prediction:

IndexError at /obesity/v1/comorbidities_classifier/predict
list index out of range

And it is referring to line "algorithm_object = registry.endpoints[algs[0].id]"

Can you perhaps guide me on this? Thanks.

@pplonski
Copy link
Owner

Hi, could you please add print with algs and endpoints before the line with error to check what is inside them? Probably one of them is empty.

@zarabash
Copy link
Author

Hey thanks for your reply. I got these

alg_index 0
algorithm_status 'production'
algorithm_version None
algs <QuerySet [<MLAlgorithm: MLAlgorithm object (15)>, <MLAlgorithm: MLAlgorithm object (16)>, <MLAlgorithm: MLAlgorithm object (17)>, <MLAlgorithm: MLAlgorithm object (18)>]>
endpoint_name 'comorbidities_classifier'
format None
request <rest_framework.request.Request: POST '/obesity/v1/comorbidities_classifier/predict'>
self <obesityendpoints.views.PredictView object at 0x7f0f2bba47f0>

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

No branches or pull requests

2 participants