From 262669d7752538a17a13dca5396506d4013273d8 Mon Sep 17 00:00:00 2001 From: estelle Date: Wed, 4 Sep 2024 14:42:22 +0200 Subject: [PATCH 1/4] Update documentation --- docs/source/user_guide_pipeline.rst | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/source/user_guide_pipeline.rst b/docs/source/user_guide_pipeline.rst index 08276d4c9..fa5fdd8bd 100644 --- a/docs/source/user_guide_pipeline.rst +++ b/docs/source/user_guide_pipeline.rst @@ -61,7 +61,7 @@ Here's how to create a simple pipeline and propagate results from one component pipe.add_component(ComponentAdd(), "b") pipe.connect("a", "b", {"number2": "a.result"}) - asyncio.run(pipe.run({"a": {"number1": 10, "number2": 1}, "b": {"number1": 4})) + asyncio.run(pipe.run({"a": {"number1": 10, "number2": 1}, "b": {"number1": 4}})) # result: 10+1+4 = 15 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: Component "b" -> 15 4 -------------------------/ -.. warning:: +.. warning:: Cyclic graph Cycles are not allowed in a Pipeline. + + +.. warning:: Ignored user inputs + + If inputs are provided both by user in the `pipeline.run` method and as + `input_config` in a connect method, the user input will be ignored. Take for + instance the following pipeline, adapted from the previous one: + + .. code:: python + + pipe.connect("a", "b", {"number2": "a.result"}) + asyncio.run(pipe.run({"a": {"number1": 10, "number2": 1}, "b": {"number1": 4, "number2": 42}})) + + The result will still be **15** because the user input `"number2": 42` is ignored. From 5162f66bfc233283b35d3bce77f73940310f0aca Mon Sep 17 00:00:00 2001 From: estelle Date: Thu, 5 Sep 2024 16:03:21 +0200 Subject: [PATCH 2/4] Explicit `input_config` parameter --- docs/source/user_guide_pipeline.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/user_guide_pipeline.rst b/docs/source/user_guide_pipeline.rst index fa5fdd8bd..3155dc949 100644 --- a/docs/source/user_guide_pipeline.rst +++ b/docs/source/user_guide_pipeline.rst @@ -60,7 +60,7 @@ Here's how to create a simple pipeline and propagate results from one component pipe.add_component(ComponentAdd(), "a") pipe.add_component(ComponentAdd(), "b") - pipe.connect("a", "b", {"number2": "a.result"}) + pipe.connect("a", "b", input_config={"number2": "a.result"}) asyncio.run(pipe.run({"a": {"number1": 10, "number2": 1}, "b": {"number1": 4}})) # result: 10+1+4 = 15 @@ -92,7 +92,7 @@ The data flow is illustrated in the diagram below: .. code:: python - pipe.connect("a", "b", {"number2": "a.result"}) + pipe.connect("a", "b", input_config={"number2": "a.result"}) asyncio.run(pipe.run({"a": {"number1": 10, "number2": 1}, "b": {"number1": 4, "number2": 42}})) The result will still be **15** because the user input `"number2": 42` is ignored. From 1202133e4c4756b64e0dc18a0bab01ed5cd8a8fc Mon Sep 17 00:00:00 2001 From: estelle Date: Thu, 5 Sep 2024 16:16:38 +0200 Subject: [PATCH 3/4] Install graphviz in CI --- .github/workflows/pr-e2e-tests.yaml | 2 ++ .github/workflows/pr.yaml | 2 ++ .github/workflows/scheduled-e2e-tests.yaml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/pr-e2e-tests.yaml b/.github/workflows/pr-e2e-tests.yaml index 8a34bd2c6..52dad8518 100644 --- a/.github/workflows/pr-e2e-tests.yaml +++ b/.github/workflows/pr-e2e-tests.yaml @@ -47,6 +47,8 @@ jobs: - 7474:7474 steps: + - name: Install Graphviz + run: sudo apt-get install graphviz - name: Check out repository code uses: actions/checkout@v4 - name: Docker Prune diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 315bf3e64..fb19fb973 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -8,6 +8,8 @@ jobs: matrix: python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] steps: + - name: Install Graphviz + run: sudo apt-get install graphviz - name: Check out repository code uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/scheduled-e2e-tests.yaml b/.github/workflows/scheduled-e2e-tests.yaml index 8129156ec..01a3f5fc2 100644 --- a/.github/workflows/scheduled-e2e-tests.yaml +++ b/.github/workflows/scheduled-e2e-tests.yaml @@ -54,6 +54,8 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} steps: + - name: Install Graphviz + run: sudo apt-get install graphviz - name: Check out repository code uses: actions/checkout@v4 - name: Docker Prune From e1dc92bf13f61ca9dc10d56a28a8f920c986ce85 Mon Sep 17 00:00:00 2001 From: estelle Date: Thu, 5 Sep 2024 16:19:24 +0200 Subject: [PATCH 4/4] Revert "Install graphviz in CI" This reverts commit 1202133e4c4756b64e0dc18a0bab01ed5cd8a8fc. --- .github/workflows/pr-e2e-tests.yaml | 2 -- .github/workflows/pr.yaml | 2 -- .github/workflows/scheduled-e2e-tests.yaml | 2 -- 3 files changed, 6 deletions(-) diff --git a/.github/workflows/pr-e2e-tests.yaml b/.github/workflows/pr-e2e-tests.yaml index 52dad8518..8a34bd2c6 100644 --- a/.github/workflows/pr-e2e-tests.yaml +++ b/.github/workflows/pr-e2e-tests.yaml @@ -47,8 +47,6 @@ jobs: - 7474:7474 steps: - - name: Install Graphviz - run: sudo apt-get install graphviz - name: Check out repository code uses: actions/checkout@v4 - name: Docker Prune diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index fb19fb973..315bf3e64 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -8,8 +8,6 @@ jobs: matrix: python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ] steps: - - name: Install Graphviz - run: sudo apt-get install graphviz - name: Check out repository code uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/scheduled-e2e-tests.yaml b/.github/workflows/scheduled-e2e-tests.yaml index 01a3f5fc2..8129156ec 100644 --- a/.github/workflows/scheduled-e2e-tests.yaml +++ b/.github/workflows/scheduled-e2e-tests.yaml @@ -54,8 +54,6 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} steps: - - name: Install Graphviz - run: sudo apt-get install graphviz - name: Check out repository code uses: actions/checkout@v4 - name: Docker Prune