Skip to content

docs: document DiskStore executor limitations - #4067

Merged
quaquel merged 2 commits into
mesa:mainfrom
atul-upadhyay-7:docs-diskstore-thread-executor
Nov 12, 2026
Merged

quaquel merged 2 commits into
mesa:mainfrom
atul-upadhyay-7:docs-diskstore-thread-executor

Conversation

@atul-upadhyay-7

Copy link
Copy Markdown
Contributor

Pre-PR Checklist

  • This PR fixes missing documentation, not a new feature or enhancement.

Summary

Document the executor restriction for DiskStore where people choose how to run a sweep.

Bug / Issue

Fixes #4066

A ThreadPoolExecutor with DiskStore can silently lose output rows even when every run reports SUCCEEDED. The restriction was only described inside disk_writer.py. This follows @quaquel's suggestion to document it rather than change runtime behavior.

Implementation

  • Add the warning to the run_scenarios executor parameter and DiskStore class docstring.
  • Include DiskStore in the experimental API docs.
  • Add the same note to the batch_run migration section.

The docs point to ProcessPoolExecutor or sequential execution instead.

Testing

  • 137 scenario tests passed on each of three runs.
  • All applicable pre-commit checks passed, including Vale.
  • Three HTML docs builds completed with notebook execution disabled. Each had the same 198 existing warnings as unchanged main, with no new diagnostics.
  • Checked the rendered API and migration pages. Both pages have no broken local fragment links.

Additional Notes

Docs only. This does not make DiskStore thread-safe or add a runtime guard.

@github-actions github-actions Bot added docs Release notes label experimental Release notes label labels Nov 10, 2026
@atul-upadhyay-7

Copy link
Copy Markdown
Contributor Author

pre-commit.ci run

@github-actions

Copy link
Copy Markdown

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 -3.0% [-4.4%, -1.7%] 🔴 +3.7% [+3.5%, +4.0%]
BoltzmannWealth large 🔵 +1.3% [+0.4%, +2.3%] 🔵 +2.0% [-2.1%, +6.1%]
Schelling small 🔵 -0.3% [-1.4%, +0.8%] 🔵 +2.5% [+1.6%, +3.6%]
Schelling large 🔵 +1.3% [+0.0%, +2.6%] 🔵 +4.1% [-1.5%, +10.1%]
WolfSheep small 🔴 +5.0% [+3.8%, +6.1%] 🔵 +1.5% [-2.5%, +5.8%]
WolfSheep large 🔵 +1.3% [-0.6%, +3.2%] 🔵 -1.3% [-4.4%, +1.6%]
SugarscapeG1mt small 🔵 +2.5% [+1.3%, +3.7%] 🔵 +0.2% [-1.7%, +2.2%]
SugarscapeG1mt large 🔵 +3.3% [+2.0%, +4.9%] 🔵 -1.7% [-4.1%, +0.9%]
BoidFlockers small 🔵 +3.3% [+1.6%, +5.0%] 🔵 +0.2% [-0.5%, +0.8%]
BoidFlockers large 🔵 +3.6% [+2.2%, +4.8%] 🔵 +1.1% [+0.6%, +1.4%]
MultiLevelAllianceModel small 🔵 +4.7% [+2.5%, +6.7%] 🔵 +1.9% [+1.4%, +2.5%]
MultiLevelAllianceModel large 🔵 -0.9% [-4.1%, +2.3%] 🔵 +4.3% [+2.7%, +6.0%]

@atul-upadhyay-7

Copy link
Copy Markdown
Contributor Author

@quaquel the docs-only pr is ready for review. the warning is in run_scenarios, DiskStore and the migration guide, and DiskStore is now in the api docs. all checks have finished, including benchmarks. could you take a look?
1-live-mesa-diskstore
2-live-mesa-runner
3-live-mesa-migration

@quaquel
quaquel merged commit de44ab7 into mesa:main Nov 12, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Release notes label experimental Release notes label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run_scenarios with ThreadPoolExecutor + DiskStore silently drops rows

2 participants