Valentin Martinez Gama
03/22/2023, 9:42 PMclass CustomClass((BaseEstimator, TransformerMixin)
I have created an object of that class and saved it to my Kedro catalog as a pickle object. Now the problem is when I try using catalog.load()
on a pipeline to load that object I get the following error:
DataSetError: Failed while loading data from data set PickleDataSet(backend=pickle,
filepath=……./data/06_models/custom_model_V1.pkl,
load_args={}, protocol=file, save_args={}).
Can’t get attribute ‘CustomClass’ on <module ‘__main__’ from ‘……venv/bin/kedro’>I was able to make it work on a notebooks by first importint the class from the py file where it was defined:
from custom_classes import CustomClass
But when runing a kedro pipeline that uses this object as an input loaded from the catalog adding the import at the top of the pipeline fill did not fix it. Any usggestions on how to fix this?datajoely
03/23/2023, 9:58 AM__intit__.py
files?Brandon Meek
03/23/2023, 3:52 PM