-
Notifications
You must be signed in to change notification settings - Fork 0
iddata refactoring #25
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
Open
matthewcornell
wants to merge
11
commits into
main
Choose a base branch
from
mc/idmodels-iddata-refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
52fc76e
iddata refactoring. updated to latest iddata commit hash
matthewcornell 3f2c07d
iddata refactoring. updated to latest iddata commit hash: pyproject.toml
matthewcornell 0d25333
address PR #25 review: remove xmas_spike, rename unique_id param, rem…
matthewcornell 8ed3d9d
update iddata dependency hash in pyproject.toml, requirements, and uv…
matthewcornell ed151a4
incorporate changes based on PR comments
matthewcornell 3534a36
Revise `temporal_legs` param desc for clarity
lshandross 171338e
Fix ruff I001 import formatting across source and test files
lshandross e142129
Fix ruff I001 by pinning idmodels as known-first-party in isort config
lshandross c28725b
Restore inline comments in test_sarix; consolidate run config helpers…
lshandross 5d44fc5
Update iddata dependency hash across all dependency files
lshandross eb28011
Update CHANGELOG for 2.0.0
lshandross 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
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
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,26 @@ | ||
| import pickle | ||
| from pathlib import Path | ||
|
|
||
| from idmodels.sarix import SARIXModel | ||
|
|
||
|
|
||
| def main(): | ||
| pkl_dir = Path("/Users/cornell/IdeaProjects/operational-models/covid_gbqr/") | ||
| # pkl_dir = Path('/Users/cornell/IdeaProjects/operational-models/covid_ar6_pooled/') | ||
| pkl_mc_rc_pairs = [ | ||
| # ('2025-08-02-model_config.pkl', '2025-08-02-run_config.pkl'), # works -> 2025-08-02-UMass-gbqr.csv | ||
| ("2025-08-09-model_config.pkl", "2025-08-09-run_config.pkl"), # fails -> 2025-08-09-UMass-gbqr.csv | ||
| ] | ||
| for model_config_file_name, run_config_file_name in pkl_mc_rc_pairs: | ||
| with open(pkl_dir / model_config_file_name, "rb") as mc_fp, open(pkl_dir / run_config_file_name, "rb") as rc_fp: | ||
| model_config = pickle.load(mc_fp) | ||
| run_config = pickle.load(rc_fp) | ||
| print("*", model_config_file_name, ",", run_config_file_name) | ||
| print("yy", model_config) | ||
| model_config.x = [] | ||
| model = SARIXModel(model_config) | ||
| model.run(run_config) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
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,17 +1,28 @@ | ||
| from iddata.enums import Disease, SourceType | ||
|
|
||
| from idmodels.config import ( | ||
| DataSource, | ||
| Disease, | ||
| GBQRModelConfig, | ||
| PoolingStrategy, | ||
| PowerTransform, | ||
| RunConfig, | ||
| SARIXFourierModelConfig, | ||
| SARIXModelConfig, | ||
| GBQRModelConfig, | ||
| PoolingStrategy, | ||
| PowerTransform, | ||
| RunConfig, | ||
| SARIXFourierModelConfig, | ||
| SARIXModelConfig, | ||
| ) | ||
| from idmodels.gbqr import GBQRModel | ||
| from idmodels.sarix import SARIXFourierModel, SARIXModel | ||
|
|
||
| __all__ = ["DataSource", "Disease", "GBQRModel", "GBQRModelConfig", "PoolingStrategy", "PowerTransform", "RunConfig", | ||
| "SARIXFourierModel", "SARIXFourierModelConfig", "SARIXModel", "SARIXModelConfig"] | ||
| __all__ = [ | ||
| "Disease", | ||
| "GBQRModel", | ||
| "GBQRModelConfig", | ||
| "PoolingStrategy", | ||
| "PowerTransform", | ||
| "RunConfig", | ||
| "SARIXFourierModel", | ||
| "SARIXFourierModelConfig", | ||
| "SARIXModel", | ||
| "SARIXModelConfig", | ||
| "SourceType", | ||
| ] | ||
|
|
||
| __version__ = "1.3.1" | ||
| __version__ = "2.0.0" |
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,4 @@ | ||
| POWER_TRANSFORM_OFFSET: float = 0.01 | ||
|
|
||
| IN_SEASON_WEEK_MIN: int = 10 | ||
| IN_SEASON_WEEK_MAX: int = 45 |
Oops, something went wrong.
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.