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

[Core feature] Flytekit support for positional args #5320

Open
2 tasks done
kumare3 opened this issue May 3, 2024 · 2 comments
Open
2 tasks done

[Core feature] Flytekit support for positional args #5320

kumare3 opened this issue May 3, 2024 · 2 comments
Assignees
Labels
backlogged For internal use. Reserved for contributor team workflow. enhancement New feature or request flytekit FlyteKit Python related issue

Comments

@kumare3
Copy link
Contributor

kumare3 commented May 3, 2024

Motivation: Why do you think this is important?

Curently only kwargs are supported

@task
def foo(x: int, y: int) -> int:
     ...

@workflow
def wf(x: int, y: int) -> int:
    return foo(x=x, y=y)

Goal: What should the final outcome look like, ideally?

Support positional args

@task
def foo(x: int, y: int) -> int:
     ...

@workflow
def wf(x: int, y: int) -> int:
    return foo(x, y)

Describe alternatives you've considered

NA

Propose: Link/Inline OR Additional context

No response

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@kumare3 kumare3 added enhancement New feature or request untriaged This issues has not yet been looked at by the Maintainers labels May 3, 2024
Copy link

runllm bot commented May 3, 2024

Flytekit does not support positional arguments when calling tasks within a workflow. Tasks must be invoked using keyword arguments only. This limitation is documented in a GitHub issue where it's stated that Flytekit requires keyword arguments to maintain clarity and avoid errors related to parameter ordering (GitHub issue #1339). There are no current plans to support positional arguments as per the discussions in the issue.

Would you like more detail on this topic or how to work with the current system using keyword arguments?

Sources:


This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.

Mention @RunLLM to ask follow-up questions. See runllm.com for more!

@kumare3
Copy link
Contributor Author

kumare3 commented May 3, 2024

Then it will be possible to support

@task(unsafe=True)
def foo(*args, **kwargs) -> int:
     return int

@Future-Outlier Future-Outlier self-assigned this May 3, 2024
@wild-endeavor wild-endeavor added flytekit FlyteKit Python related issue backlogged For internal use. Reserved for contributor team workflow. and removed untriaged This issues has not yet been looked at by the Maintainers labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlogged For internal use. Reserved for contributor team workflow. enhancement New feature or request flytekit FlyteKit Python related issue
Projects
None yet
Development

No branches or pull requests

3 participants