CDCgov / ww-inference-model

An in-development R package and a Bayesian hierarchical model jointly fitting multiple "local" wastewater data streams and "global" case count data to produce nowcasts and forecasts of both observations
https://cdcgov.github.io/ww-inference-model/
Apache License 2.0
17 stars 2 forks source link

Windows workaround in `compile_model` #213

Open kaitejohnson opened 1 month ago

kaitejohnson commented 1 month ago

Goal

We might want to anticipate/circumvent issues with compiling the stan model in Windows, as a short-term fix for the Windows issues that @arranhamlet ran into. Longer term, we should probably pre-compile the model using instantiate.

Discussion:

arranhamlet commented 1 month ago

My current workaround is to have a wrapper for the compile_model function (imaginatively called compile_model_upd) that looks for a space in the stan file path.

If it finds one, then it creates a new directory in a location that does not have a space, moves the stan files over, and points the compiler to these new files.

https://github.com/CDCgov/wastewater_WA/blob/master/R/functions/compile_model_upd.R

I am unsure how this would generalize across different work setups, I can envision running into permission issues.