min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse it

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

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

評価

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

調査の方向性

まず、指定されたsamplerの種類について、min_objectiveがどのように解析・検証されるかを追跡し、次にキーのドキュメントと既存の設定テストを確認してください。各samplerが起動時にこの設定を拒否し、オプティマイザー専用であることを説明するテストを追加してください。拒否テストが通り、min_objectiveがオプティマイザーに適用されるとドキュメントに記載されていれば完了です。

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

説明

bug

min_objective is an optimizer's stop: "Stop fitting if an objective function lower than this value is reached." Samplers honour it too. A sampler run stops at the first proposal that scores below it, prints "Minimum objective value achieved" and "Fitting complete", and exits 0. It has run a small fraction of the requested iterations, and has a correspondingly small samples.txt.

A low objective on a sampler is just a draw near the mode, not a goal reached. And because when the run stops depends on the chain's own path, the draws it kept are not a fixed-length sample of the posterior. The run also writes no final credible intervals or histograms, the same end state as a wall_time_fit stop (#1068).

Found while reviewing #1066. Reproduced on main at cbb8159c. Since #921, a min_objective stop before the first draw is an error, whose hint says this key stops a sampler. A stop after the first draw is still reported as success.

Reproduction
edition = 2
objective = gaussian, mean = 0 0, variance = 1 1
uniform_var = g1 -10 10
uniform_var = g2 -10 10
random_seed = 1
output_dir = out
job_type = dream
population_size = 4
max_iterations = 20000
burn_in = 10
min_objective = 0.002

pybnf -c x.conf -o:

  • It prints "Completed iteration 610 of 20000", "Minimum objective value achieved" and "Fitting complete", and exits 0.
  • samples.txt has 24 draws, against about 800 for the full run at the default sample_every = 100.
  • Results/ has no credible* files.
What should happen

Refuse min_objective for every sampler (am, dream, p_dream, mh, pt, hmc) at start, naming the key and saying it applies to optimizers. Add a test for the refusal. Update the key's documentation to say so.

主要言語
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 を短くまとめたダイジェスト。