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
altavir
09/02/2022, 9:41 AM
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
JCollardBovy
09/03/2022, 4:44 PM
Is there any example of using Kotlin notebooks in Sagemaker?
I’d be very interested
r
roman.belov
09/03/2022, 7:34 PM
@Peter yeah , it would be awesome if you could share your Kotlin/Sagemaker experience with the community!
p
Peter
09/05/2022, 7:45 AM
@JCollardBovy@roman.belov just posted my findings on #datascience
Peter
09/05/2022, 8:39 AM
@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
altavir
09/05/2022, 9:38 AM
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.