Hi! I've been having some issues with flyte not r...
# ask-the-community
Hi! I've been having some issues with flyte not respecting types of data between tasks. https://github.com/flyteorg/flyte/issues/4740 https://github.com/flyteorg/flyte/issues/4505 Its making it so I need to have hard casting between task and introducing weird bugs. Is this something I'm missing or i a known issue?
Cc @Yee / @Haytham Abuelfutuh the problem of protobuf struct
But this seems odd to be up converting to string
dict[int, float] gets represented not as a protobuf struct in the backend but as a literal map. The flyte literal map key types are always str
you can try leaving off the types - a pure
will trigger the proto struct transformer.
or make the object a dataclass.
good, and what about the int being casted to flat? Need to make that one a dataclass too?
When using
instead of
Dict[int, str]
it still gets casted to str @Yee
Copy code
from flytekit import task, workflow

def create_dict() -> dict:
    sample_dict = {1: 1.1, 2: 2.2, 3: 3.3}
    return sample_dict

def process_dict(input_dict: dict):

def workflow() -> None:
    dict_created = create_dict()
The second print will still have str keys 😞
any update on these?