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

ExplainerHub fails to add dashboard via add_dashboard endpoint #269

Open
gamis opened this issue Jun 8, 2023 · 0 comments
Open

ExplainerHub fails to add dashboard via add_dashboard endpoint #269

gamis opened this issue Jun 8, 2023 · 0 comments

Comments

@gamis
Copy link

gamis commented Jun 8, 2023

Hi! Great library you have here, really enjoying it.

I'm trying to set up ExplainerHub with the add_dashboard_route, and it's not working. "ERROR: Failed to add dashboard!". If I print the traceback leading to that error, I get the trace below.

Any ideas?

Details

import explainerdashboard
db1 = explainerdashboard.ExplainerDashboard.from_config('ll_fce10_proc_20200227_100455_l1.yaml')
explainerdashboard.ExplainerHub([db1], add_dashboard_route=True).run(debug=False)

Starts up fine, I can load db1 fine, but when I got to add a second db via http://127.0.0.1:8050/add_dashboard/ll_fce10_proc_20200117_105803_l1.yaml, I get

traceback (most recent call last):
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\explainerdashboard\dashboards.py", line 2572, in add_dashboard
    dashboard_name = self.add_dashboard(
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\explainerdashboard\dashboards.py", line 1629, in add_dashboard
    ExplainerDashboard.from_config(
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\explainerdashboard\dashboards.py", line 943, in from_config
    return cls(explainer, tabs, **dashboard_params, **kwargs)
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\explainerdashboard\dashboards.py", line 687, in __init__
    self.app = self._get_dash_app()
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\explainerdashboard\dashboards.py", line 1180, in _get_dash_app
    app = dash.Dash(
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\dash\dash.py", line 504, in __init__
    self.init_app()
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\dash\dash.py", line 529, in init_app
    self.server.register_blueprint(
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\flask\scaffold.py", line 49, in wrapper_func
    self._check_setup_finished(f_name)
  File "G:\Temp\venvs\calciumexpansion_3_9_12\lib\site-packages\flask\app.py", line 722, in _check_setup_finished
    raise AssertionError(
AssertionError: The setup method 'register_blueprint' can no longer be called on the application. It has already handled its first request, any changes will not be applied consistently.
Make sure all imports, decorators, functions, etc. needed to set up the application are done before running it.

The second board yaml is

dashboard:
  explainerfile: ll_fce10_proc_20200117_105803_l1.dill
  params:
    title: Model Explainer
    name: null
    description: "This dashboard shows the workings of a fitted\n            machine\
      \ learning model, and explains its predictions."
    simple: false
    hide_header: false
    header_hide_title: false
    header_hide_selector: false
    header_hide_download: false
    hide_poweredby: false
    block_selector_callbacks: false
    pos_label: null
    fluid: true
    mode: dash
    width: 1000
    height: 800
    bootstrap: null
    external_stylesheets: null
    url_base_pathname: null
    routes_pathname_prefix: null
    requests_pathname_prefix: null
    responsive: true
    logins: null
    port: 8050
    importances: true
    model_summary: true
    contributions: true
    whatif: true
    shap_dependence: true
    shap_interaction: true
    decision_trees: true
    kwargs: {}
    tabs: null
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

1 participant