Skip to content

Commit

Permalink
Harmonize data generation
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanhmorris committed Feb 6, 2025
1 parent 0238435 commit 250ea74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pipelines/generate_predictive.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ def generate_and_save_predictions(
model_dir = Path(model_run_dir, model_name)
if not model_dir.exists():
raise FileNotFoundError(f"The directory {model_dir} does not exist.")
(my_model, my_data) = build_model_from_dir(model_run_dir)
(my_model, my_data) = build_model_from_dir(

Check warning on line 23 in pipelines/generate_predictive.py

View check run for this annotation

Codecov / codecov/patch

pipelines/generate_predictive.py#L23

Added line #L23 was not covered by tests
model_run_dir,
sample_ed_visits=predict_ed_visits,
sample_hospital_admissions=predict_hospital_admissions,
sample_wastewater=predict_wastewater,
)

my_model._init_model(1, 1)
fresh_sampler = my_model.mcmc.sampler
Expand All @@ -33,6 +38,7 @@ def generate_and_save_predictions(

my_model.mcmc.sampler = fresh_sampler
forecast_data = my_data.to_forecast_data(n_forecast_points)
print(forecast_data)

Check warning on line 41 in pipelines/generate_predictive.py

View check run for this annotation

Codecov / codecov/patch

pipelines/generate_predictive.py#L41

Added line #L41 was not covered by tests

posterior_predictive = my_model.posterior_predictive(
data=forecast_data,
Expand Down

0 comments on commit 250ea74

Please sign in to comment.