<#206 Fix pickle transformer> Pull request opened ...
# flyte-github
a
#206 Fix pickle transformer Pull request opened by kumare3 This pull request introduces support for handling Python pickled objects as both blobs and binary types, and adds comprehensive tests for these changes. The main updates focus on improving the type guessing and literal type construction for pickled data, ensuring better interoperability and robustness. Enhancements to Pickle Type Handling: • Updated
FlytePickleTransformer.guess_python_type
to return
FlytePickle
for both blob types with pickle format and for simple binary types, improving flexibility in type inference. • Modified
FlytePickleTransformer.get_literal_type
to return a union type containing both blob and binary variants, allowing for broader compatibility when serializing Python objects. Testing Improvements: • Added tests to verify that
guess_python_type
correctly handles binary simple types, that
get_literal_type
returns a union type with the expected variants, and that unsupported types raise appropriate errors. Example Usage: • Added a new example in
examples/basics/arbitrary_data.py
demonstrating how to define and pass arbitrary Python objects between Flyte tasks, showcasing the improved pickling support. flyteorg/flyte-sdk