The documented dream proposal key is rejected by the parser, so DREAM(KZS) (proposal = kalman) cannot be selected from a conf file

未关闭
#1,076 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python
领域
backend

调研方向

Start with the DREAM section in docs/algorithms.rst, the configuration parser's accepted keys, and DreamAlgorithm in pybnf/algorithms/samplers/dream.py. Read tests/test_dream_config_surface.py and tests/test_sampler_integration.py for the existing direct-config coverage, then trace how configuration values reach the proposal operators. Done means the documented conf-file behavior is implemented and covered by tests, or the docs explain how each variant is selected.

由索引模型根据 Issue 内容生成。

描述

bug documentation

docs/algorithms.rst (the DREAM section, around lines 487–527) documents a proposal key for dream, with values de, whitened and kalman. It describes DREAM(KZS) as job_type = dream, proposal = kalman and MT-P-DREAM as proposal = whitened, n_try = k. But proposal is not among the keys the conf parser accepts. A conf that sets it is refused:

Error: Parsing configuration key 'proposal' on line 8.
proposal is not a valid configuration key.

DreamAlgorithm reads config.config['proposal'] (pybnf/algorithms/samplers/dream.py:170). The tests reach the kalman and whitened operators only by setting the config dict directly (tests/test_dream_config_surface.py:132, tests/test_sampler_integration.py:198). So DREAM(KZS), a published variant the docs list, cannot be selected from a conf file at all. kalman_burnin_frac, which only matters for the kalman proposal, is a valid key.

whitened alone is reachable as job_type = p_dream.

Found while reviewing #1066. Reproduced on main at cbb8159c.

Reproduction
edition = 2
objective = gaussian, mean = 0 0, variance = 1 1
uniform_var = g1 -10 10
uniform_var = g2 -10 10
output_dir = out
job_type = dream
proposal = kalman
population_size = 4
max_iterations = 300
burn_in = 10
What should happen

Either:

  • add proposal to the parser's keys for dream, validating its value at load and refusing it on other job types, with a test that each documented value reaches the matching operator from a conf file; or
  • remove the proposal examples from the docs and say how each variant is selected.
主要语言
Python
星标
26
派生
25
平均合并
4 小时 25 分钟
30 天内合并 PR
9

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lanl/PyBNF 的其他 Issue

查看 lanl/PyBNF 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。