Fix BankReserves crash and deprecation warnings#319
Fix BankReserves crash and deprecation warnings#319Rishabh-77 wants to merge 1 commit intomesa:mainfrom
Conversation
Implement ThreadSafeDataCollector to prevent race condition crashes in Solara visualization. Update agent_portrayal to use AgentPortrayalStyle, fixing deprecation warnings. Adjust default model parameters to match UI slider defaults.
| **kwargs, | ||
| ): | ||
| super().__init__() | ||
| super().__init__(seed=seed, rng=rng) |
There was a problem hiding this comment.
This is fixed with #317, but is should be just rng, seed is deprecated.
|
Thanks @Rishabh-77~ Your solution highlights some issues with this example that I think has an easier fix. I think the actual issue is that As for the threading, for visualization race condition Solara has a threads option which is captured in mesa as a check box, but it is not turned on by default. However, you can enable it with adding If you want you want update the Thank you again for the PR! |
Fix Bank Reserves Crash and Deprecation Warnings
Description
This PR addresses several critical issues in the
bank_reservesexample to ensure it is GSoC-ready and follows modern Mesa standards.Fixes
ThreadSafeDataCollectorinmodel.pyto preventValueErrorduring Solara visualization updates (Fixes crash "ugly browser error box").agent_portrayalinapp.pyto returnAgentPortrayalStyleobjects instead of dictionaries.BankReservesModeldefault parameters withSolaraVizslider defaults to prevent initial state mismatch (the "two dots" bug).__init__to acceptrngandkwargs, fixingbatch_run.pyfailures.Related Issue
Fixes #318