Alexis Drakopoulos
08/28/2024, 2:06 PMdata_extraction:
param1: 5
param2: "hello"
My nodes then take in inputs like def mynode(data_extraction_params: dict): ...
and my pipeline does node(func=mynode, inputs=["params:data_extraction"], ...
I want to use Pydantic models to specify for each node what the inputs are, kind of like structs in Typescript. So essentially I'd like to do:
class dataExtractionParams(BaseModel):
param1: int
param2: str
def mynode(data_extraction_params: dataExtractionParams): ...
How can I most easily do this? That way in the function I can use the model rather than a dict.Yury Fedotov
08/28/2024, 2:56 PMtyping.Unpack
- see hereElena Khaustova
08/28/2024, 3:08 PMNok Lam Chan
08/28/2024, 3:09 PMnode
, it's not supported.
there is a on-going discussion here: https://github.com/kedro-org/kedro/discussions/3808