Kyso's Jupyter renderer FAQ
This article lays out some important points to know about how Jupyter notebooks are rendered on Kyso.

Images in notebooks

We don't support image links with spaces in the name. So if you link an image in a markdown cell do it like this:
1
![alt text](image_name.png)
Copied!
and don't do it like this:
1
![alt text](image name.png)
Copied!

Notebook sizes

Try to keep them under 15mb (our limit is 25mb), and make sure you don't have massive lists saved in the notebook somewhere - it's generally not helpful to the reader, and you can keep such data in a separate file.

IPyWidgets

While interactive javascript plots like Plotly and Bokeh do work (as well as associated client side widgets). IPyWidgets wont work as they require a running kernel - which Kyso does not provide (yet!!).

Bokeh plots on Kyso reports

To make bokeh plots work inside Jupyter and render in Kyso, we will save the plot to a virtual html file and show it
1
from bokeh.plotting import figure, output_file, save
2
from IPython.display import IFrame
3
from IPython.core.display import display, HTML
4
import tempfile
5
6
def bokeh_show(plot):
7
tmp_output_filename = tempfile.NamedTemporaryFile(suffix='.html').name
8
output_file(tmp_output_filename)
9
save(plot)
10
11
f = open(tmp_output_filename, "r")
12
display(HTML(f.read()))
Copied!
Then we can use this function bokeh_show to show any plots we create
1
p = figure(title="Bokeh test", plot_width=300, plot_height=300)
2
p.circle([1, 2], [3, 4])
3
4
bokeh_show(p)
Copied!
Last modified 17d ago