start_point.txt labels values set by starting_params as 'sampled'

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

Read Algorithm._emit_start_point in pybnf/algorithms/base.py and how sampler initialization applies starting_params and continue_run in pybnf/algorithms/samplers/base.py. Check the code and tests covering Results/start_point.txt labels and its legend. Done when rows seeded by either option identify that source and the legend defines both labels.

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

描述

bug minor silent-incorrectness

Results/start_point.txt exists so a reader can tell where a fit really started, and the source column is the part to read (docs/troubleshooting.rst, "Where did my fit actually start?"). For a sampler seeded with starting_params, every row says sampled. The file's own legend defines that as "drawn from the prior / bounds, as a population algorithm or sampler does". The values were not drawn. They are exactly the ones the user wrote.

Reproduce

An am run with an analytical objective, declared kcat, Km, alpha, with starting_params = 7 70 3:

# source: start_point -- a "start_point = <p> <v>" line
#         sampled    -- drawn from the prior / bounds, as a population

starts	1
starts_pinned	0
kcat	7	sampled	0.5	50
Km	70	sampled	1	500
alpha	3	sampled	0.1	20

The values are right (7, 70, 3, in declaration order), but the label says they were drawn at random.

continue_run = 1, which seeds every chain from adaptive_files/MLE_params.txt, takes the same branch, so reading the code, its rows are labelled sampled too. I did not run that case.

Where

Algorithm._emit_start_point in pybnf/algorithms/base.py (the source chain near line 2748) picks between refine, the start-point spellings, sampled, box_center, point and prior. Nothing in that chain knows about starting_params or continue_run, so a sampler that uses either one falls through to sampled. The sampler base applies both after the start point is resolved (pybnf/algorithms/samplers/base.py, lines 369–378).

Expected

These rows should say where the values came from, for example starting_params or continue_run, and the legend should define both. Every chain gets the same values, so the label is true for every chain, not only the one the file records.

Found during the review of #984.

主要语言
Python
星标
25
派生
25
平均合并
4 小时 5 分钟
30 天内合并 PR
10

环境准备

  • 提供 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 摘要。