Skip to content

feat: adding debugging breakpoints to Pipeline and Agent #9611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

davidsbatista
Copy link
Contributor

@davidsbatista davidsbatista commented Jul 14, 2025

Related Issues

Proposed Changes:

  • adding breakpoints to Pipeline and Agent

How did you test it?

  • unit tests, integration tests, manual verification

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@coveralls
Copy link
Collaborator

coveralls commented Jul 15, 2025

Pull Request Test Coverage Report for Build 16472792327

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 71 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+0.07%) to 90.802%

Files with Coverage Reduction New Missed Lines %
core/errors.py 1 93.62%
components/agents/agent.py 6 96.96%
core/pipeline/pipeline.py 9 91.96%
components/tools/tool_invoker.py 18 88.09%
core/pipeline/base.py 37 87.03%
Totals Coverage Status
Change from base Build 16472761327: 0.07%
Covered Lines: 12853
Relevant Lines: 14155

💛 - Coveralls

@davidsbatista davidsbatista changed the title Feat/breakpoints feat: adding debugging breakpoints to Pipeline and Agent Jul 15, 2025
sjrl and others added 5 commits July 16, 2025 15:16
* 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
…d 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>
…ate` 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>
@davidsbatista davidsbatista marked this pull request as ready for review July 23, 2025 11:36
@davidsbatista davidsbatista requested a review from a team as a code owner July 23, 2025 11:36
@davidsbatista davidsbatista requested a review from a team as a code owner July 23, 2025 11:36
@davidsbatista davidsbatista requested review from dfokina and sjrl and removed request for a team July 23, 2025 11:36
# Handle resuming the pipeline from a snapshot
component_visits = pipeline_snapshot.pipeline_state.component_visits
ordered_component_names = pipeline_snapshot.ordered_component_names
data = self._prepare_component_input_data(pipeline_snapshot.pipeline_state.inputs)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this data variable is never read - need to review exactly whats happening here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants