-
Notifications
You must be signed in to change notification settings - Fork 33
[1Pt] PR: Add back multi-processesing to inundate_gms #1587
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
base: dev
Are you sure you want to change the base?
Conversation
…into dev Mergin remote repo updates
…into dev Latest changes
…into dev Merge dev
…into dev Merge latest changes.
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.
Ran successfully for 10 HUCs. Please update the changelog
.
Can I recommend you try a sample bigger than just 10? And play with how job number affect it? :) |
I ran inundation nation on UAT minus 7 non-CONUS HUCs with the following command: python /foss_fim/tools/inundate_nation.py -r /outputs/lofi_uat_test -m 100_0 -f /data/inputs/rating_curve/nwm_recur_flows/nwm3_17C_recurr_10_0_cms.csv -s -j 63 -t 64 -o /outputs/lofi_uat_test Runtime: 32 minutes and 6 seconds |
Quick inclusion to allow threading or multiprocessing in inundate_gms.py processing.
Changes
Testing
Ran tests with both gms_multi_process set to True and False. The following performance was achieved.
Set to False:
Set to True:
Last test was on my EC2, inundate_nation.py for 10 HUCS. The old version was ran as follows:
python /foss_fim/tools/inundate_nation.py -r /outputs/Inundation_Nation_Test -m 100_0 -f /data/inputs/rating_curve/nwm_recur_flows/nwm3_17C_recurr_10_0_cms.csv -s -j 15 -o /outputs/Inundation_Nation_Test
Runtime: 18 minutes 22 seconds
This branch with the following command:
python /foss_fim/tools/inundate_nation.py -r /outputs/Inundation_Nation_Test -m 100_0 -f /data/inputs/rating_curve/nwm_recur_flows/nwm3_17C_recurr_10_0_cms.csv -s -j 15 -t 8 -o /outputs/Inundation_Nation_Test
Runtime: 4 minutes 37 seconds
I also tested synthesize_test_cases.py, with the following command:
python /foss_fim/tools/synthesize_test_cases.py -c DEV -v mini-test -b ble -jh 7 -jb 2 -m /outputs/mini-test/gms_synth_metrics.csv -vg -o
Runtime: 27 minutes and 48 seconds
python /foss_fim/tools/synthesize_test_cases.py -c DEV -v mini-test -b ble -jh 7 -jb 2 -tb 8 -m /outputs/mini-test/gms_synth_metrics.csv -vg -o
Runtime: 26 minutes 51 seconds
---- UPDATE ----
I ran inundation nation on UAT minus 7 non-CONUS HUCs with the following command:
python /foss_fim/tools/inundate_nation.py -r /outputs/lofi_uat_test -m 100_0 -f /data/inputs/rating_curve/nwm_recur_flows/nwm3_17C_recurr_10_0_cms.csv -s -j 63 -t 64 -o /outputs/lofi_uat_test
Runtime: 32 minutes and 6 seconds
Deployment Plan (For developer use)
How does the changes affect the product?
Issuer Checklist (For developer use)
You may update this checklist before and/or after creating the PR. If you're unsure about any of them, please ask, we're here to help! These items are what we are going to look for before merging your code.
[_pt] PR: <description>
dev
branch (the default branch), you have a descriptive Feature Branch name using the format:dev-<description-of-change>
(e.g.dev-revise-levee-masking
)dev
branchpre-commit
hooks were run locally4.x.x.x
Merge Checklist (For Technical Lead use only)