diff --git a/explainerdashboard/custom.py b/explainerdashboard/custom.py index fe991ce..2196232 100644 --- a/explainerdashboard/custom.py +++ b/explainerdashboard/custom.py @@ -1,10 +1,7 @@ import dash -import dash_html_components as html -import dash_core_components as dcc -import dash_bootstrap_components as dbc - -from dash.dependencies import Input, Output, State +from dash import html, dcc, Input, Output, State from dash.exceptions import PreventUpdate +import dash_bootstrap_components as dbc from .dashboard_components import * from .dashboard_tabs import * diff --git a/explainerdashboard/dashboard_components/classifier_components.py b/explainerdashboard/dashboard_components/classifier_components.py index c79503b..f84a599 100644 --- a/explainerdashboard/dashboard_components/classifier_components.py +++ b/explainerdashboard/dashboard_components/classifier_components.py @@ -15,12 +15,10 @@ import pandas as pd import dash -import dash_core_components as dcc +from dash import html, dcc, Input, Output, State +from dash.exceptions import PreventUpdate import dash_bootstrap_components as dbc -import dash_html_components as html -from dash.dependencies import Input, Output, State -from dash.exceptions import PreventUpdate import plotly.graph_objs as go from ..dashboard_methods import * diff --git a/explainerdashboard/dashboard_components/composites.py b/explainerdashboard/dashboard_components/composites.py index 26eb67a..267d71a 100644 --- a/explainerdashboard/dashboard_components/composites.py +++ b/explainerdashboard/dashboard_components/composites.py @@ -12,7 +12,7 @@ ] import dash_bootstrap_components as dbc -import dash_html_components as html +from dash import html from ..explainers import RandomForestExplainer, XGBExplainer from ..dashboard_methods import * diff --git a/explainerdashboard/dashboard_components/connectors.py b/explainerdashboard/dashboard_components/connectors.py index e59e475..ef33181 100644 --- a/explainerdashboard/dashboard_components/connectors.py +++ b/explainerdashboard/dashboard_components/connectors.py @@ -8,12 +8,10 @@ import numpy as np -import dash_core_components as dcc -import dash_bootstrap_components as dbc -import dash_html_components as html - -from dash.dependencies import Input, Output, State +import dash +from dash import html, dcc, Input, Output, State from dash.exceptions import PreventUpdate +import dash_bootstrap_components as dbc from ..dashboard_methods import * diff --git a/explainerdashboard/dashboard_components/decisiontree_components.py b/explainerdashboard/dashboard_components/decisiontree_components.py index a9e968b..c77708c 100644 --- a/explainerdashboard/dashboard_components/decisiontree_components.py +++ b/explainerdashboard/dashboard_components/decisiontree_components.py @@ -5,13 +5,9 @@ ] import dash -import dash_core_components as dcc -import dash_bootstrap_components as dbc -import dash_html_components as html -import dash_table - -from dash.dependencies import Input, Output, State +from dash import html, dcc, Input, Output, State, dash_table from dash.exceptions import PreventUpdate +import dash_bootstrap_components as dbc from ..explainers import RandomForestExplainer, XGBExplainer from ..dashboard_methods import * diff --git a/explainerdashboard/dashboard_components/overview_components.py b/explainerdashboard/dashboard_components/overview_components.py index 7a0c467..81b7bf4 100644 --- a/explainerdashboard/dashboard_components/overview_components.py +++ b/explainerdashboard/dashboard_components/overview_components.py @@ -11,13 +11,9 @@ import pandas as pd import dash -import dash_core_components as dcc -import dash_bootstrap_components as dbc -import dash_html_components as html -import dash_table - -from dash.dependencies import Input, Output, State +from dash import html, dcc, Input, Output, State, dash_table from dash.exceptions import PreventUpdate +import dash_bootstrap_components as dbc from ..dashboard_methods import * from .. import to_html diff --git a/explainerdashboard/dashboard_components/regression_components.py b/explainerdashboard/dashboard_components/regression_components.py index c05c520..a4f7a96 100644 --- a/explainerdashboard/dashboard_components/regression_components.py +++ b/explainerdashboard/dashboard_components/regression_components.py @@ -11,12 +11,9 @@ import pandas as pd import dash -import dash_core_components as dcc -import dash_bootstrap_components as dbc -import dash_html_components as html - -from dash.dependencies import Input, Output, State +from dash import html, dcc, Input, Output, State from dash.exceptions import PreventUpdate +import dash_bootstrap_components as dbc from ..dashboard_methods import * from .. import to_html diff --git a/explainerdashboard/dashboard_components/shap_components.py b/explainerdashboard/dashboard_components/shap_components.py index 7697fc7..4e57268 100644 --- a/explainerdashboard/dashboard_components/shap_components.py +++ b/explainerdashboard/dashboard_components/shap_components.py @@ -8,12 +8,9 @@ 'ShapContributionsGraphComponent'] import dash -import dash_core_components as dcc -import dash_bootstrap_components as dbc -import dash_html_components as html - -from dash.dependencies import Input, Output, State +from dash import html, dcc, Input, Output, State from dash.exceptions import PreventUpdate +import dash_bootstrap_components as dbc from ..dashboard_methods import * from .. import to_html diff --git a/explainerdashboard/dashboard_methods.py b/explainerdashboard/dashboard_methods.py index 4e20b61..486ca69 100644 --- a/explainerdashboard/dashboard_methods.py +++ b/explainerdashboard/dashboard_methods.py @@ -28,10 +28,10 @@ import socket import dash -import dash_core_components as dcc +from dash import html, dcc, Input, Output, State +from dash.exceptions import PreventUpdate + import dash_bootstrap_components as dbc -import dash_html_components as html -from dash.dependencies import Input, Output, State from . import to_html diff --git a/explainerdashboard/dashboard_tabs.py b/explainerdashboard/dashboard_tabs.py index b0a6fc3..6aaf511 100644 --- a/explainerdashboard/dashboard_tabs.py +++ b/explainerdashboard/dashboard_tabs.py @@ -8,7 +8,7 @@ 'DecisionTreesTab', ] -import dash_html_components as html +from dash import html from .dashboard_components import * diff --git a/explainerdashboard/dashboards.py b/explainerdashboard/dashboards.py index eb51645..d89255b 100644 --- a/explainerdashboard/dashboards.py +++ b/explainerdashboard/dashboards.py @@ -21,13 +21,10 @@ import oyaml as yaml import dash -import dash_auth -import dash_core_components as dcc -import dash_html_components as html -import dash_bootstrap_components as dbc - -from dash.dependencies import Input, Output, State +from dash import html, dcc, Input, Output, State from dash.exceptions import PreventUpdate +import dash_bootstrap_components as dbc +import dash_auth from flask import Flask, request, redirect from flask_simplelogin import SimpleLogin, login_required diff --git a/requirements.txt b/requirements.txt index 5d6e7c4..ef2fdac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -dash +dash>=2 dash-bootstrap-components dash-auth jupyter_dash diff --git a/setup.py b/setup.py index 54f07d1..8dee8f9 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='explainerdashboard', - version='0.3.7', + version='0.3.8', description='Quickly build Explainable AI dashboards that show the inner workings of so-called "blackbox" machine learning models.', long_description=""" @@ -68,7 +68,7 @@ "Intended Audience :: Developers", "Intended Audience :: Education", "Topic :: Scientific/Engineering :: Artificial Intelligence"], - install_requires=['dash>=1.20', 'dash-bootstrap-components<1', 'jupyter_dash', 'dash-auth', + install_requires=['dash>=2', 'dash-bootstrap-components<1', 'jupyter_dash', 'dash-auth', 'dtreeviz>=1.3', 'numpy', 'pandas>=1.1', 'scikit-learn', 'shap>=0.37', 'joblib', 'oyaml', 'click', 'waitress', 'flask_simplelogin', 'orjson'],