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

move _setup_agent_registration into Model.__init__ #2501

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

quaquel
Copy link
Member

@quaquel quaquel commented Nov 13, 2024

For people transitioning from mesa 2 to mesa 3, we still had some nice warnings if in model super was not called. For 3.1, this won't be needed anymore, and it simplifies the code. This PR moves the setup of agent registration data structures into Model.__init__ and simplifies register_agent.

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🟢 -9.0% [-10.1%, -7.8%] 🔵 -1.0% [-1.2%, -0.8%]
BoltzmannWealth large 🔵 -3.2% [-5.6%, -1.6%] 🔵 -3.0% [-4.3%, -1.9%]
Schelling small 🔵 -0.7% [-1.1%, -0.4%] 🔵 -1.5% [-1.6%, -1.4%]
Schelling large 🔵 -0.7% [-0.9%, -0.4%] 🔵 +1.2% [-0.3%, +2.2%]
WolfSheep small 🔵 -1.1% [-1.5%, -0.7%] 🔵 -0.8% [-1.0%, -0.7%]
WolfSheep large 🔵 -1.7% [-3.5%, -0.6%] 🔵 -1.8% [-3.4%, -0.3%]
BoidFlockers small 🔵 -2.8% [-3.4%, -2.3%] 🔵 -1.9% [-2.6%, -1.0%]
BoidFlockers large 🔵 -3.1% [-3.6%, -2.4%] 🔵 -1.8% [-2.4%, -1.1%]

@EwoutH EwoutH added trigger-benchmarks Special label that triggers the benchmarking CI and removed trigger-benchmarks Special label that triggers the benchmarking CI labels Nov 13, 2024
Copy link
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI errors are unrelated, so go ahead. Thanks!

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 -0.7% [-2.1%, +0.8%] 🔵 -0.3% [-0.5%, -0.1%]
BoltzmannWealth large 🔵 -1.7% [-2.5%, -0.7%] 🔵 -1.2% [-3.3%, +0.8%]
Schelling small 🔵 -2.6% [-2.9%, -2.4%] 🔵 -0.5% [-0.7%, -0.3%]
Schelling large 🔵 -1.8% [-2.2%, -1.3%] 🔵 +1.4% [-0.1%, +3.1%]
WolfSheep small 🔵 -0.6% [-1.1%, -0.2%] 🔵 +0.2% [-0.2%, +0.6%]
WolfSheep large 🔵 +2.1% [+1.4%, +2.7%] 🔴 +8.4% [+5.7%, +10.4%]
BoidFlockers small 🔵 -2.6% [-3.1%, -2.0%] 🔵 -0.1% [-1.0%, +0.8%]
BoidFlockers large 🔵 -2.0% [-2.6%, -1.2%] 🔵 +1.2% [+0.8%, +1.7%]

@quaquel quaquel merged commit 3ee7813 into projectmesa:main Nov 13, 2024
10 of 12 checks passed
@quaquel quaquel deleted the model_cleanup branch November 13, 2024 20:05
@EwoutH EwoutH added the maintenance Release notes label label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants