assume-framework / assume

ASSUME - Agent-based Simulation for Studying and Understanding Market Evolution
https://assume.readthedocs.io
20 stars 5 forks source link

Distributed csv loader using -p cli param #377

Open maurerle opened 2 weeks ago

maurerle commented 2 weeks ago

This adds a CLI param -p or --parallell which runs each agent on a separate process in its own world. This allocates port 9100 and following (one per UnitsOperator).

In scenarios with few unitsoperators this does not have any benefit and might slow things down as well, though it helps for larger ones:

one can compare assume -s example_02 -p (5000 it/s) with the serialized version assume -s example_02 (2000 it/s). While it does slow things down when using assume (100000 it/s) vs assume -p (78000 it/s)

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 67.85714% with 27 lines in your changes missing coverage. Please review.

Project coverage is 77.77%. Comparing base (bf809da) to head (3d2d2a7).

Files Patch % Lines
assume/world.py 51.02% 24 Missing :warning:
assume/scenario/loader_csv.py 91.42% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #377 +/- ## ========================================== - Coverage 78.20% 77.77% -0.43% ========================================== Files 44 44 Lines 5179 5224 +45 ========================================== + Hits 4050 4063 +13 - Misses 1129 1161 +32 ``` | [Flag](https://app.codecov.io/gh/assume-framework/assume/pull/377/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework) | Coverage Δ | | |---|---|---| | [pytest](https://app.codecov.io/gh/assume-framework/assume/pull/377/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework) | `77.77% <67.85%> (-0.43%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.