simpleml.save_patterns.serializers.cloudpickle
Module for Cloudpickle save patterns
Module Contents
Classes
Base class for internal cloudpickle serialization/deserialization options |
Attributes
- class simpleml.save_patterns.serializers.cloudpickle.CloudpickleFileSerializer[source]
- class simpleml.save_patterns.serializers.cloudpickle.CloudpicklePersistenceMethods[source]
Bases:
object
Base class for internal cloudpickle serialization/deserialization options
- static dump_object(obj, filepath, overwrite=True)[source]
Pickles an object to a string or to the filesystem. Assumes that a NULL filepath expects a serialized string returned
Prepends path to SimpleML Pickle directory before saving. ONLY pass in a relative filepath from that location
- static dumps_object(obj)[source]
Pickles an object to a string or to the filesystem. Assumes that a NULL filepath expects a serialized string returned
Prepends path to SimpleML Pickle directory before saving. ONLY pass in a relative filepath from that location
- Parameters
overwrite – Boolean indicating whether to first check if pickled object is already serialized. Defaults to not checking, but can be leverage by implementations that want the same artifact in multiple places
obj (Any) –
- Return type
- static load_object(filepath)[source]
Loads an object from a serialized string or filesystem. When stream is True, it tries to load the file directly from the string.
Prepends path to SimpleML Pickle directory before loading. ONLY pass in a relative filepath from that location
- Parameters
filepath (str) –
- Return type
Any
- static loads_object(data)[source]
Loads an object from a serialized string or filesystem. When stream is True, it tries to load the file directly from the string.
Prepends path to SimpleML Pickle directory before loading. ONLY pass in a relative filepath from that location
- Parameters
data (str) –
- Return type
Any