-
Notifications
You must be signed in to change notification settings - Fork 97
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
kedro-datasets
: Datasets accept non-primitive parameters in the __init__
#950
Comments
Should I have seen an error here @ElenaKhaustova ? |
It does happen with a dataset only instantiated with primitive properties though 🤔
|
I'm not sure what credentials you passed here cause But even if It works as expected in case you add dataset to the catalog via But in case non-primitives are used, no error occurs as we do not dump the result dictionary and objects remains as they are - not serialized: |
So the error should not occur until dumping from the result dictionary. We do not validate it now but we have a note in
|
Took
Hm I missed that
Indeed, looks like the problem would, in any case, going from dictionary to file. Not sure we should do anything here. |
I agree, but since the docstring refers to this ticket, we can keep it open until people start using the new catalog in case it becomes a common problem. |
Description
Catalog to config solution is based on extracting dataset
__init__
parameters and their values passed when creating a dataset.The solution does not cover the case when non-primitive parameters are accepted in the dataset constructor:
5.1.0/_modules/kedro_datasets/partitions/incremental_dataset.html#IncrementalDataset
Possible Implementation
(Preferable solution) Force datasets to only have static, primitive parameters in the
__init__
: kedro-org/kedro#4329 (comment)Possible Alternatives
Extend parent
AbstractDataset.to_config()
at the dataset level to serialize those objects.The text was updated successfully, but these errors were encountered: