continue_run applies adaptive_files/MLE_params.txt by position, with no check of its length or of which parameter each value belongs to

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Read pybnf/algorithms/samplers/base.py around lines 371–374 and pybnf/algorithms/samplers/adaptive_mcmc.py around lines 283 and 630 to trace how MLE values are saved and loaded. Check the existing tests for continue_run and how configuration parameter names are represented. Done when loading rejects a count or name mismatch with a clear error, and a one-parameter file loads without an indexing error.

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

Descrizione

bug silent-incorrectness

adaptive_files/MLE_params.txt holds values only, with no parameter names (written by np.savetxt at pybnf/algorithms/samplers/adaptive_mcmc.py:630). continue_run = 1 applies those values by position (pybnf/algorithms/samplers/base.py:371-374; adaptive_mcmc.py:283). Nothing checks the file against the configuration:

  • Too many values: an extra value is silently dropped.
  • Reordered declarations: if the uniform_var lines are reordered between runs, or the file is permuted, every chain starts from the wrong values, possibly outside the boxes, with no error.
  • One free parameter: np.loadtxt returns a 0-d array, so self.mle_start[i] should raise "too many indices". The 0-d return is confirmed; the full continue_run run is not.

#1013 covers the same problems for starting_params; this is the continue_run side. It was found in independent review of the #984 follow-ups.

Fix: write the names, and on load check the count and the names against the configuration. Refuse a mismatch, naming it.

Lingua principale
Python
Stelle
25
Fork
25
Merge medio
4h 5m
PR unite (30g)
10

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.