Skip to content

✨ Add configurable RL pass timeouts - #778

Merged
flowerthrower merged 0 commit into
v3/paper-reward-parityfrom
v3/configurable-pass-timeouts
Aug 27, 2026
Merged

flowerthrower merged 0 commit into
v3/paper-reward-parityfrom
v3/configurable-pass-timeouts

Conversation

@flowerthrower

@flowerthrower flowerthrower commented Aug 27, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Adds an opt-in timeout for individual RL compilation passes during training and inference.

  • Add pass_timeout to Predictor.train_model for training.
  • Add a separate pass_timeout to Predictor.compile_as_predicted, rl_compile, and qcompile for inference.
  • Keep pass execution unbounded by default.
  • Truncate the current episode through the existing action-error path when a pass times out.
  • Restore per-call timeout settings so singleton predictors do not leak them between training and inference calls.

The lightweight implementation uses POSIX real-time signals on the main thread. Unsupported platforms or worker threads emit a warning and continue without a timeout.

This PR is stacked on #782.

Codex materially assisted with implementation, tests, validation, and drafting this description. Human review remains required.

Validation

  • uvx nox -s lint
  • focused pass-timeout tests (6 passed)
  • existing non-training RL predictor tests (29 passed, 2 deselected)

The broader local suite reached an existing BQSKit worker startup failure (ConnectionRefusedError) and was stopped after making no progress. CI remains the authoritative integration run.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.33333% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/mqt/predictor/rl/predictorenv.py 77.7% 10 Missing ⚠️
src/mqt/predictor/rl/predictor.py 80.0% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch 2 times, most recently from 811d549 to c43eb9f Compare August 27, 2026 10:47
@flowerthrower
flowerthrower changed the base branch from v3/670-intermediate-rewards to v3/paper-reward-parity August 27, 2026 10:50
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch 2 times, most recently from 2f66c32 to f588405 Compare August 27, 2026 11:08
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from f588405 to 9045fa4 Compare August 27, 2026 13:09
@flowerthrower
flowerthrower merged commit 9045fa4 into main Aug 27, 2026
@flowerthrower
flowerthrower deleted the v3/configurable-pass-timeouts branch August 27, 2026 13:09
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.

1 participant