Giter Club home page Giter Club logo

Comments (9)

bstabler avatar bstabler commented on June 20, 2024

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?

from populationsim.

jfdman avatar jfdman commented on June 20, 2024

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?

from populationsim.

jamiecook avatar jamiecook commented on June 20, 2024

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
github_issue_mp=2.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

from populationsim.

bettinardi avatar bettinardi commented on June 20, 2024

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.

from populationsim.

jamiecook avatar jamiecook commented on June 20, 2024

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.

from populationsim.

janzill avatar janzill commented on June 20, 2024

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

slice_geography: SA3
multiprocess: True
multiprocess_steps:
- name: mp_seed_balancing
begin: input_pre_processor
- name: mp_sub_balancing_SA1
begin: sub_balancing.geography=SA1
num_processes: 2
slice:
tables:
- slice_crosswalk
- crosswalk
# don't slice any tables not explicitly listed above in slice.tables
except: True
# the following tables are added by sub_balancer and should be coalesced
coalesce:
- SA1_weights
- SA1_weights_sparse
- trace_SA1_weights
- name: mp_summarize
begin: expand_households

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)?

from populationsim.

m-richards avatar m-richards commented on June 20, 2024

@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.

from populationsim.

jamiecook avatar jamiecook commented on June 20, 2024

So ... was this a Jamie problem all along? Or was anyone else actually able to reproduce the example that I uploaded?

from populationsim.

bettinardi avatar bettinardi commented on June 20, 2024

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.

from populationsim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.