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

Simplify ModelController #2282

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Simplify ModelController #2282

merged 1 commit into from
Sep 6, 2024

Conversation

Corvince
Copy link
Contributor

@Corvince Corvince commented Sep 5, 2024

Not the most urgent of things to do, but I was in the mood to play around with this. Overall, should be much simpler now.

@Corvince Corvince force-pushed the solara-viz-model-contrroller branch from 6b0efe4 to 47e2721 Compare September 5, 2024 15:46
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.

I have no idea what any of this code does, but I always like simpler!

Copy link

github-actions bot commented Sep 5, 2024

Performance benchmarks:

Model Size Init time [95% CI] Run time [95% CI]
BoltzmannWealth small 🔵 -0.1% [-0.6%, +0.5%] 🔵 -0.0% [-0.1%, +0.1%]
BoltzmannWealth large 🔵 -1.4% [-2.3%, -0.5%] 🔵 -0.1% [-5.0%, +5.9%]
Schelling small 🔵 -1.1% [-1.4%, -0.9%] 🔵 -0.0% [-0.3%, +0.3%]
Schelling large 🔵 -1.7% [-2.7%, -0.6%] 🟢 -5.9% [-7.3%, -4.4%]
WolfSheep small 🔵 -1.0% [-2.4%, +0.4%] 🔵 -1.0% [-1.4%, -0.7%]
WolfSheep large 🔵 -3.1% [-4.2%, -2.0%] 🟢 -6.8% [-8.8%, -4.8%]
BoidFlockers small 🔵 +0.6% [-0.8%, +3.0%] 🔵 +0.5% [-0.5%, +1.4%]
BoidFlockers large 🔵 -1.1% [-3.3%, +0.4%] 🔵 +0.5% [-0.2%, +1.1%]

else:
playing.value = False

solara.use_thread(step, [playing.value])
Copy link
Contributor

Choose a reason for hiding this comment

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

Needs to test if this works on Google Colab.

@rht
Copy link
Contributor

rht commented Sep 5, 2024

It is indeed simpler, more readable, and hence can be extended by users if they need to fork the component. The only concern is if it works on Google Colab.

@EwoutH EwoutH added the enhancement Release notes label label Sep 5, 2024
@Corvince Corvince force-pushed the solara-viz-model-contrroller branch from 47e2721 to ad6c2b5 Compare September 6, 2024 07:58
@Corvince Corvince merged commit cd852c8 into main Sep 6, 2024
9 of 10 checks passed
@Corvince Corvince deleted the solara-viz-model-contrroller branch September 6, 2024 08:00
@Corvince
Copy link
Contributor Author

Corvince commented Sep 6, 2024

Confirmed that it works in Google Colab!

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

Successfully merging this pull request may close these issues.

3 participants