-
Notifications
You must be signed in to change notification settings - Fork 40
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
Different outputs when using MultiProcessing #150
Comments
Hi @jamiecook. I'm no longer actively supporting this project, but when we added the multiprocessing component, we did several comparisons / validation for the Oregon statewide model implementation. This was for @bettinardi at ODOT and was done by @goreaditya at RSG. Maybe @bettinardi can help investigate? |
Thanks @bstabler ! Its my understanding that our tests showed exactly the same results? There's nothing that stands out in your configuration file that seems problematic. @goreaditya or @bettinardi - any ideas? |
Versions I'm using λ pip list | grep sim
activitysim 1.0.4
populationsim 0.5.1 I've set up a tar ball here with the simple test I'm running. The first one works correctly as the run.py disables MP, the second one removes that line and generates the strange output. github_issue_mp=1.tar.gz The easiest way to see the differnce is to count the persons by their SA3. ☢ cut -d, -f2 github_issue_mp\=1/output/synthetic_persons.csv | sort | uniq -c
57958 30204
45277 30402
1 SA3
20220202 18:36:17 jamie@hikaru:/mnt/hdd_data/jamie_data/move2.0/runs/InterimResults/population_synthesis/domestic/processing
λ cut -d, -f2 github_issue_mp\=2/output/synthetic_persons.csv | sort | uniq -c
63870 30204
1 SA3 |
I'm hoping @goreaditya can weigh-in. I have reviewed overall results at a higher level of than this discussion and do not have anything immediate to contribute to this issue. I am thankful that @jamiecook is flagging this and hope that we can find the issuse(s) if they exist and have a cleaner product if there is a bug here. |
Any update on this issue? At the moment I'm pushing ahead by wrapping my own multiprocess Pool around multiple calls to activitysim.cli.run - but that seems less than ideal in the long run. |
I am using PopulationSim on a different project, but with the same geographies (household travel survey at Region level, controls at SA3 and SA1, where SA1 is the smallest level). If you do the multiprocessing like the test example, i.e. only parallelise over the lowest level (TAZ there, here SA1), then the results look correct for me. In terms of mp settings, the last 20 lines of the yaml Jamie attached would then read
Also, @jamiecook is no longer working on this project, do you have any further updates on this Matt (sorry for the link, cannot tag m-richards but sent him a message)? |
@janzill Thanks for checking (for context, I have picked up the work Jamie was doing using populationsim to produce the above outputs) the code is now at a point where I haven't been able to replicate the problem documented in this issue. I'm seeing reasonable, comparable results using both manual multiprocessing pool and running multiprocessing at the SA1 (smallest geography) level. |
So ... was this a Jamie problem all along? Or was anyone else actually able to reproduce the example that I uploaded? |
Could we have this reviewed and finalized (either closed as not an issue, or resolved if there is an issue, or if the bug is large, having a clear issues established on what it will take to fix) - under Phase 9. |
@binnympaul not sure if this is the right place to post this but i'm seeing strange differences in my outputs when using multiprocessing.
I've setup a run that only processes 2 SA3s (Australian bureau of statistics areas - ~50k population)
If I use num_processes=1 or set multiprocess: False I get outputs that match well to controls
But when i use mp=2 it seems to get corrupted, only one of the two SA3s is generated and the persons/households within that SA3 are not quite right (10% high on num people, households are good but sometimes bad - see image below)
Do you have any thoughts on this.
PS is @bstabler still contributing here?
CONFIG FILE
The text was updated successfully, but these errors were encountered: