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

Change warning when setting model.agents to error #2225

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Aug 19, 2024

Replaced the warning with an AttributeError when attempting to set model.agents. This change enforces that the agents attribute will be reserved for internal use by Mesa in future releases. Users must update their code to use a different attribute name for custom agent storage.

This allows us to start using model.agents in Mesa 3.0 for ourselves, which helps with #2212.

Replaced the warning with an `AttributeError` when attempting to set `model.agents`. This change enforces that the `agents` attribute will be reserved for internal use by Mesa in future releases. Users must update their code to use a different attribute name for custom agent storage.
@EwoutH EwoutH added the breaking Release notes label label Aug 19, 2024
Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
Schelling small 🔵 -2.1% [-2.4%, -1.9%] 🔵 +0.8% [+0.6%, +1.0%]
Schelling large 🔵 -2.5% [-3.1%, -1.9%] 🔵 -0.6% [-3.2%, +1.6%]
WolfSheep small 🔵 -1.2% [-1.3%, -1.0%] 🔵 -1.0% [-1.1%, -0.8%]
WolfSheep large 🔵 -2.1% [-2.5%, -1.8%] 🔵 +0.4% [+0.2%, +0.6%]
BoidFlockers small 🔵 +1.0% [+0.2%, +1.7%] 🔵 +0.2% [-0.5%, +1.0%]
BoidFlockers large 🔵 +0.7% [+0.3%, +1.2%] 🔵 +0.1% [-0.7%, +0.9%]

@EwoutH
Copy link
Member Author

EwoutH commented Aug 21, 2024

@projectmesa/maintainers I would like this in the next pre-release. Would somebody be so kind to review?

@EwoutH EwoutH mentioned this pull request Aug 21, 2024
7 tasks
@EwoutH EwoutH merged commit 2cc8ee5 into main Aug 21, 2024
9 checks passed
@rht rht deleted the model.agents_error branch August 21, 2024 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants