Skip to content
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

feat: Deprecate max_loops_allowed in favour of new argument max_runs_per_component #8354

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

silvanocerza
Copy link
Contributor

Related Issues

Proposed Changes:

This PR deprecates the existing Pipeline init argument max_loops_allowed in favor of the newly added max_runs_per_component.

This doesn't change any internal behaviour as max_loops_allowed was actually used to verify the number of runs per Component.

To reflect the name change of the init argument I also deprecated the PipelineMaxLoops exception in favor of the new PipelineMaxComponentRuns.

Pipeline.to_dict() doesn't save max_loops_allowed anymore but just max_runs_per_component.
Pipeline.from_dict() instead still supports max_loops_allowed if found.

How did you test it?

I added new tests and fixed the broken ones.

Notes for the reviewer

N/A

Checklist

@silvanocerza silvanocerza self-assigned this Sep 11, 2024
@silvanocerza silvanocerza requested review from a team as code owners September 11, 2024 14:27
@silvanocerza silvanocerza requested review from dfokina, vblagoje and shadeMe and removed request for a team September 11, 2024 14:27
@silvanocerza silvanocerza removed the request for review from vblagoje September 11, 2024 14:27
@silvanocerza silvanocerza changed the title feat: Deprecate max_loops_allowed in favour of new argument max_runs_per_component` feat: Deprecate max_loops_allowed in favour of new argument max_runs_per_component Sep 11, 2024
haystack/core/pipeline/base.py Outdated Show resolved Hide resolved
@coveralls
Copy link
Collaborator

coveralls commented Sep 11, 2024

Pull Request Test Coverage Report for Build 10815083488

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 44 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.003%) to 90.308%

Files with Coverage Reduction New Missed Lines %
core/pipeline/pipeline.py 8 79.55%
core/pipeline/base.py 36 92.19%
Totals Coverage Status
Change from base Build 10813169972: -0.003%
Covered Lines: 7184
Relevant Lines: 7955

💛 - Coveralls

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

Successfully merging this pull request may close these issues.

Rename Pipeline.__init__() argument max_loops_allowed as it is misleading
3 participants