tfx
tfx copied to clipboard
TensorFlow-extended: no interactive HTML results generated on databricks
Hi, I am trying to run the TensorFlow-extended example code https://www.tensorflow.org/tfx/tutorials/tfx/components_keras
on databricks with env:
7.1 ML Spark 3.0.0 Scala 2.12 GPU
tfx==0.22.0
TensorFlow version: 2.2.0
py: 3.7
Unbuntu: 4.4.0
When I run
context.show(statistics_gen.outputs['statistics'])
I got:
<IPython.core.display.HTML object>
<IPython.core.display.HTML object>
<IPython.core.display.HTML object>
<IPython.core.display.HTML object>
<IPython.core.display.HTML object>
I can run
html="""
<html lang="en">
<head>
<b>'hello'</b>
</head>
"""
displayHTML(html)
and got the exptected HTML.
How to get them for the example TFX code ? I have tried IPython.core.display and import html, but it does not work.
thanks
@umusa , Can you please confirm if this issue is similar to #2194. Thanks!
They are different. For this issue, it is interactive HTML results. For #2194, it is a static HTML without any interactive components.
We run the code on AWS/EC2 through databricks.
@umusa,
You can try using get_statistics_html that generates the HTML objects and calling those instead of the visualize functions. Then, visualize those functions with the DataBricks displayHTML function.
Hope this helps. Thank you!
Example code below:
from tensorflow_data_validation.utils.display_util import get_statistics_html
displayHTML(get_statistics_html(train_stats))
Closing this due to inactivity. Please take a look into the answers provided above, feel free to reopen and post your comments(if you still have queries on this). Thank you!