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

Error in results endpoints #1

Open
jmloyola opened this issue Nov 18, 2022 · 0 comments
Open

Error in results endpoints #1

jmloyola opened this issue Nov 18, 2022 · 0 comments

Comments

@jmloyola
Copy link
Owner

When calling the results endpoints (for example with curl -X GET "localhost:8000/results/gambling/all") an error may occur if any of the floats in the result is float('inf') or float('NaN').
The logs will show this error:

ValueError: Out of range float values are not JSON compliant

This is related to the way pydantic, in particular the model ExperimentResult in our code, handles the encoding of the floats.
Newer versions have tackle this problem (this PR).

You can upgrade the version of the packages and adapt the code, or you can use the endpoint curl -X GET "localhost:8000/graph/results/gambling" --output "graph_all_results.html" which does not use the model ExperimentResult.

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

1 participant