-
Notifications
You must be signed in to change notification settings - Fork 3
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
Vax dedup #26
Vax dedup #26
Conversation
…odel that not ready yet.
* add sft tests * Add broadcast co_event and doc for intervention * Add path to manifest.py so we can run test at any dir * Added README.md for tests * Add unittests coverage test * Add coverage_check.py * Change coverage test file name to get_unittest_coverage.py
Adding new examples for Pakistan provinces and various coverage regimes.
elif deduplication_policy == "combine": | ||
intervention.Enable_Intervention_Replacement = 0 | ||
else: | ||
raise ValueError( f"duplication_policy needs to be 'replace' or 'combine', not '{duplication_policy}'." ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{duplication_policy} should be {deduplication_policy}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
@@ -150,7 +150,10 @@ def add_vax_intervention(campaign, values, min_age=0.75, max_age=15, binary_immu | |||
import emodpy_typhoid.interventions.typhoid_vaccine as tv | |||
print(f"Telling emod-api to use {manifest.schema_file} as schema.") | |||
campaign.set_schema(manifest.schema_file) | |||
camp_coverage = values['coverage'] | |||
if 'coverage' in values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not working for run('Coverage_RIA') case.
I changed to following to replace line 153 to line 156 which seems working for all cases
for key in values.keys():
if 'coverage' in key:
camp_coverage = values[key]
break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks.
@@ -25,7 +25,7 @@ def new_intervention( camp, efficacy=0.82, mode="Shedding", constant_period=0, d | |||
constant_period (float, optional): The constant period of the waning effect in days. Default is 0. | |||
decay_constant (float, optional): The decay time constant for the waning effect. Default is 6935.0. | |||
expected_expiration (float, optional): The mean duration before efficacy becomes 0. If this is set to non-zero value, the constant_period and decay_constant are ignored. These are two different modes of waning. | |||
|
|||
deduplication_policy (string, optional): Defaults to 'replace'. Can also be 'combine'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line 28 for docstring should not be here. Should be moved to def new_vax function's doc string
I am comparing new build dev07 and dev05 for emod-typhoid with same examples, I got different populations: |
Thanks for the review @shchen-idmod. Making those changes now. That's very surprising about the population difference just from the builds! And a great catch. I'll look into that. |
@@ -73,7 +73,7 @@ def new_vax( camp, efficacy=0.82, mode="Acquisition", constant_period=0, decay_c | |||
elif deduplication_policy == "combine": | |||
intervention.Enable_Intervention_Replacement = 0 | |||
else: | |||
raise ValueError( f"duplication_policy needs to be 'replace' or 'combine', not '{duplication_policy}'." ) | |||
raise ValueError( f"deduplication_policy needs to be 'replace' or 'combine', not '{duplication_policy}'." ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to change the last word in this line
if 'coverage' in key: | ||
camp_coverage = values[key] | ||
break | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to else
This PR adds support for vaccine de-duplication which enables boosting. It requires a new version of the model: emod_typhoid==0.0.4.dev7
https://github.com/InstituteforDiseaseModeling/emodpy-typhoid/pull/26/files#diff-512107aeda10e42e2086b731f9e875a96c5b1e5d265acfa1163ef625fdef459fR5