A gradient refine_method meets the refusal of a scored continuation parameter_scan (reset_conc=>0) or bifurcate only after the whole search

Aperta
#1,059 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start with GradientOptimizer.check_models and the carried-state dispatch in pybnf/bngsim_model/net_model.py. Run tests/test_ms_review5_segments.py::test_a_gradient_refiner_refuses_before_the_search_what_its_backend_refuses[continuation_scan] to confirm the premature-refusal behavior. The change is done when from-seed scored scans are rejected before optimization, while scans using a carried, pre-equilibrated state remain valid.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What you see. A fit with refine = 1 and a gradient refine_method (gntr, trf, lbfgs) runs its whole search, then stops when the refine starts:

Model m: a scored continuation parameter_scan (reset_conc=>0) or bifurcate cannot be run on the gradient path

The refusal itself is right. It just comes after the search it makes useless. Run as job_type = gntr, the same model is refused at its first evaluation.

When. A BNGL model on the bngsim .net backend whose scored output comes from a parameter_scan({..., reset_conc=>0}) or a bifurcate that starts from the seed. One that starts from a carried, pre-equilibrated state is differentiated correctly and must not be refused: the backend dispatches it to _scan_carried_state (pybnf/bngsim_model/net_model.py, if carried_state: before elif not s.reset_conc:).

Why it is not refused earlier. Whether a scan starts from a carried state depends on the actions before it and on any reset between them, which only the backend works out as it runs them. A check of the scan's own settings refused the carried case too, a valid gradient job that main fits correctly. It was taken out of the multiple-shooting batch for that reason (#911–#915, #959, #1038, #1049).

Possible fix. Work out the carried state of each scored scan from the action list at model set-up, the way the backend does, and refuse only the from-seed case there (GradientOptimizer.check_models, which a refiner is asked before the search). The batch's tests/test_ms_review5_segments.py::test_a_gradient_refiner_refuses_before_the_search_what_its_backend_refuses[continuation_scan] reproduces this and is marked xfail against this issue.

Same timing on main.

Lingua principale
Python
Stelle
26
Fork
25
Merge medio
4h 25m
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lanl/PyBNF

Tutte le issue di lanl/PyBNF

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.