I'm not getting tfma.view.render_plot to render plots with:

tfma.view.render_plot(result) or tfma.view.render_time_series

note that tfma.view.render_slicing_metrics does work..

I suspect it's related to this 404... I'm getting the following error in jupyter notebook stdout log:

[W 20:42:09.329 NotebookApp] 404 GET /static/tensorflow_model-analysis.js?v=20201030203829 (192.168.112.1) 14.49ms referer=http://localhost:18888/notebooks/analysis.ipynb

this is running in a docker image from python:3.7-slim-buster (debian)

jupyter commands:

        /usr/local/airflow/.local/bin/jupyter nbextension enable --py widgetsnbextension --sys-prefix
        /usr/local/airflow/.local/bin/jupyter nbextension install --py --symlink tensorflow_model_analysis --sys-prefix
        /usr/local/airflow/.local/bin/jupyter nbextension enable --py tensorflow_model_analysis --sys-prefix
        /usr/local/airflow/.local/bin/jupyter nbextension install --py --symlink witwidget --sys-prefix
        /usr/local/airflow/.local/bin/jupyter nbextension enable witwidget --py  --sys-prefix

        /usr/local/airflow/.local/bin/jupyter nbextensions_configurator enable --user

        /usr/local/airflow/.local/bin/jupyter notebook --ip=0.0.0.0 --notebook-dir=/usr/local/airflow/dags --port=18888 

versions are:

cat requirements.txt | grep tensor

tensorboard==2.1.1
tensorflow-data-validation==0.21.5
tensorflow-estimator==1.15.1
tensorflow-metadata==0.21.1
tensorflow-model-analysis==0.21.5
#tensorflow-model-analysis==0.22.0
tensorflow-serving-api==2.1.0
tensorflow-transform==0.21.2
tensorflow-gpu==2.1.0
tensorflow-serving-api==2.1.0
tensorflow-datasets==3.1.0
tensorflow-hub==0.9.0

I tried tfma version 0.22.0 and had the same result, all else being equal.

Here are my nbextensions:

airflow@8158874d751e:~$ jupyter nbextension list --debug
Searching ['/usr/local/airflow', '/usr/local/airflow/.jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
Looking for jupyter_config in /etc/jupyter
Looking for jupyter_config in /usr/local/etc/jupyter
Looking for jupyter_config in /usr/local/airflow/.jupyter
Looking for jupyter_config in /usr/local/airflow
Looking for jupyter nbextension list_config in /etc/jupyter
Looking for jupyter nbextension list_config in /usr/local/etc/jupyter
Looking for jupyter nbextension list_config in /usr/local/airflow/.jupyter
Looking for jupyter nbextension list_config in /usr/local/airflow
Known nbextensions:
Paths used for configuration of common: 
        /usr/local/airflow/.jupyter/nbconfig/common.json
Paths used for configuration of notebook: 
        /usr/local/airflow/.jupyter/nbconfig/notebook.json
Paths used for configuration of tree: 
        /usr/local/airflow/.jupyter/nbconfig/tree.json
Paths used for configuration of edit: 
        /usr/local/airflow/.jupyter/nbconfig/edit.json
Paths used for configuration of terminal: 
        /usr/local/airflow/.jupyter/nbconfig/terminal.json
Paths used for configuration of common: 
        /usr/local/etc/jupyter/nbconfig/common.json
Paths used for configuration of notebook: 
        /usr/local/etc/jupyter/nbconfig/notebook.json
  config dir: /usr/local/etc/jupyter/nbconfig
    notebook section
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
      tensorflow_model_analysis/extension  enabled 
      - Validating: OK
      wit-widget/extension  enabled 
      - Validating: OK
Paths used for configuration of tree: 
        /usr/local/etc/jupyter/nbconfig/tree.json
Paths used for configuration of edit: 
        /usr/local/etc/jupyter/nbconfig/edit.json
Paths used for configuration of terminal: 
        /usr/local/etc/jupyter/nbconfig/terminal.json
Paths used for configuration of common: 
        /etc/jupyter/nbconfig/common.json
Paths used for configuration of notebook: 
        /etc/jupyter/nbconfig/notebook.json
Paths used for configuration of tree: 
        /etc/jupyter/nbconfig/tree.json
Paths used for configuration of edit: 
        /etc/jupyter/nbconfig/edit.json
Paths used for configuration of terminal: 
        /etc/jupyter/nbconfig/terminal.json

i've found that if i wait long enough, the jupyter cell will return the following ressponse when running tfma.render_plot:

PlotViewer(config={'sliceName': 'Overall', 'metricKeys': {'calibrationPlot': {'metricName': 'calibrationHistog…

I'm happy to provide more info if needed. Many Thanks.

0

There are 0 best solutions below