Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request]: Rewrite examples/simple_usa_statelevel/inference_benchmark.ipynb To Use Only Data In flepiMoP #410

Open
TimothyWillard opened this issue Dec 3, 2024 · 3 comments
Labels
documentation Relating to ReadMEs / gitbook / vignettes / etc. gempyor Concerns the Python core. low priority Low priority. meta/workflow Relating to CI / issue templates / testing frameworks / etc.

Comments

@TimothyWillard
Copy link
Contributor

Label

documentation, gempyor, meta/workflow

Priority Label

low priority

Is your feature request related to a problem? Please describe.

The inference_benchmark.ipynb notebook (in the feature/403/emcee_batch branch) relies on undeclared dependencies and files that reside outside of the flepiMoP repository. This makes the notebook not reproducible and limits it's usefulness as a teaching tool.

Is your feature request related to a new application, scenario round, pathogen? Please describe.

No response

Describe the solution you'd like

The notebook should be rewritten so:

  • It uses dependencies that are installed by default (either remove undeclared dependencies or add dependencies to flepiMoP in an optional dependency group), and
  • Only uses data contained in the flepiMoP repository.

This would make it a useful tool for teaching by allowing users to run it locally. A complete solution involves creating a new GitHub action workflow that would regenerate the notebook on changes to gempyor or the example this notebook is relevant to.

@TimothyWillard TimothyWillard added documentation Relating to ReadMEs / gitbook / vignettes / etc. gempyor Concerns the Python core. low priority Low priority. meta/workflow Relating to CI / issue templates / testing frameworks / etc. labels Dec 3, 2024
@jcblemai
Copy link
Collaborator

jcblemai commented Dec 3, 2024

What data does it uses outside ?

@TimothyWillard
Copy link
Contributor Author

What data does it uses outside ?

{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"results = {}\n",
"for folder in [\"SMH_R18_noBoo_lowIE_blk1\", \"SMH_R18_allBoo_lowIE_blk1\"]:\n",
" results[folder] = []\n",
" for fn in sorted(gempyor.utils.list_filenames(folder=f\"../../../COVID19_USA/result/{folder}\", filters=[\"hosp.parquet\"])):\n",
" df = gempyor.read_df(fn)\n",
" df = df.set_index(\"date\")\n",
" results[folder].append(df)"
]
},

Looks maybe something in https://github.com/HopkinsIDD/COVID19_USA, although relies on a hard-coded path and it's unclear what branch. Regardless, not data that is contained within the flepiMoP repository.

@jcblemai
Copy link
Collaborator

jcblemai commented Dec 3, 2024

oh wow, this part should not belong to this notebook, it's some scenario analysis from long ago (I guess because I got inspired from this code to make a comparison plot). Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Relating to ReadMEs / gitbook / vignettes / etc. gempyor Concerns the Python core. low priority Low priority. meta/workflow Relating to CI / issue templates / testing frameworks / etc.
Projects
None yet
Development

No branches or pull requests

2 participants