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] [flytekit] Task with torch.Tensor input fails when executing with flytekit remote access #6156

Open
2 tasks done
pimdh opened this issue Jan 10, 2025 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers

Comments

@pimdh
Copy link

pimdh commented Jan 10, 2025

Describe the bug

Consider following task definition:

@task
def flyte_test_task(x: torch.Tensor) -> None:
    print(x)

Then register. Then execute with:

PROJECT = ...
DOMAIN = ...
remote = FlyteRemote(config=Config.auto())
task = remote.fetch_task(name="flyte_test_task", project=PROJECT, domain=DOMAIN)

execution = remote.execute(
    task,
    project=PROJECT,
    domain=DOMAIN,
    inputs={"x": torch.tensor([1, 2, 3])},
)

This triggers error:

TypeError: No automatic conversion found from type <class 'torch.Tensor'> to FlyteFile.Supported (os.PathLike, str, Flytefile)

Expected behavior

The execution should be created successfully.

Additional context to reproduce

Using flytekit version 1.14.3

Screenshots

No response

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@pimdh pimdh added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers
Projects
Status: Backlog
Development

No branches or pull requests

1 participant