Skip to content

Fix ramp halt timing and add ramp window coverage - #26

Merged
hemanth-asirvatham merged 1 commit into
mainfrom
fix-parallelization-ramping-and-error-reporting-ol97yh
Feb 7, 2026
Merged

Fix ramp halt timing and add ramp window coverage#26
hemanth-asirvatham merged 1 commit into
mainfrom
fix-parallelization-ramping-and-error-reporting-ol97yh

Conversation

@hemanth-asirvatham

Copy link
Copy Markdown
Collaborator

Motivation

  • Ensure the initial concurrency ramp only gets frozen if a rate-limit or connection error occurs during the active ramp window, and not after the ramp completes.
  • Make parallelization status updates more informative by surfacing per-interval deltas for rate-limit and connection errors.
  • Provide deterministic behavior and coverage so the ramp behavior is well-tested for both in-window and post-window error cases.

Description

  • Prevent _halt_ramp_up() from taking effect after the ramp window by returning early when time.time() >= ramp_up_end_time.
  • Immediately call _halt_ramp_up() from worker error handlers on first observed rate-limit or connection errors to lock the ramp while it is still active.
  • Add _maybe_emit_ramp_complete() (and call it from the embeddings worker loop) to log/print a ramp-complete message when the ramp window elapses.
  • Include per-period denominators and delta counts for rate_limit_errors and connection_errors in emit_parallelization_status() and track/reset rate_limit_errors_since_last_status in the reporter loop.
  • Improve first-error logging for rate-limit and connection events to also print to stdout when message_verbose is enabled.
  • Tests updated: make test_ramp_up_halts_on_rate_limit assert that a halting message is printed and add test_ramp_up_does_not_halt_after_window to verify that a late error (after the ramp window) does not halt the ramp.

Testing

  • Ran the focused tests with python -m pytest tests/test_parallelization_tuning.py, and all tests passed (8 passed in 4.52s).
  • Changes exercised include the new halting logic and the added post-window coverage test which both succeeded.

Codex Task

@github-actions

github-actions Bot commented Feb 7, 2026

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@hemanth-asirvatham
hemanth-asirvatham merged commit 95cf4df into main Feb 7, 2026
1 check failed
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 7, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant