From 3a0fe1331a29f97a65ddcf330bb3684f7f15e5ad Mon Sep 17 00:00:00 2001 From: ThomasBouche Date: Thu, 5 Jan 2023 18:16:16 +0100 Subject: [PATCH 1/4] bugfix when selet one sample in prediction picking --- shapash/webapp/smart_app.py | 35 ++- ...ial01-Shapash-Overview-Launch-WebApp.ipynb | 271 +++++++++++++++++- 2 files changed, 290 insertions(+), 16 deletions(-) diff --git a/shapash/webapp/smart_app.py b/shapash/webapp/smart_app.py index 5ce3cf15..4acb204e 100644 --- a/shapash/webapp/smart_app.py +++ b/shapash/webapp/smart_app.py @@ -1353,7 +1353,7 @@ def update_datatable(selected_data, {"name": '_predict_', "id": '_predict_'}] + \ [{"name": self.explainer.features_dict[i], "id": i} for i in self.explainer.x_init] elif ((ctx.triggered[0]['prop_id'] == 'prediction_picking.selectedData') and - (selected_data is not None)): + (selected_data is not None) and (len(selected_data) > 1)): row_ids = [] # If some data have been selected in prediction picking graph if selected_data is not None and len(selected_data) > 1: @@ -1368,8 +1368,12 @@ def update_datatable(selected_data, # If click on Apply filter elif ((ctx.triggered[0]['prop_id'] == 'apply_filter.n_clicks') | ( (ctx.triggered[0]['prop_id'] == 'prediction_picking.selectedData') and - (selected_data is None))): + ((selected_data is None))) | ( + (ctx.triggered[0]['prop_id'] == 'prediction_picking.selectedData') and + (selected_data is not None and len(selected_data) == 1 and selected_data['points'][0]['curveNumber'] > 0) + )): # get list of ID + # If some data have b feature_id = [id_feature[i]['index'] for i in range(len(id_feature))] str_id = [id_str_modality[i]['index'] for i in range(len(id_str_modality))] bool_id = [id_bool_modality[i]['index'] for i in range(len(id_bool_modality))] @@ -1538,7 +1542,11 @@ def update_feature_importance(label, # If click on a single point on prediction picking, do nothing elif ((ctx.triggered[0]['prop_id'] == 'prediction_picking.selectedData') and (selected_data is not None) and (len(selected_data) == 1)): - pass + # If there is some filters applied + if (len([d['_index_'] for d in data]) != len(self.list_index)): + selection = [d['_index_'] for d in data] + else: + selection = None # If we have dubble click on prediction picking to remove the selected subset elif ((ctx.triggered[0]['prop_id'] == 'prediction_picking.selectedData') and (selected_data is None)): @@ -1754,17 +1762,20 @@ def update_feature_selector(feature, # Zoom management to generate graph which have global axis if len(self.components['graph']['global_feature_importance'].figure['data']) == 1: self.subset = self.list_index - elif len(self.components['graph']['global_feature_importance'].figure['data']) == 2: - if feature['points'][0]['curveNumber'] == 0: - if selected_data is not None and len(selected_data) > 1: - row_ids = [] - for p in selected_data['points']: - row_ids.append(p['customdata']) - self.subset = row_ids + elif (len(self.components['graph']['global_feature_importance'].figure['data']) == 2): + if feature is not None: + if feature['points'][0]['curveNumber'] == 0: + if selected_data is not None and len(selected_data) > 1: + row_ids = [] + for p in selected_data['points']: + row_ids.append(p['customdata']) + self.subset = row_ids + else: + self.subset = [d['_index_'] for d in data] else: - self.subset = [d['_index_'] for d in data] + self.subset = self.list_index else: - self.subset = self.list_index + self.subset = [d['_index_'] for d in data] else: row_ids = [] if selected_data is not None and len(selected_data) > 1: diff --git a/tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb b/tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb index 2a99345d..629c49be 100644 --- a/tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb +++ b/tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb @@ -341,7 +341,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -386,7 +386,7 @@ "metadata": {}, "outputs": [], "source": [ - "regressor = LGBMRegressor(n_estimators=100).fit(Xtrain,ytrain)" + "regressor = LGBMRegressor(n_estimators=10).fit(Xtrain,ytrain)" ] }, { @@ -445,9 +445,272 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 12, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/78257d/shapash/shapash/webapp/smart_app.py:336: FutureWarning:\n", + "\n", + "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", + "\n", + "INFO:root:Your Shapash application run on http://slhdg002:8020/\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Dash is running on http://0.0.0.0:8020/\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:shapash.webapp.smart_app:Dash is running on http://0.0.0.0:8020/\n", + "\n", + "INFO:root:Use the method .kill() to down your app.\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + " * Serving Flask app 'shapash.webapp.smart_app' (lazy loading)\n", + " * Environment: production\n", + "\u001b[31m WARNING: This is a development server. Do not use it in a production deployment.\u001b[0m\n", + "\u001b[2m Use a production WSGI server instead.\u001b[0m\n", + " * Debug mode: off\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:werkzeug: * Running on all addresses (0.0.0.0)\n", + " WARNING: This is a development server. Do not use it in a production deployment.\n", + " * Running on http://127.0.0.1:8020\n", + " * Running on http://172.23.252.69:8020 (Press CTRL+C to quit)\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"GET / HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/material-icons.css?m=1638359269.1955516 HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/style.css?m=1660033480.3009381 HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/jquery.js?m=1638359269.1873672 HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/main.js?m=1638359269.1913173 HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"GET /_dash-dependencies HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"GET /_dash-layout HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dcc/async-dropdown.js HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dcc/async-graph.js HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dash_table/async-highlight.js HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dcc/async-plotlyjs.js HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dash_table/async-table.js HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dcc/async-slider.js HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/shapash-fond-fonce.png HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/settings.png HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/reload.png HTTP/1.1\u001b[0m\" 304 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", + "\n", + "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", + "\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:50] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:50] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:51] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:51] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:58] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:58] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", + "\n", + "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", + "\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:00] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "condition2\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", + "\n", + "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", + "\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:04] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:04] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:04] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:04] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "condition1\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", + "\n", + "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", + "\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:07] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:07] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "condition2\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:07] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:07] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", + "\n", + "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", + "\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:09] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:09] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:09] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:09] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "condition1\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", + "\n", + "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", + "\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:10] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:10] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:10] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "condition2\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:10] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:15] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:15] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:15] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:16] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:16] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:16] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:17] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:18] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:18] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:19] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:19] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:20] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:21] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", + "\n", + "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", + "\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:24] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:24] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:24] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "condition1\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:24] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:25] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:26] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:29] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", + "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:29] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" + ] + } + ], "source": [ "app = xpl.run_app(title_story='House Prices', port=8020)" ] From c0456b8b3972eb8d2b8b00731938047d262f587f Mon Sep 17 00:00:00 2001 From: ThomasBouche Date: Fri, 6 Jan 2023 13:36:35 +0100 Subject: [PATCH 2/4] revert change in notebook --- ...ial01-Shapash-Overview-Launch-WebApp.ipynb | 271 +----------------- 1 file changed, 4 insertions(+), 267 deletions(-) diff --git a/tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb b/tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb index 629c49be..2a99345d 100644 --- a/tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb +++ b/tutorial/tutorial01-Shapash-Overview-Launch-WebApp.ipynb @@ -341,7 +341,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -386,7 +386,7 @@ "metadata": {}, "outputs": [], "source": [ - "regressor = LGBMRegressor(n_estimators=10).fit(Xtrain,ytrain)" + "regressor = LGBMRegressor(n_estimators=100).fit(Xtrain,ytrain)" ] }, { @@ -445,272 +445,9 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/78257d/shapash/shapash/webapp/smart_app.py:336: FutureWarning:\n", - "\n", - "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", - "\n", - "INFO:root:Your Shapash application run on http://slhdg002:8020/\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Dash is running on http://0.0.0.0:8020/\n", - "\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:shapash.webapp.smart_app:Dash is running on http://0.0.0.0:8020/\n", - "\n", - "INFO:root:Use the method .kill() to down your app.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - " * Serving Flask app 'shapash.webapp.smart_app' (lazy loading)\n", - " * Environment: production\n", - "\u001b[31m WARNING: This is a development server. Do not use it in a production deployment.\u001b[0m\n", - "\u001b[2m Use a production WSGI server instead.\u001b[0m\n", - " * Debug mode: off\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:werkzeug: * Running on all addresses (0.0.0.0)\n", - " WARNING: This is a development server. Do not use it in a production deployment.\n", - " * Running on http://127.0.0.1:8020\n", - " * Running on http://172.23.252.69:8020 (Press CTRL+C to quit)\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"GET / HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/material-icons.css?m=1638359269.1955516 HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/style.css?m=1660033480.3009381 HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/jquery.js?m=1638359269.1873672 HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/main.js?m=1638359269.1913173 HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"GET /_dash-dependencies HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"GET /_dash-layout HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dcc/async-dropdown.js HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dcc/async-graph.js HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dash_table/async-highlight.js HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dcc/async-plotlyjs.js HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dash_table/async-table.js HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /_dash-component-suites/dash/dcc/async-slider.js HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/shapash-fond-fonce.png HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/settings.png HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"\u001b[36mGET /assets/reload.png HTTP/1.1\u001b[0m\" 304 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:47] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:48] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", - "\n", - "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", - "\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:49] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:50] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:50] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:51] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:51] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:57] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:58] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:12:58] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", - "\n", - "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", - "\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:00] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "condition2\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:01] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", - "\n", - "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", - "\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:04] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:04] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:04] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:04] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "condition1\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", - "\n", - "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", - "\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:07] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:07] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "condition2\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:07] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:07] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", - "\n", - "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", - "\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:09] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:09] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:09] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:09] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "condition1\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", - "\n", - "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", - "\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:10] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:10] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:10] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "condition2\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:10] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:15] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:15] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:15] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:16] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:16] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:16] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:17] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:18] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:18] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:19] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:19] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:20] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:21] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "/home/78257d/shapash/shapash/webapp/smart_app.py:1440: FutureWarning:\n", - "\n", - "Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.\n", - "\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:24] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:24] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:24] \"\u001b[35m\u001b[1mPOST /_dash-update-component HTTP/1.1\u001b[0m\" 204 -\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "condition1\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:24] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:25] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:26] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:29] \"POST /_dash-update-component HTTP/1.1\" 200 -\n", - "INFO:werkzeug:172.20.96.121 - - [05/Jan/2023 18:13:29] \"POST /_dash-update-component HTTP/1.1\" 200 -\n" - ] - } - ], + "outputs": [], "source": [ "app = xpl.run_app(title_story='House Prices', port=8020)" ] From 3e294de648414cb0a539721ae27fb3ba3feda218 Mon Sep 17 00:00:00 2001 From: ThomasBouche Date: Fri, 6 Jan 2023 13:55:13 +0100 Subject: [PATCH 3/4] delete useless comment --- shapash/webapp/smart_app.py | 1 - 1 file changed, 1 deletion(-) diff --git a/shapash/webapp/smart_app.py b/shapash/webapp/smart_app.py index 4acb204e..d88a53d6 100644 --- a/shapash/webapp/smart_app.py +++ b/shapash/webapp/smart_app.py @@ -1373,7 +1373,6 @@ def update_datatable(selected_data, (selected_data is not None and len(selected_data) == 1 and selected_data['points'][0]['curveNumber'] > 0) )): # get list of ID - # If some data have b feature_id = [id_feature[i]['index'] for i in range(len(id_feature))] str_id = [id_str_modality[i]['index'] for i in range(len(id_str_modality))] bool_id = [id_bool_modality[i]['index'] for i in range(len(id_bool_modality))] From be0c248edc5fbe972b23f6685722110893cbdedd Mon Sep 17 00:00:00 2001 From: ThomasBouche Date: Fri, 6 Jan 2023 17:05:28 +0100 Subject: [PATCH 4/4] hotfix bug for change Number of rows for subset in settings --- shapash/webapp/smart_app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/shapash/webapp/smart_app.py b/shapash/webapp/smart_app.py index d88a53d6..74aff525 100644 --- a/shapash/webapp/smart_app.py +++ b/shapash/webapp/smart_app.py @@ -1352,6 +1352,7 @@ def update_datatable(selected_data, {"name": '_index_', "id": '_index_'}, {"name": '_predict_', "id": '_predict_'}] + \ [{"name": self.explainer.features_dict[i], "id": i} for i in self.explainer.x_init] + df = self.round_dataframe elif ((ctx.triggered[0]['prop_id'] == 'prediction_picking.selectedData') and (selected_data is not None) and (len(selected_data) > 1)): row_ids = []