Multiple shooting drops the per-measurement binding table when it splits data into segments, so a per-measurement model under job_type = ms is refused with the wrong cause

Abierto Apto para principiantes
#1,049 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
data

Línea de trabajo

Lee pybnf/shooting/problem.py e inspecciona _subset_rows, que crea Data para cada segmento; compara cómo selecciona los valores y pesos indexados por fila. Usa la reproducción del issue para comprobar que measurement_params contiene las filas correspondientes en el mismo orden después de la segmentación. Se considera terminado cuando un segmento de multiple shooting conserva las vinculaciones de las filas seleccionadas.

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

Descripción

bug

_subset_rows in pybnf/shooting/problem.py builds each segment's Data from the experiment's data. It copies the values, the columns, the headers, the independent variable and the weights, but not measurement_params, the per-measurement binding table that a row-varying observable or noise formula reads (ADR-0045).

Reproduction:

import numpy as np
from pybnf.data import Data
from pybnf.shooting.problem import _subset_rows
d = Data.from_columns(np.array([[0., 1.], [1., 2.], [2., 3.]]), ['time', 'y'])
d.measurement_params = {'y': {'scale': ['s1', 's2', 's3']}}
seg = _subset_rows(d, [1, 2])
print(getattr(seg, 'measurement_params', None))   # None

So under job_type = ms, a per-measurement model or a row-varying noise formula finds no binding table, and the fit stops with a message such as "A row-varying noise formula ... needs a per-measurement binding table, but none is attached to the experimental data. The experiment must declare 'measurement_params: .tsv'", even when the experiment does declare it. The independent review of the #1030 fix found this by running such a fit.

Copying the table is not enough on its own. The table is indexed by data row, and a segment keeps only some rows, so each segment needs the table's rows for the rows it keeps, in the same order. Until that is done, job_type = ms with a per-measurement model or noise formula could instead be refused at load with that reason.

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

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.