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

Abierto
#1,059 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
26
Forks
25
Merge medio
4 h 25 min
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lanl/PyBNF

Todos los issues de lanl/PyBNF

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.