You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started working on #2427 and have run into three issues:
If the model takes one or more arguments and those arguments are not part of the user-controllable parameters that are set from the UI, stuff will crash immediately
Strangely, it crashes immediately even though we started SolaraViz with a valid model instance, so this points to a second bug: at the moment, the model shown after starting the UI is not the same as the original model with which the UI was initialized. Again, this is easy to reproduce. In the boltzman wealth model, in app.py, start the model with say a width and height of 20. Next, start Solara, and in the GUI, you'll see that the actual model has reverted back to 10 by 10 (as specified in model_params).
Seed is currently handled differently from other parameters. With model: Move random seed and random to __init__ #1940 merged, this is no longer needed, and seed can just be integrated into the user-specifiable parameters.
The text was updated successfully, but these errors were encountered:
Yes from looking at the code I can confirm these bugs. If user-setable parameters are provided the ModelCreator is set up and initializes a new model. This should not happen initially. But this raises the question how to work with models that need parameters, but those are not provided. Should reset just be disabled or should we create a helpful error message?
We should add to the docs that it is recommended to only use keyword argument in Model.__ini__
We should have an informative error. It might even be possible to use reflection to check the signature of the __init__ and raise the exception immediately. I would advocate against aligning inputs from the UI with the order of arguments in the __init__: when in doubt refuse the temptation to guess.
I started working on #2427 and have run into three issues:
model_params
).The text was updated successfully, but these errors were encountered: