Is there a quick and simple way to load pickle fil...
# beginners-need-help
d
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
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
thank you!!
happy new year!!
3 Views