lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

Rendering is broken inside Databricks with DBR 11.x and higher - potential fix included

Open fwetdb opened this issue 3 years ago • 4 comments

Hello,

lets-plot used to work on Databricks with DBR 10.x (cluster version) and lower and we have customers who love and use it.

However, with DBR 11.x the auto-renderer breaks because it detects the wrong display type. To fix this, customers have to explicitly do LetsPlot.setup_html(isolated_frame=True) because isolated_frame is auto-detected to be False. IMO most likely as part of _detect_isolated_frame.

Databricks can be detected e.g. via "databricks" in str(os.environ) which might be added to https://github1s.com/JetBrains/lets-plot/blob/HEAD/python-package/lets_plot/frontend_context/_html_contexts.py#L68-L69 or similar.

What do you think?

fwetdb avatar Sep 20 '22 23:09 fwetdb

Sure, we can do it. But what about DBR 10.x and lower? Will this solution still be compatible with those versions?

alshan avatar Sep 21 '22 01:09 alshan

Great and thank you for quickly getting back @alshan ! It will be compatible because isolated_frame=True is always the right setting for Databricks - both below 10.x and above 11.x

fwetdb avatar Sep 21 '22 08:09 fwetdb

@fwetdb I've pushed your proposal to master : https://github.com/JetBrains/lets-plot/commit/429e19aa541719b562c3f143f1387850cccad2c2

Luckily we are expecting the next release in few days so the fix is coming really soon.

alshan avatar Sep 21 '22 16:09 alshan

That's great! The customers will really appreciate your fast fix around that!

fwetdb avatar Sep 21 '22 16:09 fwetdb

Hi @fwetdb , could you verify that the fix works? Lets-Plot v2.5.0 is out.

alshan avatar Sep 30 '22 16:09 alshan

Hi @alshan Thank you for the reach out and the fast release. I verified that the fix worked as intended.

fwetdb avatar Oct 03 '22 19:10 fwetdb