Skip to content
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

batch_run makes no progress #2320

Open
peihsunhsieh opened this issue Sep 24, 2024 · 1 comment
Open

batch_run makes no progress #2320

peihsunhsieh opened this issue Sep 24, 2024 · 1 comment

Comments

@peihsunhsieh
Copy link

peihsunhsieh commented Sep 24, 2024

Describe the bug

Version: mesa 2.3.4

I encountered an issue where the model runs much slower when using batch_run compared to running the same model manually.

When running the model manually for 100 steps, it completed in just 2 minutes:

test_model = Societies_G2_LTX(N=1000,g1_learning_type='PB',g2_learning_type='CB', group2_prop=0.1, g1_init='r')
for _ in range(100):
    test_model.step()

However, when I used batch_run with the same parameters, the model kept running for over 10 minutes, even for only ten steps:

params = {'N':1000, 'g1_learning_type':'PB','g2_learning_type':'CB', 'group2_prop':0.45,'g1_init':'r'}
Societies_G2_LTX_test = mesa.batch_run(
    Societies_G2_LTX,
    parameters=params,
    iterations=1,
    max_steps=10,
    number_processes=1,
    data_collection_period=1,
    display_progress=True,
)

Is there any known issue when using batch_run, or am I missing something in the configuration that could be causing this significant slowdown? Is it related to the issue in #2135 ?

@peihsunhsieh peihsunhsieh changed the title Model Runs Significantly Slower with batch_run batch_run makes no progress Sep 24, 2024
@EwoutH
Copy link
Member

EwoutH commented Sep 24, 2024

Thanks for reporting this potential issue. Could you share the full model? Then I will try to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants