Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error when task output type is of the form List[Annotated[StructructuredDataset, kwtypes(...)]] #3989

Closed
2 tasks done
redartera opened this issue Aug 24, 2023 · 0 comments
Assignees
Labels
bug Something isn't working flytekit FlyteKit Python related issue

Comments

@redartera
Copy link

redartera commented Aug 24, 2023

Describe the bug

I get a TypeError: unhashable type: 'collections.OrderedDict' when there exists a task annotated with the output described in the title.

This is very similar to #3011

Expected behavior

Should work

Additional context to reproduce

Script to reproduce, run python script.py

# script.py
from typing import Annotated, List
from flytekit import task, kwtypes

from flytekit.types.structured import StructuredDataset


WineDataset = Annotated[
    StructuredDataset,
    kwtypes(
        alcohol=float,
        malic_acid=float,
        ash=float,
        alcalinity_of_ash=float,
        magnesium=float,
        total_phenols=List[float],
        flavanoids=float,
        nonflavanoid_phenols=float,
        proanthocyanins=float,
        color_intensity=float,
        hue=float,
        od280_od315_of_diluted_wines=float,
        proline=float,
        target=int,
    )
]

@task
def no_op(data: WineDataset) -> List[WineDataset]:
    return [data]
    

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@redartera redartera added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Aug 24, 2023
@eapolinario eapolinario removed the untriaged This issues has not yet been looked at by the Maintainers label Aug 25, 2023
@wild-endeavor wild-endeavor added the flytekit FlyteKit Python related issue label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flytekit FlyteKit Python related issue
Projects
None yet
Development

No branches or pull requests

3 participants