Skip to content

simulate_convergence ignores a different random_seed once the study is finished #1236

Open

Description

@thc1006

When the logs already hold max_simulations rows, simulate_convergence runs nothing and returns []. The random_seed it was given is never compared with the seed the logs record, so a different one goes unnoticed. One batch short of that, the same call raises.

kwargs = dict(target_attribute="apogee", tolerance=1e-12, batch_size=2)
mc.simulate_convergence(max_simulations=4, random_seed=42, **kwargs)  # 2 widths, 4 rows
mc.simulate_convergence(max_simulations=4, random_seed=7, **kwargs)   # []
mc.simulate_convergence(max_simulations=6, random_seed=7, **kwargs)
# ValueError: Cannot append with a different root seed

Run on develop at 6b2a37f, with mc the monte_carlo_calisto test fixture.

#1198 describes it in the Returns docstring. Making the finished case raise like the unfinished one came up in its review and was left for a separate change: #1198 (comment)

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