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]: Half of the items are being lost in loops if the final output is not passed over to the next iteration #441

Open
1 task done
remixer-dec opened this issue Aug 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@remixer-dec
Copy link

What happened?

Here is a simple graph that loads a dataset and gets one item from it in each iteration
image
After all iterations, the subgraph call has 54 outputs, while the next node after it has only 27.

image

If we check the execution iteration 2, it is clear that the input of text node does not match the output of the subgraph.
Connecting the text output to the loop data property and adding a break node temporary fixes this issue

What was the expected functionality?

Input values should match the output values of the nodes they're connected to, when data is transferred between nodes

Describe your environment

MacOS sonoma 14.4.1, Rivet version: app-v1.8.0

Relevant log output

No response

Relevant screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@remixer-dec remixer-dec added the bug Something isn't working label Aug 30, 2024
@abrenneke
Copy link
Collaborator

Right, this is one of the (currently unwritten) "rules of loops", in that every node needs to be part of the loop itself. So in this case, you want to connect the text node back to the loop controller so that it "knows" it's in the loop. You can't have any "dangling" things in loops, unfortunately.

@remixer-dec
Copy link
Author

It is just weird that it does work, but half of the time, easy to forget about it. Some kind of warning would be nice if it is hard to fix.
Well, as long as there is a workaround that gets the job done, it's not a big problem 😃

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
None yet
Development

No branches or pull requests

2 participants