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
Interactively explore Models using ipywidgets #2061
Conversation
This pull request modifies make ci_requirements and commit the changed files to ensure that CI runs with the updateded dependencies. |
Works nicely for me! The auto-update was a bit too slow to follow my inputs but maybe that's just my slow computer. For time-dependent models with inputs: Would it be reasonable to have a textbox for the input function and then an |
When playing around with the
Apart from that, this looks quite nice. @lbalicki The auto update was fast enough for me, I guess it really depends on how fast your computer can solve the underlying problem. |
Yes. That's also the reason why I disabled it by default.
That should be easily possible. @pmli, would you agree that this is a good approach? |
I very quickly get into the same issue (just making 2-3 changes is enough).
That sounds like a good idea to me. |
This pull request modifies make ci_requirements and commit the changed files to ensure that CI runs with the updated dependencies. |
This pull request modifies make ci_requirements and commit the changed files to ensure that CI runs with the updated dependencies. |
I think this is now feature complete. I tried to improve the layout, but if some css expert wants to take a look, I'd be happy ... However, there is only so much we can do due to matplotlib/ipympl#297 @pymor/all, please take another look, how this works for you. (I'm not sure what I can do regarding the tornado issues ...) |
pre-commit.ci autofix |
and add return_widget parameter to PatchVisualizer
This pull request modifies make ci_requirements and commit the changed files to ensure that CI runs with the updated dependencies. |
The issue seems to be that Changing the |
I see. I am wondering: Has this ever occurred before? Or could this actually be due to some stability issue on the runner? The Windows/macos runners do not seem to be super reliable in general. I will restart the build a few times and see what happens. |
Ok, so the issue is non-deterministic ... |
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.
It works well with Jupyter Lab (I need to resize the window for the plots to show up, but maybe that's only my issue). Time-dependent parameters also work nicely.
That's strange. You get this issue on k3d without my fix that should enter the next release. However, the k3d backend should only be used when the yet-to-be-released version is detected. Can you confirm that you get the k3d visualization? |
How do I do that? I think it doesn't work if I uninstall k3d, because reading the defaults file will fail. |
Eh, which defaults file? Are you using the one with which the docs are built? Then what you see is not surprising, as for the docs built k3d is enforced. You should just run the notebook without any specific defaults. |
Yes.
Ok, that way, matplotlib is used. Is it ok if the online docs shows a k3d plot? |
Fine.
Well, I'd actually prefer if no output is shown there at all as the interface won't work anyway. Somehow the |
Aha, ok. It seems that a blank line is necessary between cell options and the code (I pushed the change). |
This pull request modifies make ci_requirements and commit the changed files to ensure that CI runs with the updated dependencies. |
This is extremely nice work! |
This PR adds an
interact(model, parameter_space)
method topymor.models.interact
which, in a jupyter environment, sets up a gui to interactively visualize aModel
's solution and/or output based on the given parameters.Further, the matplotlib-based visualizer is extended to be able to return an interactive widget instead of a static display of the solution.