https://kedro.org/ logo
#beginners-need-help
Title
# beginners-need-help
d

Daehyun Kim

12/28/2021, 11:44 PM
Is there a quick and simple way to load pickle file that is saved from the pipeline as a
pickle.PickleDataSet
type using plain
pickle
module? for example, I have
model_metrics.pickle
that is PickleDataSet and how can I load it via
pickle.load()
?
d

datajoely

12/29/2021, 11:20 AM
Hi @User there are 3 way that may be useful
1. Using standard pickle library and context manager:
Copy code
python
with open('path/to/pickle.pkl', 'rb') as f:
    x = pickle.load(f)
2. Using the Kedro class
Copy code
python
from kedro.extras.pickle import PickleDataSet
ds = PickleDataSet('path/to/pickle.pkl')
ds.load()
3. Using the Kedro IPython/Jupyter comamnd
Copy code
bash
catalog.load('catalog_entry_name')
d

Daehyun Kim

12/29/2021, 5:16 PM
thank you!!
happy new year!!
3 Views