We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We have a task that outputs the following:
class TaskOutput(NamedTuple): uri: str ref: str
when we do output.ref it returns a FlyteLiteral instead of the Promise. We believe this is due to a property set in https://github.com/flyteorg/flytekit/blob/41e21f4de56a837e09101a5cf5dd08ec4e8249df/flytekit/core/promise.py#L503
output.ref
Flytekit Output with ref field should return a promise.
ref
Running this snippet with pyflyte will reproduce the issue
pyflyte
from typing import NamedTuple from flytekit import task, workflow class HelloRefOutput(NamedTuple): ref: str uri: str @task def hello_ref() -> HelloRefOutput: return HelloRefOutput(ref="hello", uri="world") @workflow def hello_ref_workflow() -> str: result = hello_ref() print(result) # Output(ref=Promise(node:n0.ref), uri=Promise(node:n0.uri)) print(result.ref) # <FlyteLiteral node_id: "n0" var: "ref"> -- This should be a Promise not a FLyteLiteral print(result.uri) # Promise(node:n0.uri) -- OK!
The text was updated successfully, but these errors were encountered:
@rafaelraposospot , can you expand a bit more on your use case here? Maybe an example would clarify the intent.
Sorry, something went wrong.
Sure thing @eapolinario. I've added an example!
eapolinario
Successfully merging a pull request may close this issue.
Describe the bug
We have a task that outputs the following:
when we do
output.ref
it returns a FlyteLiteral instead of the Promise. We believe this is due to a property set inhttps://github.com/flyteorg/flytekit/blob/41e21f4de56a837e09101a5cf5dd08ec4e8249df/flytekit/core/promise.py#L503
Expected behavior
Flytekit Output with
ref
field should return a promise.Additional context to reproduce
Running this snippet with
pyflyte
will reproduce the issueAre you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: