deepset-ai / canals

A component orchestration engine
https://deepset-ai.github.io/canals/
Apache License 2.0
27 stars 3 forks source link

Do not use a dict as intermediate format and use `Socket`s directly #135

Closed masci closed 1 year ago

masci commented 1 year ago

Simplify code and remove side effects from sharing a mutable container.

ZanSara commented 1 year ago

I'm ok with this change as long as we are a bit more proactive with the checks. Let's add a check in add_component to make sure the instance is not present already in the graph and returns a meaningful error to the user. Otherwise this can cause hard-to-trace bugs imho, because it doesn't fail but just causes side effects.

masci commented 1 year ago

Let's add a check in add_component to make sure the instance is not present already in the graph

We can do this in another PR, I just fixed the tests because they were wrong and I stumbled upon them working on the refactoring