@@ -60,8 +60,8 @@ Here's how to create a simple pipeline and propagate results from one component
60
60
pipe.add_component(ComponentAdd(), " a" )
61
61
pipe.add_component(ComponentAdd(), " b" )
62
62
63
- pipe.connect(" a" , " b" , {" number2" : " a.result" })
64
- asyncio.run(pipe.run({" a" : {" number1" : 10 , " number2" : 1 }, " b" : {" number1" : 4 }))
63
+ pipe.connect(" a" , " b" , input_config = {" number2" : " a.result" })
64
+ asyncio.run(pipe.run({" a" : {" number1" : 10 , " number2" : 1 }, " b" : {" number1" : 4 }} ))
65
65
# result: 10+1+4 = 15
66
66
67
67
1. First, a pipeline is created, and two components named "a" and "b" are added to it.
@@ -79,6 +79,20 @@ The data flow is illustrated in the diagram below:
79
79
Component "b" -> 15
80
80
4 -------------------------/
81
81
82
- .. warning::
82
+ .. warning :: Cyclic graph
83
83
84
84
Cycles are not allowed in a Pipeline.
85
+
86
+
87
+ .. warning :: Ignored user inputs
88
+
89
+ If inputs are provided both by user in the `pipeline.run ` method and as
90
+ `input_config ` in a connect method, the user input will be ignored. Take for
91
+ instance the following pipeline, adapted from the previous one:
92
+
93
+ .. code :: python
94
+
95
+ pipe.connect(" a" , " b" , input_config = {" number2" : " a.result" })
96
+ asyncio.run(pipe.run({" a" : {" number1" : 10 , " number2" : 1 }, " b" : {" number1" : 4 , " number2" : 42 }}))
97
+
98
+ The result will still be **15 ** because the user input `"number2": 42 ` is ignored.
0 commit comments