datumaro.util.pickle_util#

Classes

PickleLoader()

RestrictedUnpickler(file, *[, fix_imports, ...])

class datumaro.util.pickle_util.RestrictedUnpickler(file, *, fix_imports=True, encoding='ASCII', errors='strict', buffers=())[source]#

Bases: Unpickler

find_class(module, name)[source]#

Return an object from a specified module.

If necessary, the module will be imported. Subclasses may override this method (e.g. to restrict unpickling of arbitrary classes and functions).

This method is called whenever a class or a function object is needed. Both arguments passed are str objects.

class datumaro.util.pickle_util.PickleLoader[source]#

Bases: object

safe_numpy = {'_reconstruct', 'dtype', 'ndarray'}#
restricted_load()[source]#