Skip to content

🐛 Make RL circuit sampling seed-aware - #781

Merged
flowerthrower merged 1 commit into
v3/667-stochastic-actionsfrom
v3/reproducible-rl-seeding
Aug 27, 2026
Merged

flowerthrower merged 1 commit into
v3/667-stochastic-actionsfrom
v3/reproducible-rl-seeding

Conversation

@flowerthrower

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Makes RL training-circuit sampling follow Gymnasium's standard seed lifecycle.

PredictorEnv now uses self.np_random, which is initialized and reseeded by Env.reset(seed=...), instead of a separate generator fixed to seed 10. Training-circuit paths are sorted before indexed sampling so equal seeds select equal circuits across filesystems.

Compiler-specific seeds, flat-policy defaults, ML estimator seeds, and experiment-only RNGs are unchanged because they already match the intended behavior or are outside this PR's scope.

This draft is stacked on #780. It intentionally contains only the raw seeding fix; documentation and new tests are deferred.

Validation

  • repeated reset(seed=7) selects the same training circuit
  • complete audit of seed and RNG sites under src/
  • git diff --check

Checklist

  • The pull request only contains focused changes required for this fix.
  • New tests and documentation are intentionally deferred while the feature stack is assembled.
  • I reviewed the complete base-to-head diff.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖.
  • 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 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/mqt/predictor/rl/helper.py 0.0% 2 Missing ⚠️
src/mqt/predictor/rl/predictorenv.py 0.0% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@flowerthrower
flowerthrower force-pushed the v3/reproducible-rl-seeding branch from 4010c51 to d730db4 Compare August 27, 2026 11:08
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 d730db4 to 788afde Compare August 27, 2026 13:09
Base automatically changed from v3/paper-tket-passes to v3/667-stochastic-actions August 27, 2026 13:10
@flowerthrower
flowerthrower merged commit 788afde into main Aug 27, 2026
1 of 3 checks passed
@flowerthrower
flowerthrower deleted the v3/reproducible-rl-seeding branch August 27, 2026 13:10
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