min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse it
还没有人认领这个 Issue。
评估
调研方向
首先追踪所列 sampler 类型对 min_objective 的解析和验证方式,然后检查该键的文档和现有配置测试。添加测试,确保每个 sampler 在启动时都拒绝此设置,并说明该设置仅适用于优化器;拒绝测试通过且文档说明 min_objective 适用于优化器,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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.txthas 24 draws, against about 800 for the full run at the defaultsample_every = 100.Results/has nocredible*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 分钟
- 30 天内合并 PR
- 9
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lanl/PyBNF 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
-
bug minor
难度 1/5 1-3 小时 新手友好度 92/100
-
bug minor
难度 2/5 1-3 小时 新手友好度 76/100
-
bug tech debt
难度 2/5 1-3 小时 新手友好度 82/100
相似的 Issue
-
docs(contributing): the two things that silently block a PR可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭available documentation good first issue
难度 1/5 1-3 小时 新手友好度 95/100
Nixitov/Riptide-Native#944 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
JTHCode/secretguard#24 ·
维护者通常 1 天内回复
-
area: middleware documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
omarelshamy25x/shamy-hijri#63 ·
维护者通常 1 天内回复