Gradient fits reject an experiment whose only data file is a .prop: 'no routing was supplied'

Abierto
#977 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
52/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

Reproduce the failure with repro_function_heavy.py and prop_only.conf, then compare it with lbfgs.conf, which adds an .exp file and succeeds. Trace the ExperimentRouting mentioned in the error for constraint-only experiments, and confirm the behavior with parallel and default worker counts. Done means the constraint-only gradient fit either runs without the late routing error or is rejected during configuration, with the spurious parameter warning addressed if it is in scope.

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

Descripción

Summary

Gradient fits fail for an experiment whose only data file is a BPSL .prop file.

Environment: PyBNF 1.8.1 (5ecb1f69), bngsim 0.15.0, Python 3.12, macOS arm64.

Reproduce

Use the script from #976, then run:

python repro_function_heavy.py repro 300 30
cd repro && pybnf -c prop_only.conf -o

prop_only.conf declares the experiment as experiment: e1, data: calls.prop, t_end: 1, n_steps: 1, with objective = sos, qualitative_scale = fit s, and job_type = lbfgs.

Observed

After about 11–13 s, the run fails:

Error: Gradient-based fitting (job_type = lbfgs) cannot differentiate this fit's objective: Constraint reads observable 'f0' from model 'model' suffix 'e1', but no routing was supplied for it; provide an ExperimentRouting for every (model, suffix) a constraint reads (routings[(model, suffix)]).
  -> Use a metaheuristic job_type instead (e.g. job_type = de, the default, or pso / ss / cmaes), which needs no gradient.

This happens with parallel_count = 2 and with the default worker count, at verbosity = 1 and verbosity = 2.

Workaround: add any .exp file to the same experiment (experiment: e1, data: reps/r1.exp, …, calls.prop). The routing is then built, and the gradient fit runs and uses the constraint gradients (see lbfgs.conf in the repro).

Expected

Constraint-only experiments should get a routing, since the constraint gradient is otherwise available. Failing that, the refusal should come at configuration time.

As it is, the refusal comes only after the first model evaluations. In a larger model with about 20 s per evaluation (#976), a run printed nothing beyond the version line for 45 minutes before I stopped it. I didn't establish whether it would have reached this error.

Minor (same runs)

Every evaluation logs WARNING … could not set free parameter s=… (not found in this model) for the parameter named in qualitative_scale = fit s. That parameter is correctly not a model parameter, so the warning is noise.

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.