The documented dream proposal key is rejected by the parser, so DREAM(KZS) (proposal = kalman) cannot be selected from a conf file

Aperta
#1,076 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start with the DREAM section in docs/algorithms.rst, the configuration parser's accepted keys, and DreamAlgorithm in pybnf/algorithms/samplers/dream.py. Read tests/test_dream_config_surface.py and tests/test_sampler_integration.py for the existing direct-config coverage, then trace how configuration values reach the proposal operators. Done means the documented conf-file behavior is implemented and covered by tests, or the docs explain how each variant is selected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug documentation

docs/algorithms.rst (the DREAM section, around lines 487–527) documents a proposal key for dream, with values de, whitened and kalman. It describes DREAM(KZS) as job_type = dream, proposal = kalman and MT-P-DREAM as proposal = whitened, n_try = k. But proposal is not among the keys the conf parser accepts. A conf that sets it is refused:

Error: Parsing configuration key 'proposal' on line 8.
proposal is not a valid configuration key.

DreamAlgorithm reads config.config['proposal'] (pybnf/algorithms/samplers/dream.py:170). The tests reach the kalman and whitened operators only by setting the config dict directly (tests/test_dream_config_surface.py:132, tests/test_sampler_integration.py:198). So DREAM(KZS), a published variant the docs list, cannot be selected from a conf file at all. kalman_burnin_frac, which only matters for the kalman proposal, is a valid key.

whitened alone is reachable as job_type = p_dream.

Found while reviewing #1066. Reproduced on main at cbb8159c.

Reproduction
edition = 2
objective = gaussian, mean = 0 0, variance = 1 1
uniform_var = g1 -10 10
uniform_var = g2 -10 10
output_dir = out
job_type = dream
proposal = kalman
population_size = 4
max_iterations = 300
burn_in = 10
What should happen

Either:

  • add proposal to the parser's keys for dream, validating its value at load and refusing it on other job types, with a test that each documented value reaches the matching operator from a conf file; or
  • remove the proposal examples from the docs and say how each variant is selected.
Lingua principale
Python
Stelle
26
Fork
25
Merge medio
4h 25m
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lanl/PyBNF

Tutte le issue di lanl/PyBNF

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.