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

オープン
#1,229 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

@umutKaracelebi がすでに取り組んでいます。

2026年11月20日 から。

  • #1233 @umutKaracelebi による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
data, testing-qa

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
1.1k
フォーク
280
平均マージ
3日 2時間
マージ済み PR(30日)
24

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

RocketPy-Team/RocketPy のほかの issue

RocketPy-Team/RocketPy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。