Skip to content

Commit

Permalink
fix: pandas openAPI handle nulltype (#3165)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Oct 31, 2022
1 parent 541b533 commit 92461d7
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit 92461d7

Please sign in to comment.