tensorflow / model-analysis

Model analysis tools for TensorFlow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to view the visualization / dashboard on a machine without internet

Nithanaroy opened this issue · comments

System information

  • Have I written custom code (as opposed to using a stock example script
    provided in TensorFlow Model Analysis)
    : No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux
  • TensorFlow Model Analysis installed from (source or binary): Using pip install
  • TensorFlow Model Analysis version (use command below): 0.25.0
  • Python version: 3.7
  • Jupyter Notebook version: 1.0.0
  • Exact command to reproduce:
tfma.view.render_slicing_metrics(eval_result, slicing_spec=slices[0])

Describe the problem

I'm able to view the visualization on a machine with internet access. But when I run the command on our internal server it doesn't show the plot. The only difference I see between the machines is the availability of public network access. Can I make tfma work there? Thank you.

Attached the errors from browser's console log below

Source code / logs

manager-base.js:273 Could not instantiate widget
(anonymous) @ manager-base.js:273
(anonymous) @ manager-base.js:44
(anonymous) @ manager-base.js:25
a @ manager-base.js:17
Promise.then (async)
u @ manager-base.js:18
(anonymous) @ manager-base.js:19
A @ manager-base.js:15
t._make_model @ manager-base.js:257
(anonymous) @ manager-base.js:246
(anonymous) @ manager-base.js:44
(anonymous) @ manager-base.js:25
(anonymous) @ manager-base.js:19
A @ manager-base.js:15
t.new_model @ manager-base.js:232
t.handle_comm_open @ manager-base.js:144
L @ underscore.js:762
(anonymous) @ underscore.js:775
(anonymous) @ underscore.js:122
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:2
Kernel._handle_iopub_message @ kernel.js:1223
Kernel._finish_ws_message @ kernel.js:1015
(anonymous) @ kernel.js:1006
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:1006
i @ jquery.min.js:2
utils.js:119 Error: Could not create a model.
    at utils.js:119
(anonymous) @ utils.js:119
Promise.catch (async)
t.handle_comm_open @ manager-base.js:149
L @ underscore.js:762
(anonymous) @ underscore.js:775
(anonymous) @ underscore.js:122
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:2
Kernel._handle_iopub_message @ kernel.js:1223
Kernel._finish_ws_message @ kernel.js:1015
(anonymous) @ kernel.js:1006
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:1006
i @ jquery.min.js:2
kernel.js:1007 Couldn't process kernel message TypeError: Cannot read property 'SlicingMetricsModel' of undefined
    at manager.js:153
(anonymous) @ kernel.js:1007
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:1007
i @ jquery.min.js:2
kernel.js:1007 Couldn't process kernel message TypeError: Cannot read property 'SlicingMetricsModel' of undefined
    at manager.js:153
(anonymous) @ kernel.js:1007
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:1007
i @ jquery.min.js:2
kernel.js:1007 Couldn't process kernel message TypeError: Cannot read property 'SlicingMetricsModel' of undefined
    at manager.js:153
(anonymous) @ kernel.js:1007
Promise.catch (async)
Kernel._handle_ws_message @ kernel.js:1007
i @ jquery.min.js:2
manager.js:153 Uncaught (in promise) TypeError: Cannot read property 'SlicingMetricsModel' of undefined
    at manager.js:153
(anonymous) @ manager.js:153
Promise.then (async)
t.register_model @ manager-base.js:208
(anonymous) @ manager-base.js:248
(anonymous) @ manager-base.js:44
(anonymous) @ manager-base.js:25
(anonymous) @ manager-base.js:19
A @ manager-base.js:15
t.new_model @ manager-base.js:232
t.handle_comm_open @ manager-base.js:144
L @ underscore.js:762
(anonymous) @ underscore.js:775
(anonymous) @ underscore.js:122
(anonymous) @ comm.js:89
Promise.then (async)
CommManager.comm_open @ comm.js:85
i @ jquery.min.js:2
Kernel._handle_iopub_message @ kernel.js:1223
Kernel._finish_ws_message @ kernel.js:1015
(anonymous) @ kernel.js:1006
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:1006
i @ jquery.min.js:2
manager.js:153 Uncaught (in promise) TypeError: Cannot read property 'SlicingMetricsModel' of undefined
    at manager.js:153
(anonymous) @ manager.js:153
Promise.then (async)
(anonymous) @ extension.js:121
n.OutputArea.register_mime_type.safe @ extension.js:145
OutputArea.append_mime_type @ outputarea.js:696
OutputArea.append_display_data @ outputarea.js:659
OutputArea.append_output @ outputarea.js:346
OutputArea.handle_output @ outputarea.js:257
output @ codecell.js:395
Kernel._handle_output_message @ kernel.js:1196
i @ jquery.min.js:2
Kernel._handle_iopub_message @ kernel.js:1223
Kernel._finish_ws_message @ kernel.js:1015
(anonymous) @ kernel.js:1006
Promise.then (async)
Kernel._handle_ws_message @ kernel.js:1006
i @ jquery.min.js:2

Can you check if you have followed the below:
Install and enable the TFMA notebook extension with:

$ jupyter nbextension enable --py widgetsnbextension
$ jupyter nbextension install --py \
    --symlink tensorflow_model_analysis
$ jupyter nbextension enable --py tensorflow_model_analysis

Append the flag --sys_prefix to each of these commands if you are running them in a Python virtual environment. The widgetsnbextension, ipywidgets, and jupyter_nbextensions_configurator packages may also require installation or upgrading.

Hi Mikehem,
Thanks for your suggestions. Yes, I ran these commands while creating the docker image. The container showed the tfma dashboard when run locally on my laptop whereas doesn't work on internal kubernetes cluster where the pods dont have internet access. But today suddenly it started working on the remote machine as well. Not sure what changed!