Skip to content

Conversation

@a-klos
Copy link
Member

@a-klos a-klos commented Sep 3, 2025

This pull request introduces enhanced configurability and reliability to the summarization workflow by adding granular retry and concurrency settings, and refactoring the summarizer to use them. The changes allow for more robust handling of transient failures and better control over resource usage.

Configuration enhancements:

  • Added new retry-related fields (e.g., max_retries, retry_base_delay, retry_max_delay, backoff_factor, attempt_cap, jitter_min, jitter_max) to the SummarizerSettings class, allowing fine-grained control over retry behavior for summarization tasks. [1] [2]
  • Fixed a typo in the SummarizerSettings field name from maximum_concurrreny to maximum_concurrency. [1] [2]

Dependency injection and wiring:

  • Registered RetryDecoratorSettings in the dependency container and passed both summarizer and global retry settings to the LangchainSummarizer instance, enabling summarizer-specific overrides. [1] [2] [3]

Summarizer logic refactoring:

  • Refactored the summarization logic in LangchainSummarizer to:
    • Use asynchronous chunk summarization with concurrency control via a semaphore.
    • Implement retry logic with exponential backoff and jitter for chunk summarization, using the new settings for configuration.
    • Cleaned up error handling and removed redundant retry code in favor of the new decorator-based approach. [1] [2] [3]

These changes collectively improve the reliability, configurability, and maintainability of the summarization pipeline.

fixes partly following issue

#87

@huhn511 huhn511 requested a review from Copilot September 23, 2025 15:18
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces enhanced configurability and reliability to the summarization workflow by adding retry logic with exponential backoff and jitter, and refactoring the summarizer to use the retry decorator pattern.

  • Adds granular retry configuration fields to SummarizerSettings with optional override capabilities
  • Refactors LangchainSummarizer to use async chunk processing with the retry decorator pattern
  • Updates dependency injection to wire retry settings and fixes the typo in maximum_concurrency

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
langchain_summarizer.py Refactored to use async chunk processing with retry decorator and exponential backoff
summarizer_settings.py Added optional retry configuration fields and fixed typo in maximum_concurrency
dependency_container.py Added retry decorator settings registration and updated summarizer wiring
README.md Added documentation for summarizer retry behavior configuration
values.yaml Added default retry configuration values for summarizer

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@a-klos a-klos requested a review from manu-hoffmann October 8, 2025 08:16
@a-klos a-klos merged commit 8acf200 into feat/exponential-retry-decorator Oct 9, 2025
2 checks passed
@a-klos a-klos deleted the refactor/langchain_summarizer branch October 9, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants