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] Unable to compile task with (NamedTuple, str) as the output #4358

Open
2 tasks done
ByronHsu opened this issue Nov 3, 2023 · 0 comments
Open
2 tasks done

[BUG] Unable to compile task with (NamedTuple, str) as the output #4358

ByronHsu opened this issue Nov 3, 2023 · 0 comments
Labels
bug Something isn't working flytekit FlyteKit Python related issue

Comments

@ByronHsu
Copy link
Contributor

ByronHsu commented Nov 3, 2023

Describe the bug

from typing import NamedTuple
from flytekit import task, workflow

class TaskOutputs(NamedTuple):
    train_data: str
    val_data: str


# namedtuple + str
@task
def t() -> (TaskOutputs, str):
    return TaskOutputs("train", "val"), "foo"

@workflow
def wf():
    t()
$ pyflyte run --remote test_workflow.py wf                  
Failed with Unknown Exception <class 'flytekit.core.type_engine.RestrictedTypeError'> Reason: Transformer for type <class 'tuple'> is restricted currently
Transformer for type <class 'tuple'> is restricted currently

Expected behavior

Able to compile

Additional context to reproduce

No response

Screenshots

No response

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@ByronHsu ByronHsu added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Nov 3, 2023
@thomasjpfan thomasjpfan added flytekit FlyteKit Python related issue and removed untriaged This issues has not yet been looked at by the Maintainers labels Dec 5, 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

2 participants