mesa-examples icon indicating copy to clipboard operation
mesa-examples copied to clipboard

Audit: Mesa-examples compatibility with Mesa 3.x — tracking issue

Open annapurna-gupta opened this issue 8 months ago • 2 comments

Summary

This issue tracks the compatibility of all mesa-examples with Mesa 3.x. Each example has been manually tested.

The goal is to:

  1. Identify every broken example and WHY it is broken
  2. Fix each one with a separate PR

Error types found so far

Type Error message Root cause
A AttributeError: module 'mesa' has no attribute 'visualization' Uses removed Mesa 2.x API (CanvasGrid, ModularServer, ChartModule)
B ValueError: Unknown space type: NoneType Space not initialized correctly for Mesa 3.x
C ImportError: attempted relative import with no known parent package Relative imports break when running with solara run directly

Examples checklist

examples/

  • [ ] aco_tsp — ✅ Working
  • [ ] bank_reserves — status: ?
  • [ ] boltzmann_wealth_model_network — status: ?
  • [ ] caching_and_replay — ❌ BROKEN — Type A (AttributeError: module 'mesa' has no attribute 'visualization')
  • [ ] color_patches — status: ?
  • [ ] conways_game_of_life_fast — ❌ BROKEN — Type B (ValueError: Unknown space type: NoneType)
  • [ ] deffuant_weisbuch — status: ?
  • [ ] dining_philosophers — status: ?
  • [ ] el_farol — status: ?
  • [ ] emperor_dilemma — status: ?
  • [ ] forest_fire — status: ?
  • [ ] hex_ant — ❌ BROKEN — Type C (ImportError: attempted relative import with no known parent package)
  • [ ] hotelling_law — status: ?
  • [ ] humanitarian_aid_distribution — status: ?
  • [ ] rumor_mill — status: ?
  • [ ] virus_antibody — status: ?
  • [ ] warehouse — status: ?
  • [ ] termites — status: ?

gis/

  • [ ] geo_schelling — status: ?
  • [ ] geo_schelling_points — status: ?
  • [ ] geo_sir — status: ?
  • [ ] agents_and_networks — status: ?
  • [ ] rainfall — status: ?
  • [ ] urban_growth — status: ?
  • [ ] population — status: ?

rl/

  • [ ] boltzmann_money — status: ?
  • [ ] epstein_civil_violence — status: ?
  • [ ] wolf_sheep — status: ?

Progress

Status Count
✅ Working 1
❌ Broken 3
❓ Not tested yet 23

Environment

  • Mesa version: 3.5.0
  • Python: 3.13
  • OS: Ubuntu
  • venv: activated

Next steps

  • [ ] Finish testing all remaining examples
  • [ ] Update this checklist with results
  • [ ] Open individual fix PRs for each broken example

annapurna-gupta avatar Mar 08 '26 16:03 annapurna-gupta

Hi @annapurna-gupta, I'd like to help — I'll take caching_and_replay (Type A) and open a fix PR. I can also test a few of the untested examples if that's useful.

harshhh817 avatar Jul 03 '26 07:07 harshhh817

Hi @annapurna-gupta, I'd like to help — I'll take caching_and_replay (Type A) and open a fix PR. I can also test a few of the untested examples if that's useful.

Yes, of course! That would be great.

annapurna-gupta avatar Jul 25 '26 06:07 annapurna-gupta