tfx icon indicating copy to clipboard operation
tfx copied to clipboard

statisticsgen visualization does not work in jupyter under container

Open IshootLaser opened this issue 4 years ago • 4 comments

Hello; I am running Chicago taxi TFX tutorial on a docker image I built. The image is based on jupyter/scipy-notebook:latest and I had installed packages with requirements.txt. When I run the cell `%%skip_for_export

context.show(statistics_gen.outputs['statistics'])` the output is simply a blank box like this: image Does this mean tfx statisticgen visualization is currently imcompatible with docker container? Are we only suppose to run it under windows or linux? Everything else runs fine in container though.

Thanks in advance, any help is appreciated.

requirements.txt

IshootLaser avatar Jun 01 '20 06:06 IshootLaser

some information: I ran it on google colab and things work fine. I ran it locally (no docker), visualization tool is blank. I rank it on different browsers, same problem. I connect docker jupyter server to visual studio code, same problem (localhost:8888/?token=) By mistake I connect to hostname:8888 and it works in vs code. Any thoughts?

IshootLaser avatar Jun 02 '20 02:06 IshootLaser

i am facing the same issue, but this happens irregularly when i run the same code. any ideas?

axelning avatar Mar 30 '21 03:03 axelning

@IshootLaser,

TFX StatisticsGen component writes the statistics protocol buffer in a TFRecord file. You can visualize the statistics in a Jupyter notebook as follows:

import tensorflow_data_validation as tfdv
train_stats = tfdv.generate_statistics_from_csv(data_location=TRAIN_DATA)
tfdv.visualize_statistics(train_stats)

You can refer documentation for more details. Thank you!

singhniraj08 avatar Sep 21 '22 16:09 singhniraj08

One thing to note is that the visualization works in Jupyter Notebooks, and IIUC it doesn't work so well in Jupyter Lab (although I think there is a workaround).

rcrowe-google avatar Sep 21 '22 19:09 rcrowe-google

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!

singhniraj08 avatar Nov 22 '22 16:11 singhniraj08

Are you satisfied with the resolution of your issue (Closed)? Yes No

google-ml-butler[bot] avatar Nov 22 '22 16:11 google-ml-butler[bot]