continue_run = 1 dies with "an unknown error" on every sampler but am, and on am with no earlier run, after -o has already replaced Results/
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 85/100
Línea de trabajo
Empieza con Configuration.check_fresh_run() y el manejo de continue_run en pybnf/algorithms/samplers/base.py:506; lee la clave documentada en docs/config_keys.rst y la lógica de escritura del archivo en pybnf/algorithms/samplers/adaptive_mcmc.py. Añade comprobaciones antes de tocar el directorio de salida y luego cubre con pruebas ambos casos de rechazo: samplers que no sean am y am sin adaptive_files/MLE_params.txt. Está hecho cuando esos casos fallen claramente sin reemplazar los resultados existentes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
continue_run = 1 starts every chain from adaptive_files/MLE_params.txt, a file only am writes (pybnf/algorithms/samplers/adaptive_mcmc.py). The key is documented under "For Adaptive MCMC" in docs/config_keys.rst. But the sampler base class applies it to every sampler (pybnf/algorithms/samplers/base.py:506), and nothing checks for the file before the run starts. So:
- On dream, p_dream, mh, pt or hmc,
continue_run = 1can never work. - On am, it fails whenever there is no earlier am run in
output_dir.
Either way the run dies with "Sorry, an unknown error occurred: FileNotFoundError: out/adaptive_files/MLE_params.txt not found ... Please report this bug". With -o, the earlier run's Results/ has already been replaced by then, so the user loses that output and gets a crash in return.
Found while reviewing #1066. Reproduced on main at cbb8159c.
Reproduction
-
Run this dream conf with
pybnf -c x.conf -o. It finishes and leavesout/Results/withsamples.txtand the credible intervals.edition = 2 objective = gaussian, mean = 0 0, variance = 1 1 uniform_var = g1 -10 10 uniform_var = g2 -10 10 random_seed = 1 output_dir = out job_type = dream population_size = 4 max_iterations = 50 burn_in = 10 sample_every = 1 -
Add
continue_run = 1and runpybnf -c x.conf -oagain. It exits 1 with the FileNotFoundError above, asking the user to report a bug.out/Results/now holds onlyx.confand an emptysorted_params_end.txt.
What should happen
Check this at start, in Configuration.check_fresh_run(), before the output directory is touched:
- refuse
continue_run = 1on any sampler other than am, saying that only am writes the files it reads; - on am, refuse it when
adaptive_files/MLE_params.txtis missing, naming the file.
Each refusal needs a test. Related: #1044, about what continue_run does with the file's contents when it does exist.
- 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 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
-
bug tech debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/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