bootstrap with mh or am is accepted at load, then crashes with a TypeError when the first replicate starts, after the whole main fit has run
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
pybnf/pybnf.py:521 の bootstrap 処理と、basic_mcmc.py:101 および adaptive_mcmc.py:165 の sampler リセットメソッドから始めます。start_run 中に base.py:379 が samples_file を開く流れを追い、その後、検証経路がないか設定の読み込みを確認します。mh、am、pt を含め、サポートされていない sampler の bootstrap がメインの fit の実行前に拒否され、報告された設定を対象とするカバレッジがあることが完了条件です。
索引モデルが issue の本文から書いたものです。
説明
The configuration accepts bootstrap = N with job_type = mh or job_type = am. The main fit then runs to the end and writes its results. When the first bootstrap replicate starts, the run stops with Sorry, an unknown error occurred: TypeError: expected str, bytes or os.PathLike object, not NoneType. No replicate is fitted, and the error appears only after the whole main fit has run.
pt shares mh's code and should crash the same way; I did not run it. #862 covers dream and p_dream, where bootstrap runs but each replicate's result is wrong.
Example
boot.conf needs no model or data file:
edition = 2
objective = expression
expression = 0.5*((x - 1)/0.5)^2 + 0.5*((y - 3)/0.5)^2
job_type = mh
uniform_var = x -5 5
uniform_var = y -5 10
max_iterations = 100
burn_in = 50
sample_every = 1
population_size = 2
random_seed = 1
bootstrap = 2
output_dir = out
Run pybnf -c boot.conf -o. It prints Fitting complete, then Beginning bootstrap run 0, then the TypeError, and exits with code 1. job_type = am (with adaptive = 20 added) does the same.
Where in the code
pybnf/pybnf.py:521:alg.reset(bootstrap=...)runs before each replicate.pybnf/algorithms/samplers/basic_mcmc.py:101(mh, pt) andpybnf/algorithms/samplers/adaptive_mcmc.py:165(am):reset()setsself.samples_file = None.pybnf/algorithms/samplers/base.py:379: the replicate'sstart_runthen openssamples_fileto write its header, and getsNone.
Unless bootstrapping a sampler is meant to be supported, the simplest fix is to refuse bootstrap for every sampler job_type when the configuration loads. That would also cover #862.
- 主要言語
- Python
- スター
- 25
- フォーク
- 25
- 平均マージ
- 10時間 54分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
lanl/PyBNF のほかの issue
-
bug silent-incorrectness
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
bug silent-incorrectness
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug silent-incorrectness
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug silent-incorrectness
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Arekkazu/sgpmp-backend#744 ·
メンテナーはふだん 1 日以内に返信
-
agent/reviewer
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
projectbluefin/utah-packages#634 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue help wanted
難易度 2/5 1〜2日 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
home-assistant/core#188613 ·
メンテナーはふだん 1 日以内に返信
-
Websiteオープンgood first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 91/100
TanbirRamim/open-source-radar#314 ·
メンテナーはふだん 1 日以内に返信