cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle <IPython.core.display.HTML object>

marsjuli
New Contributor II

Some libraries have intermediate IPython HTML-objects returned to the notebook cell output.

Since this happens during training a machine learning model the statements are typically buried within in the library so I cannot easily interfere. (e.g. in order overwrite the output statement to use the databricks function display() )

Is there - or will there be - an option to handle HTML-objects from IPython ?

Examplary versions:

DB-Runtime 10.0 ML (occurs in 8.X and 9.X as well)

ipython 7.22.0

ipython-genutils0.2.0

tqdm 4.59.0

mlflow 1.20.2

transformers 4.9.2

Example Output:

grafik.png

1 REPLY 1

marsjuli
New Contributor II

Hi @Kaniz Fatma​ ,

thanks for showing me the link. This helps if you are in control of the generated html-object. If the html-content comes from a library, that is where the problems start, because I cannot wrap displayHTML().

(I can of course look for that line and rebuild my own databricks-compatible version of the lib, but this would be improvisation, not solving the issue)

I am just worried that the number of python libraries will increase that use html-objects deep down. Surely there can be a way to capture this in the stack and handle it better than enforcing a call on another display method. I am sure this needs to be coordinated with the frontend developers of the databricks UI and the backend devs doing the Python-engine.

Is it possible to add such a configuration for a specific function of a library instead?

https://github.com/databrickslabs/jupyterlab-integration/blob/753882c37ead89013f302863d1548eef27e0ba...

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group