simulate_convergence ignores a different random_seed once the study is finished

Abierto
#1,236 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

Start with the simulate_convergence method and its Returns docstring, then find where it compares the logged seed with random_seed and where Cannot append with a different root seed is raised. Reproduce with the monte_carlo_calisto fixture using the snippet from the issue. Done means a different seed on a finished study raises the same ValueError as the unfinished case, and the docstring and tests are updated to match.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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 6b2a37fc, 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: https://github.com/RocketPy-Team/RocketPy/pull/1198#discussion_r4652615736

Lenguaje dominante
Python
Estrellas
1.1k
Forks
280
Merge medio
3 d 2 h
PR fusionados (30 d)
24

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RocketPy-Team/RocketPy

Todos los issues de RocketPy-Team/RocketPy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.