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

Open
#1,014 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
25
Forks
25
Avg merge
4h 5m
Merged PRs (30d)
10

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lanl/PyBNF

All issues in lanl/PyBNF

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.