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] RemoteEntities doesn't work properly using >> #5581

Open
2 tasks done
andresgomezfrr opened this issue Jul 23, 2024 · 4 comments
Open
2 tasks done

[BUG] RemoteEntities doesn't work properly using >> #5581

andresgomezfrr opened this issue Jul 23, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@andresgomezfrr
Copy link
Contributor

Describe the bug

I'm getting this error:

  'Output' object has no attribute 'ref'

The internal code where this is thrown is:

flytekit/core/promise.py:850 in __rshift__                       
│                                                                              │
│    847 │   │   return self._ref                                              │
│    848 │                                                                     │
│    849 │   def __rshift__(self, other: Union[Promise, VoidPromise]):         │
│ ❱  850 │   │   if self.ref and other.ref:                                    │
│    851 │   │   │   self.ref.node.runs_before(other.ref.node)                 │
│    852 │   │   return other        

I think the issue is that this class Output:

https://github.com/flyteorg/flytekit/blob/master/flytekit/core/promise.py#L697-L716

doesnt have implemented the ref, so when you try to use the >> operator using remoteEntity which are wrapped in the Output class you will hit this error.

If I check the type of my remoteEntity it is <class 'flytekit.core.promise.create_task_output.<locals>.Output'>

a >> remoteEntity(this is an Output class) > b

This is a workaround:

a >> remoteEntity.<some_field>.node > b

This is related to: #5393

Expected behavior

Be able to chaining remoteEntities

Additional context to reproduce

No response

Screenshots

No response

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@andresgomezfrr andresgomezfrr added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Jul 23, 2024
Copy link

runllm bot commented Jul 23, 2024

The issue you're encountering is related to the improper functioning of the >> operator with remote entities in Flyte. This problem has been noted in various contexts, including chaining tasks and workflows. According to this GitHub issue, the >> operator does not work properly with remote entities, leading to the error 'Output' object has no attribute 'ref'.

A workaround for this issue is to reference the specific field of the remote entity's output, as shown below:

a >> remoteEntity.<some_field>.node >> b

Would you like more detail on how to work around this issue or any other specific aspect?

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!

@davidmirror-ops davidmirror-ops removed the untriaged This issues has not yet been looked at by the Maintainers label Aug 1, 2024
@davidmirror-ops davidmirror-ops moved this from Backlog to Assigned in Flyte Issues/PRs maintenance Aug 1, 2024
@Mecoli1219
Copy link

@eapolinario Are you working on this issue? I think I have some thoughts that may solve this issue.

@Mecoli1219
Copy link

Hi @andresgomezfrr, could you please share a concrete example that reproduces the error? That would greatly help in pinpointing the issue.

@eapolinario eapolinario removed their assignment Nov 11, 2024
@eapolinario
Copy link
Contributor

@Mecoli1219 , I'm not actively working on this. I unassigned myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Assigned
Development

No branches or pull requests

4 participants