responsible-ai-toolbox
responsible-ai-toolbox copied to clipboard
fairness-interpretability-dashboard-income-prediction.ipynb / from raiwidgets import ExplanationDashboard command --> TypeError: init() got an unexpected keyword argument 'unbound_message'
Describe the bug When running the fairness-interpretability-dashboard-income-prediction.ipynb notebook, the command:
from raiwidgets import ExplanationDashboard
returns the following error: TypeError: init() got an unexpected keyword argument 'unbound_message'
To Reproduce Steps to reproduce the behavior:
- Go to Azure Machine Learning Service
- Click on Notebook
- Upload fairness-interpretability-dashboard-income-prediction.ipynb
- Run through notebook
- Scroll down to command 'from raiwidgets import ExplanationDashboard'
- See error
Stack trace
TypeError Traceback (most recent call last) Cell In [13], line 1 ----> 1 from raiwidgets import ExplanationDashboard
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/raiwidgets/init.py:7 4 """Package for the fairness, explanation, and error analysis widgets.""" 6 from .version import version ----> 7 from .error_analysis_dashboard import ErrorAnalysisDashboard 8 from .explanation_dashboard import ExplanationDashboard 9 from .fairness_dashboard import FairnessDashboard
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/raiwidgets/error_analysis_dashboard.py:6 1 # Copyright (c) Microsoft Corporation 2 # Licensed under the MIT License. 4 """Defines the ErrorAnalysis dashboard class.""" ----> 6 from flask import jsonify, request 8 from .constants import ModelTask 9 from .dashboard import Dashboard
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/flask/init.py:4 1 from markupsafe import escape 2 from markupsafe import Markup ----> 4 from . import json as json 5 from .app import Flask as Flask 6 from .app import Request as Request
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/flask/json/init.py:8 4 import typing as t 6 from jinja2.utils import htmlsafe_json_dumps as _jinja_htmlsafe_dumps ----> 8 from ..globals import current_app 9 from .provider import _default 11 if t.TYPE_CHECKING: # pragma: no cover
File /anaconda/envs/azureml_py38/lib/python3.8/site-packages/flask/globals.py:56 54 _cv_app: ContextVar["AppContext"] = ContextVar("flask.app_ctx") 55 __app_ctx_stack = _FakeStack("app", _cv_app) ---> 56 app_ctx: "AppContext" = LocalProxy( # type: ignore[assignment] 57 _cv_app, unbound_message=_no_app_msg 58 ) 59 current_app: "Flask" = LocalProxy( # type: ignore[assignment] 60 _cv_app, "app", unbound_message=_no_app_msg 61 ) 62 g: "_AppCtxGlobals" = LocalProxy( # type: ignore[assignment] 63 _cv_app, "g", unbound_message=_no_app_msg 64 )
TypeError: init() got an unexpected keyword argument 'unbound_message'
Expected behavior This command should execute without error.
Screenshots
Desktop (please complete the following information):
- OS: Windows 10
- Browser: Chrome
- Python version: Python 3.8 - AzureML
- raiwidgets and responsibleai package versions: 0.24.1, 0.24.1
@slsu0424 can you please try upgrading your version of flask in your environment:
pip install --upgrade flask
It looks like the error is coming from flask package. What is your flask package version? The latest is 2.2.3:
https://pypi.org/project/Flask/
@slsu0424 can you please try upgrading your version of flask in your environment:
pip install --upgrade flask
It looks like the error is coming from flask package. What is your flask package version? The latest is 2.2.3: https://pypi.org/project/Flask/
Thank you, that solved the issue for me!