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

Closed
2 tasks done
kumare3 opened this issue May 3, 2024 · 3 comments · Fixed by flyteorg/flytekit#2522
Closed
2 tasks done

[Core feature] Flytekit support for positional args #5320

kumare3 opened this issue May 3, 2024 · 3 comments · Fixed by flyteorg/flytekit#2522
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
@MortalHappiness
Copy link
Member

#take

MortalHappiness added a commit to MortalHappiness/flytekit that referenced this issue Jun 20, 2024
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
MortalHappiness added a commit to MortalHappiness/flytekit that referenced this issue Jun 20, 2024
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
MortalHappiness added a commit to MortalHappiness/flytekit that referenced this issue Jun 20, 2024
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
MortalHappiness added a commit to MortalHappiness/flytekit that referenced this issue Jun 20, 2024
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
MortalHappiness added a commit to MortalHappiness/flytekit that referenced this issue Jun 20, 2024
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
MortalHappiness added a commit to MortalHappiness/flytekit that referenced this issue Jun 20, 2024
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
MortalHappiness added a commit to MortalHappiness/flytekit that referenced this issue Jun 21, 2024
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
MortalHappiness added a commit to MortalHappiness/flytekit that referenced this issue Jun 21, 2024
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
bgedik pushed a commit to bgedik/flytekit that referenced this issue Jul 3, 2024
- Change the `inputs` and `outputs` attributes in the `Interface` class to `OrderedDict` to preserve the order.
- Write values in positional arguments to `kwargs`.
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
Signed-off-by: bugra.gedik <bugra.gedik@predera.ai>
fiedlerNr9 pushed a commit to flyteorg/flytekit that referenced this issue Jul 25, 2024
- Change the `inputs` and `outputs` attributes in the `Interface` class to `OrderedDict` to preserve the order.
- Write values in positional arguments to `kwargs`.
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
Signed-off-by: Jan Fiedler <jan@union.ai>
mao3267 pushed a commit to mao3267/flytekit that referenced this issue Jul 29, 2024
- Change the `inputs` and `outputs` attributes in the `Interface` class to `OrderedDict` to preserve the order.
- Write values in positional arguments to `kwargs`.
Resolves: flyteorg/flyte#5320
Signed-off-by: Chi-Sheng Liu <chishengliu@chishengliu.com>
Signed-off-by: mao3267 <chenvincent610@gmail.com>
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

Successfully merging a pull request may close this issue.

4 participants