Open anabelchuinard opened 1 year ago
Hi @anabelchuinard, thanks for opening this issue and sorry for the delay. It will take us some time but I'm labeling this issue so we don't lose track of it.
Hi @anabelchuinard, do you still need help fixing this issue?
@merelcht I found a non-kedronic workaround for this but would love to know if there is now a kedronic way for batch-saving those models.
Using the PartitionedDataset
is definitely the recommended Kedro way for batch saving. I've done some digging and it seems that the following lines are causing issues for using the TensorFlowModelDataset
with PartitionedDataset
:
Description
Can't save TensorFlowModelDataset objects as partition.
Context
I am dealing with a project where I have to train several models concurrently. I started writing my code using PartitionedDataset where each partition corresponds to the data relative to one training. When I am trying to save the resulting tensorflow models as a partition, I get an error. I wonder is this has to do with the fact that those inherit from the AbstractVersionedDataset instead of the AbstractDataset. And if yes, I am interested to know if there is any workaround for batch saving those.
This is the instance of my catalog corresponding to the models I want to save:
Note: Saving one model (not as partition) works.
Steps to Reproduce
Expected Result
Should save one .hdf5 file per partition with the name of the file being the associate dictionary key.
Actual Result
Getting this error:
Your Environment
pip show kedro
orkedro -V
): kedro, version 0.18.12python -V
): 3.9.16