131 Commits

Author SHA1 Message Date
Stefano Fiorucci
35fb6c6f01
feat: improve AnswerBuilder to support showing RAG references (#9933)
* draft

* improve

* refactor

* improvs + usage ex

* relnote

* pipeline test fix
2025-10-24 12:47:16 +02:00
Sebastian Husch Lee
4cb4854057
don't name something test if it's not a test (#9900) 2025-10-20 09:23:43 +00:00
Sebastian Husch Lee
8188e5ad86
feat: Update BreakpointException to include the pipeline snapshot and where it is saved (#9888)
* Add snapshot and the full file path it was saved to breakpoint exception

* Add checks to test and simplify test

* Make both tests unit tests

* remove unused import

* update reno

* Add docstrings

* Updated reno

* Simplify test

* Uupdate test

* Fix mypy
2025-10-17 11:11:09 +02:00
Sebastian Husch Lee
fe60c765d9
refactor: Refactor _save_pipeline_snapshot and _create_pipeline_snapshot to handle more exceptions (#9871)
* Refactor saving pipeline snapshot to handle the try-except inside and to cover more cases (e.g. try-excepts around our serialization logic)

* Add reno

* Fix

* Adding tests

* More tests

* small change

* fix test

* update docstrings
2025-10-15 09:30:26 +00:00
Arya Tayshete
f8d6757eab
feat(converters): CSVToDocument supports row-level conversion (#9773)
* feat(converters): CSVToDocument row-level conversion (content_column, columns→meta) + tests + releasenote

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* feat(converters): CSVToDocument row-mode hardening + tests

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* test(converters): remove long commented line to satisfy ruff E501

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* fix(converters): avoid infinite loop

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* feat(converters): require content_column in run() for row mode; remove fallbacks; improve docstrings; update tests

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* feat(converters): content_column required in run method instead of init

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>

* feat(csv): row-mode with required run() arg ; update BDD pipeline tests

---------

Signed-off-by: Arya Tayshete <avtayshete_b21@et.vjti.ac.in>
2025-10-09 13:15:51 +00:00
Sebastian Husch Lee
5c69b08a76
fix: Fix Agent not raising BreakpointException for ToolBreakpoint with specific tool_name in assistant messages with multiple tool calls (#9853)
* Fix tool breakpoint triggering in Agent

* formatting

* fix formatting
2025-10-06 14:55:17 +02:00
David S. Batista
10e05b679f
feat: save last AgentSnapshot when Agent crashes (#9774)
* raise last good snapshot in PipelineRunTimeError + tests updates

* adding release notes

* renaming test file

* wip: PoC generating Agent snapshot + host pipeline snapshot and saving it to disk

* wip: agent tool error generates a valid snapshot file

* dealing with function seralisation/deserialisation

* wip: fixing typing issues

* fixing typing issues

* wip

* fixing types

* fixing tests

* extending tests for sudden crash + breakpoints and resume

* adding release notes

* merginng pipeline tests into single file

* adding missing test file

* WIP: PR comments/improvments

* set test as integration test

* refactor: Updates to saving an AgentSnapshot if execution fails (#9781)

* Updates

* Fix circular import

* Fixes

* Fix license header

* fixing typing

* fixing typing

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>

* Update haystack/utils/base_serialization.py

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* wip

* fixing tests

* updaing deserialisation

* updating more tests, reorganising breakpoints tests

* fixing bug in saving agent_snapshot

* updating tests

* updating tests

* updating tests

* adding tests for serialisation/deserialisation of functions

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
2025-09-16 09:46:35 +00:00
David S. Batista
f48789f5fe
feat: raise last good snapshot in PipelineRunTimeError + tests updates (#9758)
* raise last good snapshot in PipelineRunTimeError + tests updates

* adding release notes

* renaming test file

* PR comments + fixing tests
2025-09-03 13:46:33 +02:00
David S. Batista
6c7ae8f658
feat: pipeline checkpoints crash allow to resume from snapshot (#9743)
* initial PoC idea running

* removing test code

* cleaning up

* wip

* cleaning up demos

* adding more pipelines to test persistence saving

* wip

* wip

* working example for logging components inputs in run time

* reverting to a simpler solution for intermediate results

* cleaning up

* testing that in a crash components outputs/inputs up to the crash point are returned

* adding tests for state persistance in a RAG pipeline

* updataing tests for state persistance in a RAG pipeline

* removing use cases of agent tests

* adding LICENSE header

* adding LICENSE header

* adding release notes

* updating tests for mocked components only

* updating release notes

* adapting PipelineRuntimeError

* cleaning up tests

* fixing test pipeline crash components inputs/outputs are saved

* fixing tests for state persistance

* removing code

* removing code

* removing code

* updating release notes

* validating parameters

* cleaning

* wip: debugging

* removing persistance tests

* formatting

* formatting

* cleaning up code

* updating release notes

* adding missing docstrings

* typo in release notes

* Update haystack/core/pipeline/pipeline.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* PR comments

* handling potential issues with saving the snapshot file

* updating tests

* Update haystack/core/pipeline/pipeline.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update haystack/core/pipeline/pipeline.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* some more improvements

* fixing exxception

* fixing exception error name conflict

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-09-01 11:22:37 +02:00
David S. Batista
ac6a43f5d3
feat: raise components inputs/outputs during execution if an Exception occurs (#9742)
* initial PoC idea running

* removing test code

* cleaning up

* wip

* cleaning up demos

* adding more pipelines to test persistence saving

* wip

* wip

* working example for logging components inputs in run time

* reverting to a simpler solution for intermediate results

* cleaning up

* testing that in a crash components outputs/inputs up to the crash point are returned

* adding tests for state persistance in a RAG pipeline

* updataing tests for state persistance in a RAG pipeline

* removing use cases of agent tests

* adding LICENSE header

* adding LICENSE header

* adding release notes

* updating tests for mocked components only

* updating release notes

* adapting PipelineRuntimeError

* cleaning up tests

* fixing test pipeline crash components inputs/outputs are saved

* fixing tests for state persistance

* isolating changes

* cleaning

* updating release notes

* addding test for regular pipeline

* small improvements and updating release notes

* cleaning imports

* removing code

* improvements/fixes based on PR comments

* raising pipeline_outputs on async version of Pipeline

* fixing async versions + updating tests

* simplifying tests

* Suggested changes pipeline crash (#9744)

* Suggested changes

* Some cleanup

* Small changes

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-08-27 13:28:34 +02:00
Michele Pangrazzi
9ce48f9509
fix: raise RuntimeError when AsyncPipeline.run() is called from within an async context (#9712)
* Raise RuntimeError when AsyncPipeline.run() is called from an async context

* Add release note
2025-08-14 15:07:21 +00:00
Stefano Fiorucci
2259fb7b31
fix: fix wrong error message in Sentence Transformers Embedders (#9711) 2025-08-14 14:37:12 +02:00
JohnKagunda
b4bb6bde54
Fix/informative error message (#9661)
* fix: more informative error message when two components connect

* chore: releasenote

* fix: (PipelineBase.connect) disable C901 complexity check using noqa

* fix: (PipelineBase:connect) provided two exceptions: when  is not defined &&  is not defined

* test: added tests for the  related issues

* Update haystack/core/pipeline/base.py

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-08-13 09:39:48 +02:00
Abdelrahman Kaseb
5f3c37d287
chore: adopt PEP 585 type hints (#9678)
* chore(lint): enforce and apply PEP 585 type hinting

* Run fmt fixes

* Fix all typing imports using some regex

* Fix all typing written in string in tests

* undo changes in the e2e tests

* make e2e test use list instead of List

* type fixes

* remove type:ignore

* pylint

* Remove typing from Usage example comments

* Remove typing from most of comments

* try to fix e2e tests on comm PRs

* fix

* Add tests typing.List in to adjust test compatiplity
- test/components/agents/test_state_class.py
- test/components/converters/test_output_adapter.py
- test/components/joiners/test_list_joiner.py

* simplify pyproject

* improve relnote

---------

Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2025-08-07 10:23:14 +02:00
Sebastian Husch Lee
09476094fa
feat: Add support for the union operator | added in python 3.10 (#9650)
* Add support for | operator

* Add reno

* Use type(None) instead of NoneType

* Make custom UnionType private

* Add check that test should only run if python is 3.10+

* PR comments

* Update test/utils/test_type_serialization.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* Fix formatting

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-07-28 08:38:53 +00:00
David S. Batista
8af4cf8b01
chore: removing Pipeline.draw() deprecation warnings (#9651)
* cleaning up tests

* adding release notes
2025-07-24 12:35:19 +02:00
David S. Batista
3b9b1ae802
feat: adding debugging breakpoints to Pipeline and Agent (#9611)
* wip: fixing tests

* wip: fixing tests

* wip: fixing tests

* wip: fixing tests

* fixing circular imports

* decoupling resume and initial run() for agent

* adding release notes

* re-raising BreakPointException from pipeline.run()

* fixing imports

* refactor: Refactor suggestions for Pipeline breakpoints (#9614)

* Refactoring

* Start adding debug_path into Breakpoint class

* Fully move debug_path into Breakpoint dataclass

* Simplifications in pipeline run logic

* More simplification

* lint

* More simplification

* Updates

* Rename resume_state to pipeline_snapshot

* PR comments

* Missed renaming of state in a few more places

* feat: Add dataclasses to represent a `PipelineSnapshot` and refactored to use it (#9619)

* Refactor to use dataclasses for PipelineSnapshot and AgentSnapshot

* Fix integration tests

* Mypy

* Fix mypy

* Fix lint

* Refactor AgentSnapshot to only contain needed info

* Fix mypy

* More refactoring

* removing unused import

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>

* feat: saving include_outputs_from intermediate results to `PipelineState` object (#9629)

* saving intermediate components results in include_outputs_from into the PipelineSnaptshot

* cleaning up

* fixing tests

* fixing tests

* extending tests

* Update haystack/dataclasses/breakpoints.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update haystack/dataclasses/breakpoints.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* linting

* moving intermediate results to pipeline state and adding pipeline outputs to state

* moving ordered_component_names and include_outputs_from to PipelineSnapshot

* moving original_input_data to PipelineSnapshot

* simplifying saving the intermediate results

* Update haystack/dataclasses/breakpoints.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update haystack/dataclasses/breakpoints.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update haystack/dataclasses/breakpoints.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update haystack/dataclasses/breakpoints.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* linting

* cleaning up

* avoiding creating PipelineSnapshot for every component run

* removing unecessary code

* Update checks in Agent to not unecessarily create AgentSnapshot when not needed.

* Update haystack/components/agents/agent.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* Update haystack/components/agents/agent.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* cleaning up tests

* linting

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
Co-authored-by: Sebastian Husch Lee <sjrl423@gmail.com>
2025-07-24 08:54:23 +00:00
Sebastian Husch Lee
7a63559faf
feat: Raise warning if the pipeline is unable to continue running due to a blocked component (#9569)
* First pass at alerting a user that the pipeline is blocked

* Change approach and add change to async pipeline

* Fix check in run_async

* Another fix

* Somehow also fixed the max_runs_per_component

* Align sync run and async run component

* Update output type of component outputs to Mapping to align with our protocol

* linting

* ruff

* Make it a core test

* Add reno

* Some refactoring

* Linting

* Fix mypy

* Converting to warning

* Small changes

* Update release note

* More cleanup

* PR comment

* PR comments
2025-07-15 14:02:39 +00:00
Sebastian Husch Lee
34f871d6e3
feat: Explicitly test support for builtin python 3.9+ types (#9606)
* Updating tests

* More tests

* More tests

* More tests

* More tests

* Get bare types to work with builtins

* Add reno

* PR comments

---------

Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-07-14 09:14:44 +00:00
Sebastian Husch Lee
85258f0654
fix: Fix types and formatting pipeline test_run.py (#9575)
* Fix types in test_run.py

* Get test_run.py to pass fmt-check

* Add test_run to mypy checks

* Update test folder to pass ruff linting

* Fix merge

* Fix HF tests

* Fix hf test

* Try to fix tests

* Another attempt

* minor fix

* fix SentenceTransformersDiversityRanker

* skip integrations tests due to model unavailable on HF inference

---------

Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2025-07-03 09:49:09 +02:00
Stefano Fiorucci
f8155e1b77
chore: clean up (#9504) 2025-06-11 11:05:05 +02:00
David S. Batista
da60156174
chore: removing unused imports from tests (#9446) 2025-05-26 16:22:51 +00:00
David S. Batista
3342f17f01
feat: draw/show SuperComponents in detail, expand it and show it's internal components in the visualisation diagram (#9389)
* initial import

* small fixes

* adding tests

* adding tests

* refactoring merge graphs

* updating tests

* docstrings

* adding release notes

* adding SuperComponent name to extended components

* adding colours and legend to different super components

* adding missed docstring parameter

* fixing tests and type checking

* Update haystack/core/pipeline/base.py

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>

* forcing keyword arguments for draw() and show()

* adding wrapper function and a deprecation warning

* adding pylint disable - this will be removed soon

* wip

* adding a decorator function to test if another function is being called with positional arguments

* adding a decorator function to test if another function is being called with positional arguments

---------

Co-authored-by: Sebastian Husch Lee <10526848+sjrl@users.noreply.github.com>
2025-05-23 10:21:44 +02:00
Vladimir Blagojevic
167229f328
feat: Extend AnswerBuilder for Agent (#9406)
* Extend AnswerBuilder for Agent

* Update tests

* Add reno note

* PR feedback

* Add a better unit test

* Update haystack/components/builders/answer_builder.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* Update haystack/components/builders/answer_builder.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* PR feedback

* Remove copy

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-05-22 14:32:36 +02:00
Sebastian Husch Lee
6bef2c36bb
perf: Don't deepcopy Components, Tools, or Toolsets (#9356)
* Don't copy components

* Use deepcopy_with_fallback in more places and don't deepcopy Components, Tools or Toolsets

* Slight change

* Slightly update tests

* Refactor function based on PR feedback

* Add reno

* Fix lint

* Simplify tests, rename function, PR comments

* Fix mypy

* Undo typing
2025-05-08 12:48:08 +00:00
Sebastian Husch Lee
4ce6934dd9
fix: Update deepcopying in Pipeline to have a fallback in case of error (#9346)
* First pass at fix for deepcopying inputs and outputs

* Add reno

* Add recursion for dict objects

* Bump recursion depth

* More tests and some improvments

* Fix unit tests

* PR comments
2025-05-06 11:49:45 +00:00
David S. Batista
04e4701a17
chore: cleaning unused imports from core tests 2025-04-29 18:09:11 +02:00
Stefano Fiorucci
df662daaef
test: improve some slow tests (#9297)
* test: improve slow tests

* rm leftover and improve test
2025-04-24 08:50:36 +02:00
Sebastian Husch Lee
185e1c79c9
feat: Agent tracing (#9240)
* Agent tracing

* Small changes

* Some changes and refactoring

* Refactoring to reuse code

* Fix

* Add reno

* Fix tests

* Fix tests

* Fix linting

* Refactor and add tracing support to run_async of Agent

* Reduce duplicate code

* Remove finalize_run

* Use break instead of copying code three times

* Adding a test

* Add tracing unit tests

* Make async tracing test actually run async

* Increase test coverage

* Unit test for traces in pipeline

* Add cleanup

* Fix proper indentation

* PR comments

* PR comments and new test

* Update warning message

* Update warning message

---------

Co-authored-by: Vladimir Blagojevic <dovlex@gmail.com>
2025-04-15 15:58:26 +02:00
Sebastian Husch Lee
6dbc1ff27b
enhancement: Add attributes to PipelineRuntimeError (#9182)
* Start refactoring PipelineRuntimeError

* Slight change

* Fix test and remove test that had no asserts

* Change back to pipeline runtime error

* PR comments

* Add reno

* PR comments

* Update test
2025-04-09 08:18:50 +02:00
David S. Batista
108fc3b4a2
test: adding Pipeline component name checks - cannot have . (dot characters) (#9155)
* adding component name checks + tests

* fixes
2025-04-01 16:45:04 +02:00
Stefano Fiorucci
7135945e01
test: temporarily skip test_to_mermaid_image integration test (#9121) 2025-03-27 11:46:20 +00:00
Mohammed Abdul Razak Wahab
54743964fd
Add compatibility checks for Callable types (#9033)
* Add compatibility checks for Callable types

* add release notes

* Update test_type_utils.py

Fix license header

* Update type_utils.py

Fix license header

---------

Co-authored-by: Michele Pangrazzi <xmikex83@gmail.com>
2025-03-27 11:54:10 +01:00
Stefano Fiorucci
f9cce8bf30
test: skip/remove some Pipeline.draw integration tests (#9108) 2025-03-25 13:13:42 +01:00
Amna Mubashar
1005a5ec92
enhancement: add detailed error message for failed component run (#9105)
* Enhance the error message

* Add release note

* Update test_pipeline.py
2025-03-25 12:25:42 +01:00
Amna Mubashar
833109900c
fix: improve error message for incorrect component types (#9066)
* Update error statement


* Add a new test

---------

Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
2025-03-20 13:23:57 +01:00
Mohammed Abdul Razak Wahab
7291134680
feat: Improve type validation for bare types (#8997)
* feat: Improve type validation for bare types

* added release notes

* refactor

* resolve review comments

* address review comments

* Update haystack/core/type_utils.py

---------

Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
2025-03-11 08:48:26 +01:00
Sebastian Husch Lee
24084e6431
Fix tests (#8990) 2025-03-06 11:17:57 +01:00
Stefano Fiorucci
bb0e36f712
feat: increase Mermaid timeout and make it configurable (#8973)
* increase Mermaid timeout and make it configurable

* rm e2e trigger

* simplify test
2025-03-05 10:49:34 +00:00
Stefano Fiorucci
f3c44be904
refactor!: remove dataframe field from Document and ExtractedTableAnswer; make pandas optional (#8906)
* remove dataframe

* release note

* small fix

* group imports

* Update pyproject.toml

Co-authored-by: Julian Risch <julian.risch@deepset.ai>

* Update pyproject.toml

Co-authored-by: Julian Risch <julian.risch@deepset.ai>

* address feedback

---------

Co-authored-by: Julian Risch <julian.risch@deepset.ai>
2025-03-04 11:06:07 +00:00
Sebastian Husch Lee
296e31c182
feat: Add Type Validation parameter for Pipeline Connections (#8875)
* Starting to refactor type util tests to be more systematic

* refactoring

* Expand tests

* Update to type utils

* Add missing subclass check

* Expand and refactor tests, introduce type_validation Literal

* More test refactoring

* Test refactoring, adding type validation variable to pipeline base

* Update relaxed version of type checking to pass all newly added tests

* trim whitespace

* Add tests

* cleanup

* Updates docstrings

* Add reno

* docs

* Fix mypy and add docstrings

* Changes based on advice from Tobi

* Remove unused imports

* Doc strings

* Add connection type validation to to_dict and from_dict

* Update tests

* Fix test

* Also save connection_type_validation at global pipeline level

* Fix tests

* Remove connection type validation from the connect level, only keep at pipeline level

* Formatting

* Fix tests

* formatting
2025-03-03 16:00:22 +01:00
mathislucka
ee81570f37
fix: only overwrite existing socket inputs when we provide a new value (#8940)
* fix: only overwrite existing socket inputs when we provide a new value

* chore: add release notes

* Apply suggestions from code review

---------

Co-authored-by: Julian Risch <julian.risch@deepset.ai>
2025-02-27 09:13:41 +00:00
mathislucka
76753fd4c6
fix: reduce number of edge cases where lazy variadic components wait for inputs that can't arrive anymore (#8907)
* wip

* fix: running order with lazy variadic components

* fix: tests

* format

* comment

* fix: alternative approach to fixing running order

* unused imports

* revert fix

* remove unneeded return

* remove data based approach to tie breaking

* release note

* trailing spaces

* newline eof

* unused import

* add more explanations to release note
2025-02-24 15:17:17 +00:00
David S. Batista
7d51793727
chore: cleaning up unused imports in tests (#8887) 2025-02-20 16:56:16 +00:00
mathislucka
8c54f06a19
fix: component checks failing for components that return dataframes (#8873)
* fix: use is not to compare to sentinel value

* chore: release notes

* Update releasenotes/notes/fix-component-checks-with-ambiguous-truth-values-949c447b3702e427.yaml

Co-authored-by: David S. Batista <dsbatista@gmail.com>

* fix: another sentinel value

* test: also test base class

* add pandas as test dependency

* format

* Trigger CI

* mark test with xfail strict=False

---------

Co-authored-by: Sebastian Husch Lee <sjrl@users.noreply.github.com>
Co-authored-by: David S. Batista <dsbatista@gmail.com>
Co-authored-by: anakin87 <stefanofiorucci@gmail.com>
2025-02-19 09:10:48 +00:00
Sebastian Husch Lee
2ca32ff036
refactor: Refactor and expand tests for type utils (#8871)
* Refactored type utils tests

* minor changes
2025-02-18 11:54:37 +01:00
mathislucka
e5b9bdeb66
feat: AsyncPipeline that can schedule components to run concurrently (#8812)
* add component checks

* pipeline should run deterministically

* add FIFOQueue

* add agent tests

* add order dependent tests

* run new tests

* remove code that is not needed

* test: intermediate from cycle outputs are available outside cycle

* add tests for component checks (Claude)

* adapt tests for component checks (o1 review)

* chore: format

* remove tests that aren't needed anymore

* add _calculate_priority tests

* revert accidental change in pyproject.toml

* test format conversion

* adapt to naming convention

* chore: proper docstrings and type hints for PQ

* format

* add more unit tests

* rm unneeded comments

* test input consumption

* lint

* fix: docstrings

* lint

* format

* format

* fix license header

* fix license header

* add component run tests

* fix: pass correct input format to tracing

* fix types

* format

* format

* types

* add defaults from Socket instead of signature

- otherwise components with dynamic inputs would fail

* fix test names

* still wait for optional inputs on greedy variadic sockets

- mirrors previous behavior

* fix format

* wip: warn for ambiguous running order

* wip: alternative warning

* fix license header

* make code more readable

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* Introduce content tracing to a behavioral test

* Fixing linting

* Remove debug print statements

* Fix tracer tests

* remove print

* test: test for component inputs

* test: remove testing for run order

* chore: update component checks from experimental

* chore: update pipeline and base from experimental

* refactor: remove unused method

* refactor: remove unused method

* refactor: outdated comment

* refactor: inputs state is updated as side effect

- to prepare for AsyncPipeline implementation

* format

* test: add file conversion test

* format

* fix: original implementation deepcopies outputs

* lint

* fix: from_dict was updated

* fix: format

* fix: test

* test: add test for thread safety

* remove unused imports

* format

* test: FIFOPriorityQueue

* chore: add release note

* feat: add AsyncPipeline

* chore: Add release notes

* fix: format

* debug: switch run order to debug ubuntu and windows tests

* fix: consider priorities of other components while waiting for DEFER

* refactor: simplify code

* fix: resolve merge conflict with mermaid changes

* fix: format

* fix: remove unused import

* refactor: rename to avoid accidental conflicts

* fix: track pipeline type

* fix: and extend test

* fix: format

* style: sort alphabetically

* Update test/core/pipeline/features/conftest.py

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* Update test/core/pipeline/features/conftest.py

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* Update releasenotes/notes/feat-async-pipeline-338856a142e1318c.yaml

* fix: indentation, do not close loop

* fix: use asyncio.run

* fix: format

---------

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-02-07 16:37:29 +01:00
mathislucka
eec91824bc
fix: pipeline run bugs in cyclic and acyclic pipelines (#8707)
* add component checks

* pipeline should run deterministically

* add FIFOQueue

* add agent tests

* add order dependent tests

* run new tests

* remove code that is not needed

* test: intermediate from cycle outputs are available outside cycle

* add tests for component checks (Claude)

* adapt tests for component checks (o1 review)

* chore: format

* remove tests that aren't needed anymore

* add _calculate_priority tests

* revert accidental change in pyproject.toml

* test format conversion

* adapt to naming convention

* chore: proper docstrings and type hints for PQ

* format

* add more unit tests

* rm unneeded comments

* test input consumption

* lint

* fix: docstrings

* lint

* format

* format

* fix license header

* fix license header

* add component run tests

* fix: pass correct input format to tracing

* fix types

* format

* format

* types

* add defaults from Socket instead of signature

- otherwise components with dynamic inputs would fail

* fix test names

* still wait for optional inputs on greedy variadic sockets

- mirrors previous behavior

* fix format

* wip: warn for ambiguous running order

* wip: alternative warning

* fix license header

* make code more readable

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* Introduce content tracing to a behavioral test

* Fixing linting

* Remove debug print statements

* Fix tracer tests

* remove print

* test: test for component inputs

* test: remove testing for run order

* chore: update component checks from experimental

* chore: update pipeline and base from experimental

* refactor: remove unused method

* refactor: remove unused method

* refactor: outdated comment

* refactor: inputs state is updated as side effect

- to prepare for AsyncPipeline implementation

* format

* test: add file conversion test

* format

* fix: original implementation deepcopies outputs

* lint

* fix: from_dict was updated

* fix: format

* fix: test

* test: add test for thread safety

* remove unused imports

* format

* test: FIFOPriorityQueue

* chore: add release note

* fix: resolve merge conflict with mermaid changes

* fix: format

* fix: remove unused import

* refactor: rename to avoid accidental conflicts

* chore: remove unused inputs, add missing license header

* chore: extend release notes

* Update releasenotes/notes/fix-pipeline-run-2fefeafc705a6d91.yaml

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>

* fix: format

* fix: format

* Update release note

---------

Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
Co-authored-by: David S. Batista <dsbatista@gmail.com>
2025-02-06 14:19:47 +00:00
David S. Batista
f1652121ac
feat: Add support for custom (or offline) Mermaid.ink server and support all parameters (#8799)
* compress graph data to support pako endpoint

* support mermaid.ink parameters and custom servers

* dont try to resolve conflicts with the github web ui...

* avoid double graph copy

* fixing typing, improving docstrings and release notes

* reverting type

* nit - force type checker no cache

* nit - force type checker no cache

---------

Co-authored-by: Ulises M <ulises@lbux.org>
Co-authored-by: Ulises M <30765968+lbux@users.noreply.github.com>
2025-02-03 15:55:29 +01:00
tstadel
3119ae1ec9
refactor: raise PipelineError when Pipeline.from_dict receives an invalid type (#8711)
* fix: error on invalid type

* add reno

* Update releasenotes/notes/fix-invalid-component-type-error-83ee00d820b63cc5.yaml

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* Update test/core/pipeline/test_pipeline.py

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>

* fix reno

* fix reno

* last reno fix

---------

Co-authored-by: Stefano Fiorucci <stefanofiorucci@gmail.com>
2025-01-23 11:40:19 +00:00