Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.56k stars 226 forks source link

[Bug]: array node with flatten option doesn't always work #305

Closed mindplay-dk closed 5 months ago

mindplay-dk commented 5 months ago

What happened?

I can't fully explain what's going on here, but I noticed that array nodes with flatten enabled don't always flatten.

it's best explained with a screenshot:

image

as you can see, no matter how many times I flatten the value, it doesn't get flatter.

here's the minimal repro illustrating the problem: Learning.zip

I realize there's a "deep flatten" option as well, but sometimes you need to flatten only one level.

at times, I have been able to flatten only one level, but at other times it doesn't work - I haven't figured out the pattern, but I suspect it has something to do with the incoming data type, or possibly something to do with "split" and subgraphs?

this example is the most I've been able to illustrate the issue. I hope it helps.

What was the expected functionality?

flatten should flatten 😏

Describe your environment

Win 11 Pro

Relevant log output

No response

Relevant screenshots

No response

Code of Conduct