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: Add support for execution name prefixes in FlyteRemote.execute() #3626

Closed
2 tasks done
tomasz-sodzawiczny opened this issue Apr 27, 2023 · 3 comments
Labels
enhancement New feature or request flytekit FlyteKit Python related issue

Comments

@tomasz-sodzawiczny
Copy link

tomasz-sodzawiczny commented Apr 27, 2023

Motivation: Why do you think this is important?

Setting human-readable names might be quite for useful inspecting running executions; at the same time the behavior might be unexpected / dangerous if used naively:

Running:

ex1 = flyte_remote.execute(my_task, {"input": 1}, execution_name="foo")
ex2 = flyte_remote.execute(my_task, {"input": 2}, execution_name="foo")

Creates only 1 execution (or 0, if execution named "foo" already existed). The second set of inputs is silently ignored, and the existing execution is returned.

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

I would suggest a way to generate a name with a human-readable prefix (with behavior similar to e.g. Kubernetes's generateName):

ex1 = flyte_remote.execute(my_task, {"input": 1}, execution_name_prefix="foo-")
ex2 = flyte_remote.execute(my_task, {"input": 2}, execution_name_prefix="foo-")

ex1.id.name # Something like "foo-41e2c72fa869"
ex2.id.name # Something like "foo-7742ba115212"

Describe alternatives you've considered

Propose: Link/Inline OR Additional context

Note: I'm happy to create a PR to flytekit if the idea seems reasonable.

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@tomasz-sodzawiczny tomasz-sodzawiczny added enhancement New feature or request untriaged This issues has not yet been looked at by the Maintainers labels Apr 27, 2023
@pingsutw
Copy link
Member

@tomasz-sodzawiczny I think it's reasonable. Feel free to create a pr, thanks!

@eapolinario eapolinario added flytekit FlyteKit Python related issue and removed untriaged This issues has not yet been looked at by the Maintainers labels Apr 28, 2023
@troychiu
Copy link
Member

I am working on this issue!

@troychiu
Copy link
Member

The issue has been fixed. I think we can close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request flytekit FlyteKit Python related issue
Projects
None yet
Development

No branches or pull requests

5 participants