hmc requires max_iterations, which it never reads, and the docs' hmc example fails to load without it
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 76/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 26
- Fork
- 25
- Merge medio
- 4h 25m
- PR unite (30g)
- 9
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lanl/PyBNF
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
min_objective stops a sampler run early and reports "Fitting complete": samplers should refuse itApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
bug minor
Difficoltà 1/5 1-3 ore Idoneità per principianti 92/100
-
bug minor
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Issue simili
-
docs(contributing): the two things that silently block a PRForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaavailable documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 95/100
Nixitov/Riptide-Native#944 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
JTHCode/secretguard#24 ·
I maintainer di solito rispondono entro 1 giorno
-
area: middleware documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 ·
I maintainer di solito rispondono entro 1 giorno