PEtab import_job writes sampler confs that cannot record a draw: max_iterations = 100 with the default burn_in of 10000, and pt with no beta_range
还没有人认领这个 Issue。
评估
调研方向
阅读pybnf/petab/import_.py中_DEFAULT_SETTINGS附近的内容,以及第2077行附近写入的设置。使用提供的fixture复现问题,并用check_fresh_run检查每个生成的sampler配置。完成标准是sampler配置包含sampling window,且pt配置包含beta_range,并添加一个回归测试,覆盖导入器写入的每个sampler配置。
由索引模型根据 Issue 内容生成。
描述
pybnf.petab.import_.import_job writes the same run settings for every job type: population_size = 50, max_iterations = 100 and verbosity = 0 (_DEFAULT_SETTINGS, pybnf/petab/import_.py:219, written at :2077). For a sampler, burn_in is left at its default of 10000, so the generated sampler confs cannot record a draw:
- Since #1066, dream, p_dream, am, mh and pt are refused at start with "max_iterations (100) must be greater than burn_in (10000), otherwise no samples will be collected."
- Before #1066 they ran to an empty
samples.txtand reported "Fitting complete" (#921). - The pt conf also gets no
beta_range, so loading it warns that its replica exchanges will accomplish nothing. - hmc is accepted (it does not read
max_iterations).
Found while reviewing #1066. Reproduced on main at cbb8159c.
Reproduction
import os, re
from pathlib import Path
from pybnf.petab.import_ import import_job
from pybnf import parse, config, printing
out = import_job(Path('tests/petab_fixtures/fixedsigma_v2/problem.yaml'), Path('/tmp/imp'), job_type='all')
os.chdir(out)
for c in sorted(out.glob('imported_*.conf')):
try:
conf = config.Configuration(parse.ploop(c.read_text().splitlines(keepends=True)))
conf.check_fresh_run()
print(c.name, 'accepted')
except printing.PybnfError as e:
print(c.name, 'refused:', e.message.splitlines()[0])
imported_am.conf, imported_dream.conf, imported_mh.conf, imported_p_dream.conf and imported_pt.conf are refused; imported_hmc.conf is accepted. The same happens with job_type='dream' (or any one sampler) in place of 'all'.
What should happen
For a sampler job type, the importer should write a run that records draws:
- a
burn_inbelowmax_iterations, with amax_iterationslong enough to leave a sampling window; - for pt, a
beta_range.
A test should put every sampler conf the importer writes through check_fresh_run, as the reproduction does.
- 主要语言
- Python
- 星标
- 26
- 派生
- 25
- 平均合并
- 4 小时 25 分钟
- 30 天内合并 PR
- 9
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lanl/PyBNF 的其他 Issue
-
min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse it未关闭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 天内回复