Skip to content

Bootstrap resampling is unseeded, making campaign re-runs non-reproducible #86

Description

@anurag-r20

Problem

src/bootstrap.py's resampling calls (np.random.choice, np.random.randint)
draw from the global numpy random state without ever seeding it. No caller in
examples/IBM_QAOA sets a seed either.

The practical effect, observed while building the PSS window-sticker
campaign in #84: re-running the same campaign end-to-end can yield visibly
different Pareto-frontier plots between runs — not because of a code change,
but because bootstrap resampling produces a different sample each time,
which shifts which method wins narrow near-tie regions of the frontier. It
also means the number of surviving actionable-fit rows in
run_stochastic_benchmark_pss can vary between otherwise-identical runs
(related to, but distinct from, the exact-resource-matching issue in #85).

Ask

Add an optional seed parameter (or a documented way to fix np.random's
state) through the bootstrap path, so a campaign run can be made
reproducible when that's wanted, while leaving the default behavior
unseeded for existing callers that rely on fresh randomness across runs.

Filed per review feedback on #84.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions