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

fix: pandas openAPI handle nulltype #3165

Merged
merged 1 commit into from Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/bentoml/_internal/io_descriptors/pandas.py
Expand Up @@ -356,6 +356,8 @@ def _convert_dtype(
return str(value)
elif isinstance(value, dict):
return {str(k): self._convert_dtype(v) for k, v in value.items()}
elif value is None:
return "null"
else:
logger.warning(f"{type(value)} is not yet supported.")
return None
Expand Down Expand Up @@ -822,6 +824,8 @@ def _convert_dtype(
return str(value)
elif isinstance(value, dict):
return {str(k): self._convert_dtype(v) for k, v in value.items()}
elif value is None:
return "null"
else:
logger.warning(f"{type(value)} is not yet supported.")
return None
Expand Down