Skip to content

Fix Solara Altair dependency updates#3244

Merged
tpike3 merged 6 commits intomesa:mainfrom
falloficarus22:solara-altair-deps
Feb 8, 2026
Merged

Fix Solara Altair dependency updates#3244
tpike3 merged 6 commits intomesa:mainfrom
falloficarus22:solara-altair-deps

Conversation

@falloficarus22
Copy link
Copy Markdown
Contributor

@falloficarus22 falloficarus22 commented Feb 5, 2026

Summary

Refactors dependency handling in SpaceRendererComponent so viz_dependencies is initialized once and shared across backends.

Bug / Issue

viz_dependencies was built inside the Matplotlib branch only. This made dependency handling backend-specific and inconsistent in SpaceRendererComponent.
This PR keeps behavior unchanged while moving dependency setup to a common location.

Implementation

  • Moved:
    • viz_dependencies = [update_counter.value]
    • if dependencies: viz_dependencies.extend(dependencies)
  • This now runs before backend branching and is used by Matplotlib exactly as before.
  • No Altair rendering logic changes.

Testing

test_solara_viz.py

Additional Notes

Closes #3243

@falloficarus22 falloficarus22 marked this pull request as draft February 5, 2026 15:00
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 5, 2026

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🟢 -5.4% [-6.6%, -4.1%] 🔵 +0.4% [+0.0%, +0.8%]
BoltzmannWealth large 🔵 -1.6% [-2.7%, -0.5%] 🔵 +0.3% [-2.0%, +3.0%]
Schelling small 🔵 -1.2% [-1.6%, -0.8%] 🔵 -0.9% [-1.0%, -0.7%]
Schelling large 🔵 -1.1% [-1.8%, -0.4%] 🔵 -2.3% [-5.1%, +0.0%]
WolfSheep small 🟢 -5.8% [-6.4%, -5.2%] 🔵 +0.9% [+0.7%, +1.1%]
WolfSheep large 🔵 -1.2% [-2.0%, -0.4%] 🔵 -0.5% [-1.8%, +1.1%]
BoidFlockers small 🔵 -0.6% [-1.4%, +0.2%] 🔵 -0.9% [-1.1%, -0.8%]
BoidFlockers large 🔵 +1.0% [+0.5%, +1.6%] 🔵 -1.2% [-1.6%, -0.8%]

@falloficarus22 falloficarus22 marked this pull request as ready for review February 5, 2026 15:21
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 5, 2026

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 -2.4% [-3.3%, -1.5%] 🔵 -0.2% [-0.4%, -0.0%]
BoltzmannWealth large 🔵 -0.9% [-1.5%, -0.2%] 🔵 -0.1% [-1.7%, +1.0%]
Schelling small 🔵 -0.2% [-0.5%, +0.2%] 🔵 +0.6% [+0.5%, +0.8%]
Schelling large 🔵 +0.8% [+0.2%, +1.6%] 🔵 +3.6% [+2.4%, +4.8%]
WolfSheep small 🔵 -1.2% [-1.6%, -0.8%] 🔵 +0.1% [-0.1%, +0.4%]
WolfSheep large 🔵 -0.2% [-1.5%, +1.2%] 🔵 +1.5% [-0.1%, +2.9%]
BoidFlockers small 🔵 +1.3% [+0.6%, +2.0%] 🔵 -0.6% [-0.8%, -0.5%]
BoidFlockers large 🔴 +3.4% [+3.1%, +3.7%] 🔵 -0.8% [-1.0%, -0.6%]

@EwoutH EwoutH requested a review from Sahil-Chhoker February 6, 2026 15:24
@Sahil-Chhoker
Copy link
Copy Markdown
Collaborator

I do see the issue, but except this all the changes are unnecessary and out of the scope of this PR:

viz_dependencies = [update_counter.value]
if dependencies:
    viz_dependencies.extend(dependencies)

Please remove the unnecessary changes so we can move forward.

@falloficarus22
Copy link
Copy Markdown
Contributor Author

@Sahil-Chhoker can you take a look now?

Copy link
Copy Markdown
Collaborator

@Sahil-Chhoker Sahil-Chhoker left a comment

Choose a reason for hiding this comment

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

LGTM!

@tpike3 tpike3 merged commit ede1d53 into mesa:main Feb 8, 2026
14 checks passed
@falloficarus22 falloficarus22 deleted the solara-altair-deps branch February 8, 2026 13:28
@EwoutH EwoutH added bug Release notes label visualisation labels Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Release notes label visualisation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Altair SolaraViz ignores dependencies / update_counter, causing stale renders

4 participants