-
Notifications
You must be signed in to change notification settings - Fork 0
Integrate all estimators #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
c595976
Integrate all estimators into estiMINT
CosmoNaught a56f7ee
update README
CosmoNaught 992af02
update README, more tests and remove fluff
CosmoNaught 6c32614
Fix hardcoded paths in prepare scripts; trim bednet docstrings
CosmoNaught 7c99d0c
Add run_scenarios pipeline, CI/publish workflows, split deps into ext…
CosmoNaught f9c1c53
update Py cli ver, README and reqs
CosmoNaught a0a6528
update publish rules
CosmoNaught 90a8371
Refactor code structure for improved readability and maintainability
absternator b6fb4dd
Bump estimint version to 1.4.2 in uv.lock
absternator 528d9b2
Add dependency groups for development dependencies in pyproject.toml …
absternator 2b224e7
refactor: restore canonical scenario key names
CosmoNaught 9963a04
refactor(hbr): rename DT to dt, lower prev floor to 0.01
CosmoNaught 8ca87e0
style: remove unused imports
CosmoNaught 8a01454
chore: drop committed coverage and metrics
CosmoNaught 4b27322
docs: sync run_scenarios example to canonical keys
CosmoNaught 013b471
refactor(hbr): use df for the dataframe in eir_to_hbr trainer
CosmoNaught 8c5327f
refactor: use df for the dataframe in remaining trainers
CosmoNaught 4a7493e
docs: clarify y9 columns are year-9 means, not 'aggregates'
CosmoNaught eb676f7
fix(scenarios): map current/future nets, IRS, LSM and routine covaria…
CosmoNaught d8a4e74
update manifest
CosmoNaught e6ba653
verbump
CosmoNaught 70c43e7
verbump
CosmoNaught 0516fbc
fix(ci): sync uv.lock to estimint 1.4.4
CosmoNaught 121e9a2
build: add scripts/release.sh for atomic version bumps
CosmoNaught 90bc0fe
remove scripts folder
CosmoNaught b2e9ae0
refactor: update scenarios to use Scenario dataclass for improved cla…
absternator dda2434
bump version to 1.5.0 in pyproject.toml
absternator 346d838
fix: update revision to 2 and bump estimint version to 1.5.0 in uv.lock
absternator 06c57a1
refactor: move Scenario and EirTarget dataclasses to types.py and upd…
absternator c1219f6
update version
absternator File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| name: Publish Release to PyPI | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*.*.*" | ||
|
|
||
| jobs: | ||
| run: | ||
| runs-on: ubuntu-latest | ||
| environment: | ||
| name: pypi | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v6 | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b | ||
| with: | ||
| enable-cache: true | ||
| version: "0.11.18" | ||
| - name: Set up Python | ||
| run: uv python install | ||
| - name: Build | ||
| run: uv build | ||
| - name: Smoke test (wheel) | ||
| run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py | ||
| - name: Smoke test (source distribution) | ||
| run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py | ||
| - name: Publish | ||
| run: uv publish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
|
CosmoNaught marked this conversation as resolved.
|
||
| branches: | ||
| - "*" | ||
|
|
||
| concurrency: | ||
| group: tests-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| name: pytest (Python ${{ matrix.python-version }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.12", "3.13"] | ||
|
|
||
| steps: | ||
|
absternator marked this conversation as resolved.
|
||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b | ||
| with: | ||
| version: "0.11.18" | ||
| enable-cache: true | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install project | ||
| run: uv sync --locked | ||
|
|
||
| - name: Run tests | ||
| run: uv run pytest | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this file needed? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| include README.md | ||
| include requirements.txt | ||
| recursive-include src/estimint/data * | ||
| recursive-include src/estimint/inst * | ||
| prune tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # datasets/ | ||
|
|
||
| Training data for retraining the estiMINT models. Not shipped with the package. | ||
|
|
||
| **`estimint_simulations_y9.parquet`** — 16,384 rows (4,096 parameter sets × 4 sims). | ||
| `prev_y9` and `hbr_y9` are year-9 means: prevalence and human biting rate averaged over | ||
| the 365 days of simulation year 9 (the year ending at the intervention on day 3285). | ||
| Columns: `parameter_index`, `simulation_index`, `eir`, `dn0_use`, `Q0`, `phi_bednets`, | ||
| `seasonal`, `itn_use`, `irs_use`, `prev_y9`, `hbr_y9`. | ||
|
|
||
| Each model's `prepare.py` filters this source and sorts by key into its training view. |
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # models/hbr | ||
|
|
||
| The HBR feature's two sub-models, both used by `estimate_eir_with_mosquito_delta` | ||
| (`src/estimint/hbr.py`) to answer "what happens to EIR if mosquito density changes by X%?". | ||
|
|
||
| | Sub-model | Direction | Bundle name | File | | ||
| |---|---|---|---| | ||
| | `train_hbr_to_eir.py` | HBR + interventions → EIR | `hbr` | `estiMINT_HBR_model.pkl` | | ||
| | `train_eir_to_hbr.py` | EIR + interventions → HBR | `eir_to_hbr` | `estiMINT_EIR_to_HBR_model.pkl` | | ||
|
|
||
| ```bash | ||
| python models/hbr/prepare.py # source -> hbr_training.parquet + eir_to_hbr_training.parquet | ||
| python models/hbr/train_hbr_to_eir.py # -> estiMINT_HBR_model.pkl | ||
| python models/hbr/train_eir_to_hbr.py # -> estiMINT_EIR_to_HBR_model.pkl | ||
| ``` | ||
|
|
||
| Deployed copies live in `src/estimint/data/`. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.