Skip to content

Fix/summary v2#1233

Merged
FloChehab merged 2 commits intomainfrom
fix/summary-v2
Apr 15, 2026
Merged

Fix/summary v2#1233
FloChehab merged 2 commits intomainfrom
fix/summary-v2

Conversation

@FloChehab
Copy link
Copy Markdown
Collaborator

Quick fixes on the new summary v2 tasks (see commits).

@FloChehab FloChehab force-pushed the fix/summary-v2 branch 2 times, most recently from 2394338 to 2cf2e4e Compare April 2, 2026 21:13
@FloChehab FloChehab requested a review from lebaudantoine April 2, 2026 21:13
Copy link
Copy Markdown
Collaborator

@cameledev cameledev left a comment

Choose a reason for hiding this comment

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

Good catch. As far as I have seen, it seems like numbers, never have start / stop.

Comment on lines +515 to +519
logger.info(
"Transcribe task %s failed, %s retries left.",
task_id,
n_retries_left,
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This message can be a bit confusing. If I understand properly, it will say "0 retries left." and then retry.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nope, it will not retry.

Comment on lines +573 to +574
n_retries_left = sender.max_retries - sender.request.retries - 1
if n_retries_left <= 0:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same comment.

Comment on lines +588 to +593
else:
logger.info(
"Summary task %s failed, %s retries left.",
task_id,
n_retries_left,
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

same comment

Comment thread src/summary/tests/models/test_whisper_x_response.py
Comment thread CHANGELOG.md Outdated
Comment on lines +502 to +500
if task.request.retries >= task.max_retries:
n_retries_left = sender.max_retries - sender.request.retries - 1
if n_retries_left <= 0:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This changes the current behavior. Is this intentional ?

ex:

  • task.request.retries = 1
  • task.max_retries = 2

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

If retries = 1, it means that the task has been tried twice. And in your case it shouldn't be retry anymore (so we are good from my pov). There was an off by one error before.

Copy link
Copy Markdown
Collaborator

@lebaudantoine lebaudantoine left a comment

Choose a reason for hiding this comment

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

Overall, reviewing this PR gives me the impression that we should further battle-test the recent changes in the staging environment before considering a release. There is a significant risk of introducing regressions, as several refactored components were not tested.

I suggest we schedule a few sessions on the staging environment with transcription enabled to validate behavior and catch potential issues early.

Comment thread src/summary/summary/core/celery_worker.py
Computation was off by 1.
Also improve the logging.
Sometimes whisperX response is partial, we don't
want to crash in such case.
@FloChehab FloChehab merged commit 451be40 into main Apr 15, 2026
19 of 22 checks passed
@FloChehab FloChehab deleted the fix/summary-v2 branch April 15, 2026 08:12
@sonarqubecloud
Copy link
Copy Markdown

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.

3 participants