The notebook helper's run_fit ignores refine and bootstrap without a word

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

まだ誰も着手していません。

評価

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

調査の方向性

Start with examples/notebooks/pybnf_notebook.py and compare run_fit with the refine and bootstrap flow in pybnf.main; the issue asks that this work be shared or that unsupported settings be rejected. Add a test for refine or bootstrap and confirm the notebook helper either runs the requested phase or reports clearly that it is skipped. The _report_parallelism traceback is a separate reported problem to investigate in the same helper.

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

説明

bug silent-incorrectness

The notebook helper's run_fit (examples/notebooks/pybnf_notebook.py) runs only the main fit. It never runs the refine or bootstrap phases that pybnf -c runs, and it doesn't refuse a conf that sets them. A notebook user who sets bootstrap = 3 or refine = 1 gets the unrefined fit with no bootstrap replicates, and no message saying either step was skipped. This applies to every job type.

Found while reviewing #1066, which made the helper run the same start checks as pybnf.main. Reproduced on main at cbb8159c.

Reproduction
import os, sys
sys.path.insert(0, 'examples/notebooks')
import pybnf_notebook as nb

base = """edition = 2
objective = gaussian, mean = 0 0, variance = 1 1
uniform_var = g1 -10 10
uniform_var = g2 -10 10
random_seed = 1
job_type = de
population_size = 8
max_iterations = 20
"""
alg = nb.run_fit(base + "bootstrap = 3\n", "out_boot")
print(alg.config.config['bootstrap'], sorted(os.listdir(alg.res_dir)))

This prints 3 and ['sorted_params_0.txt', 'sorted_params_backup.txt', 'sorted_params_final.txt', 'start_point.txt']. No replicate runs and nothing reports one. With refine = 1 the output is the same.

The same conf through pybnf -c x.conf -o prints "Beginning bootstrap run 0" through 2 and "Bootstrapping complete", and writes Results/bootstrapped_parameter_sets.txt.

What should happen

Have run_fit run the refine and bootstrap phases as pybnf.main does, sharing that code rather than copying it. Otherwise, have build_algorithm refuse a conf that sets refine or bootstrap, saying the helper runs only the main fit. Either way, add a test.

Separately, run_fit prints a traceback ("'_SyncClient' object has no attribute 'scheduler_info'") from _report_parallelism on every run. It is caught and harmless, but it is noise in every notebook.

主要言語
Python
スター
26
フォーク
25
平均マージ
4時間 25分
マージ済み PR(30日)
9

環境構築

はじめの一歩

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

lanl/PyBNF のほかの issue

lanl/PyBNF の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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