-
Notifications
You must be signed in to change notification settings - Fork 928
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
Initialize Solara-based adv_tutorial #1726
Conversation
58e0993
to
4e75b8f
Compare
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main projectmesa/mesa#1726 +/- ##
=======================================
Coverage 79.96% 79.96%
=======================================
Files 18 18
Lines 1178 1178
Branches 220 220
=======================================
Hits 942 942
Misses 202 202
Partials 34 34 ☔ View full report in Codecov by Sentry. |
You can try at https://colab.research.google.com/github/rht/mesa/blob/adv_tutorial_experimental/docs/tutorials/adv_tutorial_experimental.ipynb. Currently, only the step button works fine. The play button doesn't properly update the grid and the timeseries. |
4e75b8f
to
6736108
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry was tracking this as ready to go and then saw the comment about the buttons.
It is looking good
-- same with the buttons step works, play, worked but jumped states and seems to render slow and be intermittent.
ac65075
to
35e7513
Compare
The Colab issue was fixed by projectmesa/mesa-examples#47. I have just added a tutorial to write your custom visualization object via Matplotlib. It's a histogram, just like the current advanced tutorial. It's only 6 lines of code (excluding comments). Compare this with ~35 LOC of JS (client-side) and ~15 LOC of Python (server-side). |
3dbc774
to
d0bf217
Compare
Of the current advanced tutorial. |
bd5d24c
to
fe5381d
Compare
I have moved the experimental tutorial to be hidden in the "more" part of the menu bar. This is not discoverable at all. One option is to have the experimental tutorial be the default, and the old version to be linked from it instead. |
fe5381d
to
9f7dc5d
Compare
I have updated so that the Solara-based advanced tutorial is the one that people will see first in the menu bar. One concern is that people will have to install from the Git repo of mesa-examples in order to install mesa-models. Should we move the Solara viz code to core Mesa? Though it's not a huge problem because it's just an extra |
9f7dc5d
to
2f22f13
Compare
2f22f13
to
24bdf62
Compare
Any objections with moving the Solara viz to core Mesa, @jackiekazil @Corvince ? |
No objections from my side, I think solara is the perfect fit for mesa. That said both solara and the current implementation of the JupyterViz class seems quite rough around there edges. So it should definitely stay under experimental, like currently done in mesa_examples. And thus communicate that it is not currently part of our public API and not subject to semver, since I think there will be quite some changes in the near future. The alternative to bringing this to mesa would again be a separate mesa_viz package. I don't know how big a dependency is in this regard. |
At this point, the many benefits of having it in core Mesa outweighs the fact that it may still be volatile. It is mainly to expose the viz to many people early on (and that it is convenient to install from @tpike3 is going to do an intro tutorial session at CSSSA. The choice is whether to have the tutorial code does An example feedback/feature request would be to add figure title to the chart output (#954), and the PR #955. It seems to be hard to debug. |
Yes i mean the idea has always been to have a mesa meta package. So pip install mesa would get you mesa-core, mesa-examples and mesa-viz. And only an advanced Installation procedure could only install mesa-core or any other mix. So I think from a (standard) user perspective it would be even simpler. But that would require some substantial restructuring so I agree nothing for the foreseeable future. But we could later move from mesa.experimental to mesa-viz. If we put this directly into mesa.visualization I am worried it will lead to some false sense of stability. |
Then I will add |
Done |
64e1449
to
0d18bb3
Compare
This is intended to go into 2.0 yes? |
This should go with 2.0 and this is the only one. However, @rht the build is failing it looks like Solara's the problem, with its use of pydantic as the problem It seems pydantic 2 had a breaking change What do you think? |
I have raised the issue on Solara Discord. Still waiting for their reply. |
fbc499d
to
6734647
Compare
The Solara Pydantic issue has been fixed in widgetti/solara#189, but there is another problem: |
937157a
to
af25509
Compare
c08139b
to
e7df413
Compare
@tpike3 this is ready to merge. |
Don't forget to update the v2.0 branch or this PR is not incorporated into the release. |
@rht V2.0 branch wasn't be updated. When I move to release,I am going to cut a new v2.0 branch from what is in main... for easy access. |
I am going to merge this. Looks good to me. Thank you @rht for your work on this. |
No description provided.