FlytePickle
This type is only used by flytekit internally. User should not use this type. Any type that flyte can't recognize will become FlytePickle
Methods
def python_type()
-
Returns the underlying Python type. For FlytePickle itself, this is NoneType.
-
Return Value: typing.Type
- The underlying Python type.
def to_pickle(python_val: typing.Any) - > string
-
Serializes a Python object using cloudpickle, saves it to a temporary location, and returns a URI to the stored object. The object is hashed using MD5 to generate a unique filename.
-
Parameters
- python_val: typing.Any
- The Python object to serialize.
- python_val: typing.Any
-
Return Value: string
- A URI pointing to the stored serialized object.
def from_pickle(uri: string) - > typing.Any
-
Deserializes a Python object from a given URI. If the URI points to a remote location, the object is first downloaded locally. The object is deserialized using cloudpickle.
-
Parameters
- uri: string
- The URI of the serialized object.
- uri: string
-
Return Value: typing.Any
- The deserialized Python object.