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

update Agent.__init__ to remove deprecation warning #2328

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

quaquel
Copy link
Member

@quaquel quaquel commented Sep 25, 2024

As discussed briefly in the last developer meeting, this PR removes the deprecation warning from Agent.__init__ regarding unique_id. The main reason for removing it here is that it is the only way to ensure proper behavior of python's super. This in turn is relevant for a range of discussions (movements, HasObservable, some geo stuff).

It is agreed that in the last 2.X release, to come up with the first stable version of MESA 3, we will explicitly include a deprecation warning regarding unique_id.

References:

# Old
agent = MyAgent(self.next_id(), self, ...)

# New
agent = MyAgent(self, ...)

@quaquel quaquel added trigger-benchmarks Special label that triggers the benchmarking CI and removed trigger-benchmarks Special label that triggers the benchmarking CI labels Sep 25, 2024
@quaquel quaquel requested a review from EwoutH September 25, 2024 14:53
Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔴 +4.0% [+3.1%, +4.8%] 🔵 -0.5% [-0.7%, -0.4%]
BoltzmannWealth large 🔵 +2.8% [+2.5%, +3.2%] 🔵 +1.6% [+0.6%, +2.7%]
Schelling small 🔵 -1.2% [-1.6%, -0.8%] 🔵 +1.1% [+0.9%, +1.4%]
Schelling large 🔵 -1.4% [-2.2%, -0.6%] 🔵 -2.6% [-5.4%, +1.0%]
WolfSheep small 🔵 +1.6% [+1.2%, +2.1%] 🔵 +0.9% [-0.1%, +1.8%]
WolfSheep large 🔵 +0.6% [-1.0%, +2.1%] 🔵 -3.2% [-5.7%, -0.3%]
BoidFlockers small 🔵 +0.9% [+0.5%, +1.2%] 🔵 +0.8% [+0.0%, +1.6%]
BoidFlockers large 🔵 +0.2% [-0.4%, +0.8%] 🔵 -1.1% [-1.6%, -0.5%]

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 +3.6% [+2.6%, +4.4%] 🔵 -0.8% [-0.9%, -0.7%]
BoltzmannWealth large 🔵 +1.8% [+1.3%, +2.2%] 🔵 +1.6% [+0.8%, +2.3%]
Schelling small 🔵 -1.4% [-1.8%, -0.9%] 🔵 -0.6% [-0.8%, -0.4%]
Schelling large 🔵 -1.1% [-1.6%, -0.6%] 🔵 +1.9% [+0.4%, +3.2%]
WolfSheep small 🔵 +1.2% [+1.0%, +1.4%] 🔵 -0.4% [-0.6%, -0.2%]
WolfSheep large 🔵 +1.9% [+1.2%, +2.6%] 🔵 +2.2% [+1.0%, +3.7%]
BoidFlockers small 🔵 +2.6% [+2.3%, +3.0%] 🔵 +0.4% [-0.2%, +1.0%]
BoidFlockers large 🔵 +1.7% [+1.2%, +2.1%] 🔵 -0.7% [-1.7%, +0.2%]

@EwoutH EwoutH added the breaking Release notes label label Sep 25, 2024
@quaquel quaquel merged commit cb1c3f7 into projectmesa:main Sep 25, 2024
14 of 16 checks passed
@quaquel quaquel deleted the agent branch September 25, 2024 16:28
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