I created some Kotlin Notebooks on AWS (Sagemaker)...
# datascience
p
I created some Kotlin Notebooks on AWS (Sagemaker) and noticed that if the output of a cell is HTML, there is some bug. Seems that instead of only the generated HTML snippet, the whole page is included the output. This only happens in Jupyter-Lab mode and not classic (which makes sense since only Jupyter-Lab mode actually includes snippets). Anyone else seeing this issue?
a
It is not an issue, it is how Jupyter works. In Classic mode all outputs are stand-alone pages that are embedded in the parent page via iframe. In Lab mode outputs are just plain HTML. So if the output is configured to work with Jupyter classic it will give strange results in Lab mode. Sadly, you can't solve this problem on the notebook engine level, so you need to somehow implement both regimes in the visualization plugin and provide a way for the plugin to know, which mode is used. In Plotly, I just have a manual flag that turns on classic mode.
j
Is there any example of using Kotlin notebooks in Sagemaker? I’d be very interested
r
@Peter yeah , it would be awesome if you could share your Kotlin/Sagemaker experience with the community!
p
@JCollardBovy @roman.belov just posted my findings on #datascience
@altavir Did some more investigation this weekend and got my code working using plain HTML snippets in both Classic and Lab. So no need to differentiate since Classic also supports HTML Snippets (aka non-isolated mode). When I have some time, will write-up my findings.
a
It would be nice. I had a lot of problems with loading external JS bundles in Classic because I have to load them in each cell.