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

未關閉
#1,229 0 則留言 0 個 reaction 已指派 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 小時
30 天內合併 PR
24

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

RocketPy-Team/RocketPy 的其他 Issue

查看 RocketPy-Team/RocketPy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。