You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just discovered that if I use a custom resolver in parameters, (using it in catalog have no problem) kedro-viz die. The object returned is not friendly for kedro-viz
"polars": lambda x: getattr(pl, x)
pydantic_core._pydantic_core.PydanticSerializationError: Unable to serialize unknown type: <class 'polars.datatypes.classes.DataTypeClass'>
2024-07-30 09:15:55,489 - uvicorn.error - ERROR - Exception in ASGI application
Any workaround? Could be a bad practice to have parameters of type polars.datatypes.classes.DataTypeClass ?
Now Float64 is not serializable by pydantic when it is sent as json to frontend. We either need to make str(Float64) or see what to do in case the parameter value is an object.
Expected Result
Kedro-Viz should handle parameter values of object types and do not crash
Actual Result
Kedro-Viz throws and error and does not start.
pydantic_core._pydantic_core.PydanticSerializationError: Unable to serialize unknown type: <class 'polars.datatypes.classes.DataTypeClass'>
2024-07-30 09:15:55,489 - uvicorn.error - ERROR - Exception in ASGI application
Your Environment
Include as many relevant details as possible about the environment you experienced the bug in:
Web browser system and version: Chrome
Operating system and version: macOS
NodeJS version used (if relevant):
Kedro version used (if relevant): latest
Python version used (if relevant):
Checklist
[] Include labels so that we can categorise your issue
The text was updated successfully, but these errors were encountered:
Description
Originally raised by Erwin - https://kedro-org.slack.com/archives/C03RKP2LW64/p1722343503669499
Context
From the user -
I just discovered that if I use a custom resolver in parameters, (using it in catalog have no problem) kedro-viz die. The object returned is not friendly for kedro-viz
"polars": lambda x: getattr(pl, x)
pydantic_core._pydantic_core.PydanticSerializationError: Unable to serialize unknown type: <class 'polars.datatypes.classes.DataTypeClass'>
2024-07-30 09:15:55,489 - uvicorn.error - ERROR - Exception in ASGI application
Any workaround? Could be a bad practice to have parameters of type polars.datatypes.classes.DataTypeClass ?
Steps to Reproduce
Let's say we have the below resolver -
If the parameters have a resolver and used as below -
Kedro Viz constructs an object like -
Now
Float64
is not serializable by pydantic when it is sent as json to frontend. We either need to make str(Float64) or see what to do in case the parameter value is an object.Expected Result
Kedro-Viz should handle parameter values of object types and do not crash
Actual Result
Kedro-Viz throws and error and does not start.
Your Environment
Include as many relevant details as possible about the environment you experienced the bug in:
Checklist
The text was updated successfully, but these errors were encountered: