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

move solara_viz back to experimental #2278

Merged
merged 2 commits into from
Sep 4, 2024
Merged

Conversation

Corvince
Copy link
Contributor

@Corvince Corvince commented Sep 4, 2024

Move the current SolaraViz back into experimentals. This way users of Mesa 2.x that already adapted their frontend can continue to use it. But we will provide a different, stable API for Mesa 3 in #2263

Follow-up PRs should include a deprecation warning and link to a migration guide from the experimental SolaraViz to the new SolaraViz (to be written)

Copy link

github-actions bot commented Sep 4, 2024

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔴 +14.2% [+11.9%, +16.3%] 🔴 +21.8% [+21.6%, +21.9%]
BoltzmannWealth large 🔵 -3.7% [-22.3%, +14.6%] 🔴 +34.1% [+30.3%, +37.8%]
Schelling small 🔴 +16.5% [+16.1%, +16.9%] 🔴 +26.1% [+25.8%, +26.4%]
Schelling large 🔴 +16.8% [+16.0%, +17.6%] 🔴 +23.3% [+21.6%, +24.9%]
WolfSheep small 🔴 +16.6% [+15.5%, +17.6%] 🔴 +18.7% [+18.5%, +19.0%]
WolfSheep large 🔴 +17.9% [+17.5%, +18.3%] 🔴 +20.4% [+19.6%, +21.1%]
BoidFlockers small 🔴 +15.1% [+14.2%, +16.1%] 🔴 +7.8% [+7.0%, +8.5%]
BoidFlockers large 🔴 +13.9% [+13.0%, +14.8%] 🔴 +11.7% [+11.1%, +12.4%]

Copy link
Member

@EwoutH EwoutH left a comment

Choose a reason for hiding this comment

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

Right, I like this.

Warning can be added once new-new viz is semi-stable.

@EwoutH
Copy link
Member

EwoutH commented Sep 4, 2024

Maybe we can also revert it back to JupyterViz. And then we can simply revert projectmesa/mesa-examples#155.

Edit: There are a few more places where this needs to be changed, see:

@Corvince
Copy link
Contributor Author

Corvince commented Sep 4, 2024

SolaraViz and JupyterViz both work. But the examples need to be updated anyway, so not sure.

By the way I can take care of updating the examples. This way I get a better feeling on how the frontend is used and directly fix anything that's missing

@Corvince
Copy link
Contributor Author

Corvince commented Sep 4, 2024

@rht do you agree with this approach? Would like to have your approval before merging

@EwoutH EwoutH requested a review from rht September 4, 2024 10:53
@rht
Copy link
Contributor

rht commented Sep 4, 2024

I agree.

@Corvince Corvince merged commit cfa2635 into main Sep 4, 2024
4 of 10 checks passed
@EwoutH
Copy link
Member

EwoutH commented Sep 4, 2024

This PR did break the CI, unfortunately:

__________________ ERROR collecting tests/test_solara_viz.py ___________________
ImportError while importing test module '/home/runner/work/mesa/mesa/tests/test_solara_viz.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_solara_viz.py:8: in <module>
    from mesa.visualization.solara_viz import Slider, SolaraViz, UserInputs
E   ModuleNotFoundError: No module named 'mesa.visualization.solara_viz'

The test_solara_viz.py should be updated.

@EwoutH EwoutH added breaking Release notes label experimental Release notes label labels Sep 4, 2024
@quaquel quaquel deleted the solara_viz_back_to_experimental branch October 30, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Release notes label experimental Release notes label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants