Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fairness-interpretability-dashboard-income-prediction.ipynb / from raiwidgets import ExplanationDashboard command --> TypeError: init() got an unexpected keyword argument 'unbound_message' #1972

Open
slsu0424 opened this issue Feb 15, 2023 · 2 comments

Comments

@slsu0424
Copy link

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:

  1. Go to Azure Machine Learning Service
  2. Click on Notebook
  3. Upload fairness-interpretability-dashboard-income-prediction.ipynb
  4. Run through notebook
  5. Scroll down to command 'from raiwidgets import ExplanationDashboard'
  6. 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
image

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 slsu0424 changed the title fairness-interpretability-dashboard-income-prediction.ipynb --> from raiwidgets import ExplanationDashboard returns error fairness-interpretability-dashboard-income-prediction.ipynb / from raiwidgets import ExplanationDashboard command --> TypeError: init() got an unexpected keyword argument 'unbound_message' Feb 15, 2023
@imatiach-msft
Copy link
Contributor

@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/

@ExOblivione
Copy link

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants