dantro.data_loaders.load_pkl module

Defines a data loader for Python pickles.

class dantro.data_loaders.load_pkl.PickleLoaderMixin[source]

Bases: object

Supplies a load function for pickled python objects.

For unpickling, the dill package is used.

_load_pickle(*args, **kwargs)

Load a pickled object using dill.load.

Parameters
  • filepath (str) – Where the pickle-dumped file is located

  • TargetCls (type) – The class constructor

  • **pkl_kwargs – Passed on to the load function

Returns

The unpickled object, stored in a dantro container

Return type

ObjectContainer

_load_pkl(*args, **kwargs)

Load a pickled object using dill.load.

Parameters
  • filepath (str) – Where the pickle-dumped file is located

  • TargetCls (type) – The class constructor

  • **pkl_kwargs – Passed on to the load function

Returns

The unpickled object, stored in a dantro container

Return type

ObjectContainer