-
Notifications
You must be signed in to change notification settings - Fork 8
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
Ferry API has null value types #17
Labels
bug
Something isn't working
Comments
For reference, I am getting the following error when when trying to call the API with data in these fields: File "/Users/samedwardes/projects/posit/ds-workflows-python-2024/materials/05-shiny-app/src/module_model_explorer.py", line 301, in predicted_delay_text
return f"{predict_delay()} minutes"
^^^^^^^^^^^^^^^
File "/Users/samedwardes/projects/posit/ds-workflows-python-2024/materials/05-shiny-app/.venv/lib/python3.12/site-packages/shiny/reactive/_reactives.py", line 284, in __call__
return _utils.run_coro_sync(self.get_value())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/samedwardes/projects/posit/ds-workflows-python-2024/materials/05-shiny-app/.venv/lib/python3.12/site-packages/shiny/_utils.py", line 381, in run_coro_sync
coro.send(None)
File "/Users/samedwardes/projects/posit/ds-workflows-python-2024/materials/05-shiny-app/.venv/lib/python3.12/site-packages/shiny/reactive/_reactives.py", line 294, in get_value
raise self._error[0]
File "/Users/samedwardes/projects/posit/ds-workflows-python-2024/materials/05-shiny-app/.venv/lib/python3.12/site-packages/shiny/reactive/_reactives.py", line 329, in _run_func
self._value.append(await self._fn())
^^^^^^^^^^^^^^^^
File "/Users/samedwardes/projects/posit/ds-workflows-python-2024/materials/05-shiny-app/.venv/lib/python3.12/site-packages/shiny/_utils.py", line 263, in fn_async
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/Users/samedwardes/projects/posit/ds-workflows-python-2024/materials/05-shiny-app/src/module_model_explorer.py", line 275, in predict_delay
prediction_results = predict(
^^^^^^^^
File "/Users/samedwardes/projects/posit/ds-workflows-python-2024/materials/05-shiny-app/.venv/lib/python3.12/site-packages/vetiver/server.py", line 348, in predict
raise TypeError(re.sub(r"\n", ": ", response.text))
TypeError: [{'type': 'none_required', 'loc': ('body', 0, 'PassengerOnly'), 'msg': 'Input should be None', 'input': False}, {'type': 'none_required', 'loc': ('body', 0, 'FastFerry'), 'msg': 'Input should be None', 'input': False}, {'type': 'none_required', 'loc': ('body', 0, 'departing_precipitation'), 'msg': 'Input should be None', 'input': 0}, {'type': 'none_required', 'loc': ('body', 0, 'arriving_precipitation'), 'msg': 'Input should be None', 'input': 0}] |
Oddly enough, it looks like the data going in has no nulls: from vetiver import VetiverModel
v = VetiverModel(
model, model_name=f"{username}/ferry_delay", prototype_data=X.to_pandas()
)
X.null_count()
shape: (1, 29)
X.to_pandas().isnull().sum()
I've redeployed the vetiver model a couple of times and the nulls do reproduce. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@brooklynbagel I noticed several of the model inputs have null value types:
PassengerOnly
FastFerry
arriving_precipitation
departing_precipitation
I think this could mean that there is no data in these fields. Can you please look into this?
The text was updated successfully, but these errors were encountered: