ValueError for RAML type `number` and value of `nan` or `inf`
schuderer opened this issue · 0 comments
schuderer commented
- ML Launchpad version: 1.0.0
- Model Type used: Python
- DataSource type(s) used: CSV
- Python version: 3.x
- Operating System: n/a
Description
Python and Numpy numeric formats allow for nan
of +/-inf
values.
But running the Iris example (tree_*) REST API with a numeric parameter like petal_width=nan
produces
ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
(a 505 in an WSGI application)
Steps to reproduce
cd examples
mllaunchpad -c tree_cfg.yml api
curl http://127.0.0.1:5000/iris/v0/mythings?sepal.length=5.6&sepal.width=2.7&petal.length=4.2&petal.width=nan
# --> ValueError: Input contains NaN, infinity or a value too large for dtype('float32').
(submitted for a user)