`simulate_convergence(batch_size=1)` fails on the first batch of a new study

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

Los mantenedores suelen responder en 3 días

@umutKaracelebi ya está trabajando en esto.

Desde el 20/11/2026.

  • #1233 de @umutKaracelebi — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
data, testing-qa

Línea de trabajo

Start with simulate_convergence and estimate_confidence_interval, then read tests/integration/simulation/test_monte_carlo_release.py and its test_convergence_reads_the_checkpoint_once test. Reproduce with the release_study fixture, batch_size=1, and an empty log. Done when a fresh study handles the first batch without passing fewer than two observations to scipy.stats.bootstrap, with a test covering the behavior.

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

Descripción

Describe the bug

On a new study, simulate_convergence(..., batch_size=1) stops with an error after its first flight:

ValueError: each sample in `data` must contain two or more observations along `axis`.

The first batch leaves one result, and estimate_confidence_interval passes that single value to scipy.stats.bootstrap, which needs at least two. The input checks accept batch_size=1, so the call runs a simulation before it fails.

To Reproduce

On develop at 9bf63a04, with the release_study fixture from tests/integration/simulation/test_monte_carlo_release.py:

release_study.simulate_convergence(
    target_attribute="max_speed", batch_size=1, max_simulations=4, random_seed=1
)

Expected behavior

Either the study keeps going until there are two results to bootstrap, or batch_size=1 is refused up front while the logs hold fewer than two rows. The first keeps batch_size=1 usable for a fresh study. A study resumed from logs that already hold a row works today, since its first interval sees two results; test_convergence_reads_the_checkpoint_once relies on that.

Additional context

I ran into this while measuring for #1198. It isn't in the #1209 list.

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.