hmc requires max_iterations, which it never reads, and the docs' hmc example fails to load without it
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 76/100
Línea de trabajo
Start in pybnf/config.py at Configuration._req_user_params() and trace how required parameters are selected for HMC; compare with the handling of unread beta mentioned in the issue. Read the HMC tests in tests/test_hmc.py and tests/test_wall_time_fit.py, plus the example in docs/analytical_objectives.rst. Done when the docs example loads without max_iterations, setting that key for HMC is rejected with guidance about num_warmup and num_samples, and the example has a loading test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Every fit must set max_iterations: Configuration._req_user_params() returns {'models', 'population_size', 'max_iterations'} (pybnf/config.py:795). hmc never reads it. Its run length is num_warmup and num_samples. So an hmc conf must carry a key that has no effect. The hmc example in docs/analytical_objectives.rst ("Sample a banana posterior with HMC", about line 272) leaves the key out, so it fails to load when copied as shown:
Error: The following configuration keys must be specified:
max_iterations
The PEtab importer writes max_iterations = 100 into the hmc confs it generates for the same reason (#1074).
Found while reviewing #1066. Reproduced on main at cbb8159c.
Reproduction
Load the snippet from the docs as it stands:
edition = 2
objective = banana, a = 1, b = 8
job_type = hmc
uniform_var = x1 -12 12
uniform_var = x2 -12 12
population_size = 4
num_warmup = 1000
num_samples = 2000
target_accept = 0.95
What should happen
Don't require max_iterations for hmc. Then, as #860 did for an unread beta, refuse it when it is set, with a message pointing to num_warmup and num_samples, so no one thinks it sets the run length. No shipped conf selects hmc; the tests (tests/test_hmc.py, tests/test_wall_time_fit.py) and the PEtab importer are what set it today. Add a test that loads the docs example as written.
- Lenguaje dominante
- Python
- Estrellas
- 26
- Forks
- 25
- Merge medio
- 4 h 25 min
- PR fusionados (30 d)
- 9
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lanl/PyBNF
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse itAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
bug minor
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
-
bug minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Todos los issues de lanl/PyBNF
Issues similares
-
docs(contributing): the two things that silently block a PRPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoavailable documentation good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 95/100
Nixitov/Riptide-Native#944 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
JTHCode/secretguard#24 ·
Los mantenedores suelen responder en 1 día
-
area: middleware documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
omarelshamy25x/shamy-hijri#63 ·
Los mantenedores suelen responder en 1 día