gemseo.utils.pickle module
Handle saving and loading pickles of objects.
-
from_pickle(file_path)[source]
Load an object from its pickled representation stored on the disk.
- Parameters:
file_path (str | Path) -- The path to the file containing the pickled representation.
- Returns:
The object.
- Return type:
Any
-
to_pickle(obj, file_path, protocol=5)[source]
Save the pickled representation of an object on the disk.
- Parameters:
obj (Any) -- An object.
file_path (str | Path) -- The path to the file to store the pickled representation.
protocol (int) --
The protocol to use for pickling.
By default it is set to 5.
- Return type:
None