-
Notifications
You must be signed in to change notification settings - Fork 505
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
Make use of JupyterLab mimetype renderers #1249
Make use of JupyterLab mimetype renderers #1249
Conversation
TODO:
|
Panel seems to work with this PR. Though the app is not updating when clicking on buttons (unlike in JupyterLab). I suspect panel uses the Friendly ping @philippjfr, is that right that panel uses |
We do not use update_display, instead our Jupyter(Lab) extension lets us access a comm. As an alternative you can try wrapping the Panel app in |
I suppose that doesn't really help you test out the render mime situation. I can take a look at what the problems on that side of things are when I get back from vacation. |
So if comm works, bokey should work? Could you give us some pointers to the code where this is done? |
I got bokeh to work in Voila using this PR: bokeh.webmThe issue was that I was not serving Voila at the right port (bokeh expected me to serve on @philippjfr I wonder if this UX could be improved using only kernel comms instead of custom web sockets? |
Sorry I've been traveling for several weeks now. Just to summarize the current approaches for working with Bokeh/Panel interactively in notebooks:
|
Thanks for the comment!
So, if I understand correctly, the |
I wonder if that's the server parsing all json, and encoding it again (that should improve due to @davidbrochart work on jupyter server I guess). My guess is that in situation 1 you just have a WebSocket, and skip a few layers in ipykernel/jupyter_server. |
Yup, that sounds right. Also happy to take a look. |
Really nice! 👍 |
This might need adding the corresponding lab extensions to the app. Some additional observations after a quick check on the UI tests failures:
|
9bb1bbc
to
bc7cbfe
Compare
c4e0f4d
to
ad56c95
Compare
dc7b1b2
to
b833abd
Compare
b833abd
to
71a1612
Compare
Benchmark reportThe execution time (in milliseconds) are grouped by test file, test type and browser. Results table
❗ Test metadata have changed--- /dev/fd/63 2023-03-22 15:31:29.037327991 +0000
+++ /dev/fd/62 2023-03-22 15:31:29.041327999 +0000
@@ -4,49 +4,49 @@
"BENCHMARK_REFERENCE": "actual"
},
"browsers": {
- "chromium": "97.0.4666.0"
+ "chromium": "94.0.4595.0"
},
"systemInformation": {
"cpu": {
- "brand": "Xeon® Platinum 8370C",
+ "brand": "Xeon® E5-2673 v3",
"cache": {
- "l1d": 98304,
+ "l1d": 65536,
"l1i": 65536,
- "l2": 2097152,
- "l3": 50331648
+ "l2": 524288,
+ "l3": 31457280
},
"cores": 2,
"family": "6",
- "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear",
+ "flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear",
"governor": "",
"manufacturer": "Intel®",
- "model": "106",
+ "model": "63",
"physicalCores": 2,
"processors": 1,
"revision": "",
"socket": "",
- "speed": 2.8,
+ "speed": 2.4,
"speedMax": null,
"speedMin": null,
- "stepping": "6",
+ "stepping": "2",
"vendor": "GenuineIntel",
"virtualization": false,
"voltage": ""
},
"mem": {
- "total": 7281278976
+ "total": 7291699200
},
"osInfo": {
"arch": "x64",
"build": "",
- "codename": "Jammy Jellyfish",
+ "codename": "Focal Fossa",
"codepage": "UTF-8",
"distro": "Ubuntu",
- "kernel": "5.15.0-1034-azure",
+ "kernel": "5.8.0-1040-azure",
"logofile": "ubuntu",
"platform": "linux",
- "release": "22.04.2 LTS",
- "serial": "2eb8d65c617f413abe6f4d67d8f306ea",
+ "release": "20.04.3 LTS",
+ "serial": "cfc067bfcb844f35865e279a1b0e66c5",
"servicepack": "",
"uefi": false
} |
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.
Nice thanks @martinRenou changes look good!
Trying to test the PR on Binder gives the following error:
Not sure it's related to this change though.
9cff19c
to
e603da1
Compare
pre-commit.ci run |
We were pulling ipykernel as part of the ipywidgets dependency...
Thanks @martinRenou |
Nice, thanks! |
Code changes
This PR changes the logic for rendering cell outputs, it switches from relying on
nbconvert
for handling different mimetypes to relying onJupyterLab
.The PR also has the benefit of removing the custom Widget Manager from Voila! It will load the
@jupyter-widgets/controls
package just as any other widget extension.User-facing changes
This adds support for many custom JupyterLab renderers:
jupyterlab-fasta
,vega
,jupyterlab-geojson
.Backwards-incompatible changes
This might break some assumptions in the template, as it's overwriting the
data_priority
block in thenbconvert
template.