Skip to content

Commit

Permalink
fix #373 dirtily
Browse files Browse the repository at this point in the history
  • Loading branch information
jcblemai committed Dec 3, 2024
1 parent 956028d commit b450f2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flepimop/gempyor_pkg/src/gempyor/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,15 @@ def __init__(
self.already_built = False # whether we have already built the costly objects that need just one build
self.autowrite_seir = autowrite_seir

self.static_sim_arguments = get_static_arguments(self.modinf)

## Inference Stuff
self.do_inference = False
if config["inference"].exists():
from . import inference_parameter, logloss

if config["inference"]["method"].get("default") == "emcee":
# Generates the static_sim_arguments only if this is a config argument.
self.static_sim_arguments = get_static_arguments(self.modinf)

self.do_inference = True
self.inference_method = "emcee"
self.inferpar = inference_parameter.InferenceParameters(
Expand Down
2 changes: 2 additions & 0 deletions flepimop/gempyor_pkg/src/gempyor/outcomes.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ def read_parameters_from_config(modinf: model_info.ModelInfo):
parameters[new_comp]["delay::npi_param_name"] = f"{new_comp}::delay".lower()
else:
logging.critical(f"No delay for outcome {new_comp}, using a 0 delay")
# FIXME: We should not here modify outcomes_config := modinf.outcomes_config["outcomes"]
# because this changes the order in which the outcomes the next time this function is called.
outcomes_config[new_comp]["delay"] = {"value": 0}
parameters[new_comp]["delay"] = outcomes_config[new_comp]["delay"]["value"]
parameters[new_comp]["delay::npi_param_name"] = f"{new_comp}::delay".lower()
Expand Down

0 comments on commit b450f2d

Please sign in to comment.