Closed ericvd-ucb closed 2 years ago
When I attempt to do this I get the following error before:
I am also getting the same error when I run the notebook!
Right. So none of us really get Julia nor FUND so can debug. But. My understanding is that part of the issue is not popping out an additional window to display things. They might need to program things on the Julia side to solve this it might have nothing to do with Jupyterhub.
@ericvd-ucb What I am trying to say is it's unclear from your bug description what steps need to be taken to reproduce this and what visual confirmation of the error actually looks like. Note that the error I've listed above occurs BEFORE running the step that would permit you to "explore the model"
You bug description seems to assume knowledge of how the notebook is supposed to work that your support personnel does not possess. Can you please describe in a bit more detail which step in the notebook fails and what I should see when it does?
In short the most useful bug descriptions provide (within reason) step by step instructions that reliably reproduce the error and a good description (or screen shot) of what the error you're receiving looks like. That information allows me to reproduce the error with a high a degree of certainty that what you're describing is what I'm seeing.
@ericvd-ucb Regarding:
If you are running this notebook on your local computer, you can explore the results of your model interactively:
if use_explore explore(m) end
It looks like the explore
function provided by the Mimi package wants to launch an electron window.
If I ignore the plot_comp_graph
issue that others ran into and run explore(m)
directly, I see:
/opt/julia/pkg/artifacts/8731693ea495ec92614ea8a5da62f8e66909f0c1/electron: error while loading shared libraries: libgobject-2.0.so.0: cannot open shared object file: No such file or directory
Since electron is a graphical desktop app, I can see why it'd work on a desktop computer but not within a non-desktop jupyter session. (the glib error also means that electron won't execute properly either) It'd be ideal if the explore
function had an option to render HTML within a notebook cell. At worst, if explore
was starting a web server then it could use jupyter-server-proxy to proxy it. This is what we did for a cogneuro connector ages ago which started up a local webgl service.
This is where jupyter could proxy the explorer web app: https://github.com/mimiframework/Mimi.jl/blob/master/src/explorer/explore.jl#L33 https://github.com/mimiframework/Mimi.jl/blob/master/src/explorer/explore.jl#L111
But the explore function would have to be altered significantly.
@ryanlovett thanks so much for your explanation, much appreciated, you rock
@felder apologies on my side for not being more clear or articulate. I had misdiagnosed what the blocker was
We actually already do this for EECS - they have some circuit diagramming stuff that pops up a window. We run a Linux desktop environment in there (see https://discourse.jupyter.org/t/run-linux-desktop-apps-in-mybinder-org-your-jupyterhub/11964?u=yuvipanda for a recent blog post on how that works). So you open the linux desktop environment in a tab (https://eecs.datahub.berkeley.edu/hub/user-redirect/desktop opens it), run your notebook on another tab, and when the window pops up, it shows up in the first tab!
We could try to enable this on the Julia hub. It isn't super complicated.
I got it to work now! Woohoo :D
How to test this:
src/2_HandsOnSession_RunningModels.ipynb
use_explore = false;
to use_explore = true;
if use_explore
explore(m)
end
This is pretty cool :D Try it out and let me know?
That's awesome!
It'd be cool if there could be an in-kernel, but kernel-agnostic, way of launching the desktop proxy to prep GUIs. I guess !desktop-proxy
or %desktop
wouldn't work outside of ipython kernel.
Thanks - this is cool! I hope @davidanthoff and @lrennels check this out!
@yuvipanda super cool stuff!
Closing this bug considering the amazing hack done by @yuvipanda!
Bug description
My understanding is that Jupyterhub as deployed cannot popup a new window from the session. There are profs from time to time who need this functionality becaused they use it on their local install.
I worked with a couple of folks on Getting JuliaHub set up to run the FUND model that David Anthoff uses for the Social Cost of Carbon models, and was hoping to make a Demo for Data 100.
In the end - they did not use a Julia hub demo because a key part of the workflow is to run the model and then go in to a model variable explorer mode, which pops out a different window. Which doesnt seem to work on our deployment. I am putting this issue here for us to think about how to work around this in the future? @yuvipanda
This issue is not urgent in any way, and my most sincere apologies if I am out of my depth and cannot get something simple to run because of my lack of knowledge
Environment & setup
Julia Hub
How to reproduce
[<!--
Then try to run Notebook 2 - Hands on session and you can't "explore the model"