microsoft / responsible-ai-toolbox

Responsible AI Toolbox is a suite of tools providing model and data exploration and assessment user interfaces and libraries that enable a better understanding of AI systems. These interfaces and libraries empower developers and stakeholders of AI systems to develop and monitor AI more responsibly, and take better data-driven actions.
https://responsibleaitoolbox.ai/
MIT License
1.4k stars 368 forks source link

Tree Visualisation not working #2547

Open Arnold2381 opened 8 months ago

Arnold2381 commented 8 months ago

Describe the bug Hi, I am running the error analysis notebook in the examples, when i am running the notebook on Google colab i am getting the tree visualisation, and when i am storing the response from the local host server, and displaying it on google colab, using Ipython, it displays the tree visualisation

import requests
response = requests.get('http://localhost:8704')
from IPython.display import display, HTML
display(HTML(response.text))

Now the issue is, when i store the response in a html file, and open it in browser i am not getting the tree visualisation and getting the data exploration UI as it is, there are some errors which i am seeing on dev console of the browser

response_error_global_dummy (2).html:17 

       Uncaught (in promise) TypeError: Failed to fetch
    at Q (response_error_global_dummy (2).html:17:3744176)
    at Object.i [as requestImportances] (response_error_global_dummy (2).html:17:4214354)
    at new iu (response_error_global_dummy (2).html:17:4196435)
    at ha (response_error_global_dummy (2).html:17:12289645)
    at Fo (response_error_global_dummy (2).html:17:12308996)
    at Rs (response_error_global_dummy (2).html:17:12352816)
    at bl (response_error_global_dummy (2).html:17:12338855)
    at vl (response_error_global_dummy (2).html:17:12338783)
    at gl (response_error_global_dummy (2).html:17:12338646)
    at ll (response_error_global_dummy (2).html:17:12335641)
response_error_global_dummy (2).html:17 

       Uncaught (in promise) TypeError: Failed to fetch
    at Q (response_error_global_dummy (2).html:17:3744176)
    at Object.n [as getTreeNodes] (response_error_global_dummy (2).html:17:4214298)
    at yl.fetchTreeNodes (response_error_global_dummy (2).html:17:4131985)
    at yl.componentDidMount (response_error_global_dummy (2).html:17:4119894)
    at ls (response_error_global_dummy (2).html:17:12325902)
    at wl (response_error_global_dummy (2).html:17:12343150)
    at t.unstable_runWithPriority (response_error_global_dummy (2).html:17:665926)
    at Ni (response_error_global_dummy (2).html:17:12284938)
    at _l (response_error_global_dummy (2).html:17:12339747)
    at ll (response_error_global_dummy (2).html:17:12335866)

Also i am running the same notebook on AWS Sagemaker notebook, and the tree visualisation is not working but other features of Dashboard is working

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Stack trace If applicable, please add the sdk stack trace for the error.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

To get the package versions please run in your command line:

pip show raiwidgets
pip show responsibleai
Name: raiwidgets
Version: 0.34.1
Summary: Interactive visualizations to assess fairness, explain models, generate counterfactual examples, analyze causal effects and analyze errors in Machine Learning models.
Home-page: https://github.com/microsoft/responsible-ai-toolbox
Author: Roman Lutz, Ilya Matiach, Ke Xu
Author-email: [raiwidgets-maintain@microsoft.com](mailto:raiwidgets-maintain@microsoft.com)
License: 
Location: /usr/local/lib/python3.10/dist-packages
Requires: erroranalysis, fairlearn, itsdangerous, lightgbm, numpy, pandas, rai-core-flask, raiutils, responsibleai, scikit-learn, scipy
Required-by: 
Name: responsibleai
Version: 0.34.1
Summary: SDK API to explain models, generate counterfactual examples, analyze causal effects and analyze errors in Machine Learning models.
Home-page: https://github.com/microsoft/responsible-ai-toolbox
Author: Roman Lutz, Ilya Matiach, Ke Xu
Author-email: [raiwidgets-maintain@microsoft.com](mailto:raiwidgets-maintain@microsoft.com)
License: 
Location: /usr/local/lib/python3.10/dist-packages
Requires: dice-ml, econml, erroranalysis, interpret-community, ipykernel, jsonschema, lightgbm, markupsafe, ml-wrappers, networkx, numba, numpy, pandas, raiutils, scikit-learn, scipy, semver, statsmodels
Required-by: raiwidgets

Additional context Add any other context about the problem here.

Arnold2381 commented 8 months ago

Seems like a similar issue, where the customer was not able to see the dashboard https://github.com/microsoft/responsible-ai-toolbox/issues/375

Arnold2381 commented 8 months ago

Update here: I have moved to an EC2 isntance and this has worked. But i would still like to know why its not working in jupyer notebooks.

Arnold2381 commented 8 months ago

Also i have a large dataset like around 20 million rows, in this case i would need error analysis to work on distributed instances, something like pyspark? is there a workaround for this?