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 some DeprecationWarnings to note they are removed in Mesa 3.1 #2481

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

EwoutH
Copy link
Member

@EwoutH EwoutH commented Nov 11, 2024

This improves some of the DeprecationWarnings to make it explicit that certain features will be removed in Mesa 3.1. This communicated this clearly in line with our recommend upgrade strategy.

Features to already deprecated to be removed in Mesa 3.1:

  1. Time Module: The entire Time module, including all schedulers, is deprecated and will be removed. Replacement with AgentSet functionality is recommended.
  2. Parameter n in AgentSet.select: The n parameter is deprecated; use at_most instead.
  3. return_results in AgentSet.do: The return_results option is deprecated; use AgentSet.do for return_results=False and AgentSet.map for return_results=True.
  4. Model's next_id() method: model.next_id() is deprecated as agents now track their unique IDs automatically.
  5. get_agents_of_type in Model: Model.get_agents_of_type() is deprecated; use the agents_by_type property instead.
  6. initialize_data_collector() method: This method is deprecated; directly use the DataCollector class by setting self.datacollector = DataCollector(...).
  7. DiscreteEventScheduler: This class is removed, and users should use the functionality provided by experimental.devs.

Note this does not add new deprecations, is just updates some to message more clearly when they get removed.

This improves some of the DeprecationWarnings to make it explicit that certain features will be removed in Mesa 3.1. This communicated this clearly in line with our recommend upgrade strategy  https://github.com/projectmesa/mesa/blob/main/docs/migration_guide.md#upgrade-strategy.
@EwoutH EwoutH added the deprecation When a new deprecation is introduced label Nov 11, 2024
@quaquel
Copy link
Member

quaquel commented Nov 11, 2024

Just a quick clarifying questions: what stuff can we delete in 3.1?

I'll review the stuff hopefully later today.

Copy link

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 +0.2% [-0.1%, +0.5%] 🔵 +1.9% [+1.8%, +2.1%]
BoltzmannWealth large 🔵 -0.1% [-0.5%, +0.3%] 🔵 +1.7% [+1.4%, +2.1%]
Schelling small 🔵 +0.2% [-0.2%, +0.5%] 🔵 +0.6% [+0.4%, +0.8%]
Schelling large 🔵 +0.4% [+0.2%, +0.6%] 🔵 +0.2% [-0.3%, +0.7%]
WolfSheep small 🔵 +0.0% [-0.1%, +0.2%] 🔵 -0.2% [-0.4%, -0.0%]
WolfSheep large 🔵 +0.3% [+0.0%, +0.5%] 🔵 +0.3% [+0.2%, +0.5%]
BoidFlockers small 🔵 -0.3% [-0.6%, -0.0%] 🔵 -0.4% [-1.1%, +0.2%]
BoidFlockers large 🔵 -1.0% [-1.9%, -0.2%] 🔵 +0.4% [-0.1%, +1.0%]

@EwoutH
Copy link
Member Author

EwoutH commented Nov 11, 2024

what stuff can we delete in 3.1?

  • Anything that's already deprecated (before 3.0.0 got tagged)
  • Anything that's experimental
  • Anything else that doesn't break user API

I would like to get out 3.0.1 fast and ideally have this in it.

@EwoutH EwoutH added the docs Release notes label label Nov 11, 2024
@EwoutH
Copy link
Member Author

EwoutH commented Nov 11, 2024

Merging this and releasing 3.0.1.

@EwoutH EwoutH merged commit 8ae9b22 into projectmesa:main Nov 11, 2024
15 checks passed
@quaquel quaquel self-requested a review November 11, 2024 10:12
Copy link
Member

@quaquel quaquel left a comment

Choose a reason for hiding this comment

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

looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation When a new deprecation is introduced docs Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants