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

SolaraViz: visualization should update on parameter changes #2239

Closed
DrEntropy opened this issue Aug 22, 2024 · 6 comments · Fixed by #2240
Closed

SolaraViz: visualization should update on parameter changes #2239

DrEntropy opened this issue Aug 22, 2024 · 6 comments · Fixed by #2240

Comments

@DrEntropy
Copy link

DrEntropy commented Aug 22, 2024

This is on branch main (or 3.0.0a2 (2024-08-21))

Describe the bug
Currently, using SolaraViz, manipulating the controls to change model_params doesn't change seem to cause a redraw for the space_drawer. (Changing the seed, or advancing one step does redraw with the current parameters). This is most noticeable for network space models, for example virus_on__network. I also note that pressing reset redraws but not with the updated model parameters.

Expected Behavior
Ideally (perhaps optionally) the model parameters should be reactive. This way the user can experiment with the network structures in real time.

To Reproduce
Use main branch mesa-examples virus_on_network, run solara run app.py, note that model steps fine, however changing parameters has no visible effect until you press step or change the seed.

EDIT: Clarified what happens with the 'reset' button.

@rht
Copy link
Contributor

rht commented Aug 22, 2024

Sounds like a bug. It is supposed to be reactive to those changes.

@DrEntropy
Copy link
Author

I wasn't sure if it was working as intended or not ;) But looking at the code now I see that some care is taken to split off fixed vs dynamic variables so this is a bug indeed. I will edit the issue to reflect that.

@rht
Copy link
Contributor

rht commented Aug 22, 2024

pressing reset doesn't change seem to cause a redraw for the space_drawer.

Can't reproduce this one. Pressing reset does indeed reset the space drawn to its step 0 state, if you can confirm.
The problem seems to be the params not taking effect immediately but you have to either press step or play.

@DrEntropy
Copy link
Author

DrEntropy commented Aug 22, 2024

Correct , i only meant that i expected perhaps that pressing reset might cause the drawer to redraw with the current parameters. I should perhaps delete that distractor from the issue? EDIT: I clarified what I meant about the reset button.

@EwoutH
Copy link
Member

EwoutH commented Aug 25, 2024

Thanks for the detailed reports of those issues @DrEntropy!

Do you see any place where documentation about this part of the visualization stack could be improved (docstring, example models, tutorial)? And if so, would you like to improve any one of these?

@DrEntropy
Copy link
Author

@EwoutH There are some places (for example, demonstrating custom drawers), I will take a closer look and see if I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants