fmfreeze
12/20/2023, 2:41 PMNok Lam Chan
12/20/2023, 2:46 PM_load
method and it shouldn't be able to write at all.Nok Lam Chan
12/20/2023, 2:47 PMNok Lam Chan
12/20/2023, 2:49 PMfmfreeze
12/20/2023, 3:04 PM_load
method and it shouldn't be able to write at all.
yes, if I implement/inherit my own custom dataset.
But "locking" any dataset from being overwritten unintentionally at the config layer would be a nice feature.
Every situation where one wants to "lock" a dataset because it surely is always a pipeline input only (e.g. raw data) may be a use case.
Currently I do it be setting versioned: true
, but then I also have to do sanity-check if the latest version is unmodified (e.g. no other version exists).Iñigo Hidalgo
12/20/2023, 3:14 PMbefore_dataset_saved
hook (https://docs.kedro.org/en/stable/hooks/common_use_cases.html#use-hooks-to-customise-the-dataset-load-and-save-methods) combined with some metadata in the catalog, that's a new feature I haven't used myself so probably somebody from the kedro team can bring up the relevant docu for that sidefmfreeze
12/20/2023, 3:26 PMAbstractDataset
level.
I forgot to reply to @Nok Lam Chan's question about what should happen:
The user simply should be informed that the current pipeline definition is wrong, because it defines a dataset as output which is configured as read-only.Nok Lam Chan
12/20/2023, 3:41 PMIñigo Hidalgo
12/20/2023, 3:45 PMNok Lam Chan
12/20/2023, 3:49 PMmetadata
field of dataset so there is no change in the core api.Iñigo Hidalgo
12/20/2023, 5:10 PMSo while custom implementations to achieve that behaviour are possible, this still would be a nice kedro feature on thethinking about this, what would be the cleanest way to subclass abstractdataset in order to modify the behavior of all datasets which inherit from it? is that even possible/desirable?level.AbstractDataset
Yolan Honoré-Rougé
12/20/2023, 8:26 PM__new__
https://github.com/Galileo-Galilei/kedro-mlflow/blob/master/kedro_mlflow%2Fio%2Fartifacts%2Fmlflow_artifact_dataset.py#L16-L147 method to decorate all save / load method automatically, but this looks very hacky.Iñigo Hidalgo
12/21/2023, 8:23 AM