Skip to content

✨ Add configurable RL pass timeouts - #798

Draft
flowerthrower wants to merge 8 commits into
v3/reproducible-rl-seedingfrom
v3/configurable-pass-timeouts
Draft

flowerthrower wants to merge 8 commits into
v3/reproducible-rl-seedingfrom
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.

pass_timeout is exposed through the existing entry points and remains disabled by default. Every compilation action receives the same user-provided value. A timeout truncates through the existing action-error path, and per-call settings are restored so singleton predictors do not leak timeout state.

The general watchdog uses POSIX real-time signals on the main thread. Qiskit's VF2 searches additionally run in an isolated worker with a hard deadline, and the same value is forwarded to Qiskit's and TKET's native search limits. Platforms or worker threads without POSIX signal support warn and continue without the general watchdog.

Reward policy is intentionally owned by the following reward PR.

This is position 7 of the stack. It depends on #797 and is followed by #799. No new package dependencies are introduced.

Part of #664

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.

@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from 1efd38a to 9446b53 Compare August 27, 2026 14:16
@flowerthrower flowerthrower added enhancement New feature or request major Part of a major release labels Aug 27, 2026
@flowerthrower flowerthrower self-assigned this Aug 27, 2026
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from 9446b53 to f8f444f Compare August 27, 2026 14:46
@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from 161f01b to af74f07 Compare August 27, 2026 14:46
@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from af74f07 to 261f5b6 Compare August 27, 2026 15:02
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from f8f444f to 0302862 Compare August 27, 2026 15:02
@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from 261f5b6 to d37a988 Compare August 27, 2026 15:07
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from 0302862 to d3609ee Compare August 27, 2026 15:07
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.40367% with 17 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/actions/qiskit_actions.py 88.5% 4 Missing ⚠️
src/mqt/predictor/rl/predictor.py 80.0% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from d37a988 to 71115b6 Compare August 28, 2026 07:29
flowerthrower added a commit that referenced this pull request Aug 28, 2026
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from d3609ee to db2cee4 Compare August 28, 2026 07:33
@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from 71115b6 to 5a8e054 Compare August 28, 2026 07:51
flowerthrower added a commit that referenced this pull request Aug 28, 2026
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from db2cee4 to 7606d81 Compare August 28, 2026 07:52
@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from 5a8e054 to bb645a9 Compare August 28, 2026 08:13
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from 7606d81 to 5e9d1d7 Compare August 28, 2026 08:13
@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from bb645a9 to 7fe4c45 Compare August 28, 2026 08:30
flowerthrower added a commit that referenced this pull request Aug 28, 2026
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from 5e9d1d7 to 837159b Compare August 28, 2026 08:30
@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from 7fe4c45 to 47f02c1 Compare August 28, 2026 09:57
flowerthrower added a commit that referenced this pull request Aug 28, 2026
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from 837159b to dd6fd15 Compare August 28, 2026 09:57
Assisted-by: GPT-5.6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Assisted-by: GPT-5.6 via Codex

Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>
Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>

Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>

Assisted-by: GPT 5.6 via Codex
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>

Assisted-by: GPT 5.6 via Codex
@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from 47f02c1 to 144229c Compare August 28, 2026 10:18
@flowerthrower
flowerthrower force-pushed the v3/configurable-pass-timeouts branch from e802a3f to 3943b1b Compare August 28, 2026 10:18
Signed-off-by: flowerthrower <flowerthrower@users.noreply.github.com>

Assisted-by: GPT 5.6 via Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request major Part of a major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant