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] FlyteWorkflowExecution inputs and outputs property return None #2108

Open
2 tasks done
mdjong1 opened this issue Jan 28, 2022 · 7 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working flytekit FlyteKit Python related issue stale

Comments

@mdjong1
Copy link
Member

mdjong1 commented Jan 28, 2022

Describe the bug

When using FlyteRemote with the fetch_workflow_execution function we can correctly retrieve most of the information related to a workflow execution (i.e. version, closure information). However, when we try to access the inputs and output from here the result is a None, despite knowing/seeing that the execution has inputs & outputs in the Flyte Console.

Expected behavior

I would expect that when I call .inputs or .outputs on a FlyteWorkflowExecution it would Returns the inputs to the execution in the standard python format as dictated by the type engine. (taken from docstring) as opposed to returning a None when inputs and outputs are actually set for the specific workflow execution. For cases when no inputs or outputs are set perhaps an empty dict would make more sense here as well.

Additional context to reproduce

remote = FlyteRemote(flyte_admin_url=_FLYTE_HOST, insecure=False)

execution = remote.fetch_workflow_execution(project=_PROJECT_NAME, domain=_PROJECT_DOMAIN, name=_EXECUTION_NAME)

print(execution.inputs)  # prints None

Screenshots

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@mdjong1 mdjong1 added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jan 28, 2022
@mdjong1 mdjong1 changed the title [BUG] FlyteWorkflowExecution inputs and outputs property return None [BUG][Flytekit] FlyteWorkflowExecution inputs and outputs property return None Jan 28, 2022
@kumare3 kumare3 removed the untriaged This issues has not yet been looked at by the Maintainers label Jan 28, 2022
@kumare3
Copy link
Contributor

kumare3 commented Jan 28, 2022

cc @wild-endeavor / @pingsutw is this a regression?

@kumare3 kumare3 added this to the 0.19.2 - Jan 2021 milestone Jan 28, 2022
@pingsutw pingsutw self-assigned this Feb 2, 2022
@wild-endeavor wild-endeavor added the flytekit FlyteKit Python related issue label Feb 3, 2022
@wild-endeavor
Copy link
Contributor

No this isn't a regression this is a feature... and not a good one. Let's think of a way to improve the UX, we'll hold off on this for this release (0.30) and address in 0.31.

@wild-endeavor
Copy link
Contributor

Still working on how to better handle, but merged that PR in the interim. My issue is that this doesn't fully resolve the problem. If the workflow execution hasn't completed, outputs will still be missing, and there's no way to alert the user that they'll need to re-sync the object.

I'll make a v0.30.2 release early next week probably with this.

@ggydush-fn
Copy link

@wild-endeavor I believe I'm seeing this issue when fetching workflow executions that have been aborted.

Calling flyte_remote.fetch_workflow_execution(name=execution_name) works fine, but if the execution_name corresponds to an execution that was aborted, you get the following. I can create a separate issue if you'd prefer!

File ~/.virtualenvs/freenome-rpctl-PPAhckSl-py3.9/lib/python3.9/site-packages/flytekit/core/type_engine.py:695, in TypeEngine.literal_map_to_kwargs(cls, ctx, lm, python_types)
    691 """
    692 Given a ``LiteralMap`` (usually an input into a task - intermediate), convert to kwargs for the task
    693 """
    694 if len(lm.literals) != len(python_types):
--> 695     raise ValueError(
    696         f"Received more input values {len(lm.literals)}" f" than allowed by the input spec {len(python_types)}"
    697     )
    698 return {k: TypeEngine.to_python_value(ctx, lm.literals[k], v) for k, v in python_types.items()}

ValueError: Received more input values 0 than allowed by the input spec 3

@github-actions
Copy link

Hello 👋, This issue has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this issue as stale and will close the issue if we detect no activity in the next 7 days. Thank you for your contribution and understanding! 🙏

@github-actions github-actions bot added the stale label Aug 28, 2023
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

Hello 👋, This issue has been inactive for over 9 months and hasn't received any updates since it was marked as stale. We'll be closing this issue for now, but if you believe this issue is still relevant, please feel free to reopen it. Thank you for your contribution and understanding! 🙏

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 4, 2023
@eapolinario eapolinario reopened this Nov 2, 2023
@github-actions github-actions bot removed the stale label Nov 3, 2023
Copy link

Hello 👋, this issue has been inactive for over 9 months. To help maintain a clean and focused backlog, we'll be marking this issue as stale and will engage on it to decide if it is still applicable.
Thank you for your contribution and understanding! 🙏

@github-actions github-actions bot added the stale label Jul 31, 2024
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 stale
Projects
None yet
Development

No branches or pull requests

7 participants