{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "GEM Hackathon 2021: OrangeSUM - Gender bias filter.ipynb", "provenance": [], "collapsed_sections": [ "d86DXrMMd1_X", "AZHffzbAfii2", "0tPppU_HfrkS", "XVYUdoj2f7xW" ] }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" }, "widgets": { "application/vnd.jupyter.widget-state+json": { "bedbf1536d4e4e85b0c931ff74464ff1": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_view_name": "HBoxView", "_dom_classes": [], "_model_name": "HBoxModel", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.5.0", "box_style": "", "layout": "IPY_MODEL_ea1152c90bc74b96995908ab99d37de2", "_model_module": "@jupyter-widgets/controls", "children": [ "IPY_MODEL_d019150c3a7544ea8f2b4a2975b7de4f", "IPY_MODEL_b7fabd3352154751842babcbc1abdc9b" ] } }, "ea1152c90bc74b96995908ab99d37de2": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "d019150c3a7544ea8f2b4a2975b7de4f": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_2aee30c176ae439388068eb9053eee6b", "_dom_classes": [], "description": "Downloading: 100%", "_model_name": "FloatProgressModel", "bar_style": "success", "max": 1845699, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 1845699, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_be586adc287c421eb14cc1c7dab5e01b" } }, "b7fabd3352154751842babcbc1abdc9b": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_view_name": "HTMLView", "style": "IPY_MODEL_aa53b5014f594396a18a59a3e4985021", "_dom_classes": [], "description": "", "_model_name": "HTMLModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": " 1.85M/1.85M [00:00<00:00, 3.91MB/s]", "_view_count": null, "_view_module_version": "1.5.0", "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_2a4af772127a45d7bec9a942da2ea3ce" } }, "2aee30c176ae439388068eb9053eee6b": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "ProgressStyleModel", "description_width": "initial", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "bar_color": null, "_model_module": "@jupyter-widgets/controls" } }, "be586adc287c421eb14cc1c7dab5e01b": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "aa53b5014f594396a18a59a3e4985021": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "2a4af772127a45d7bec9a942da2ea3ce": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "c35b4cd861aa4b70815e1b16a472aa39": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_view_name": "HBoxView", "_dom_classes": [], "_model_name": "HBoxModel", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.5.0", "box_style": "", "layout": "IPY_MODEL_41f1507827954bd6a7f66365d39b2bfe", "_model_module": "@jupyter-widgets/controls", "children": [ "IPY_MODEL_aeccfb8c054640b9a59dec2ec8b422ed", "IPY_MODEL_dbdb324190a74acdb92a5e10b10d2389" ] } }, "41f1507827954bd6a7f66365d39b2bfe": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "aeccfb8c054640b9a59dec2ec8b422ed": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_fd83d349730345eaaa26705783fa7e37", "_dom_classes": [], "description": "Downloading: 100%", "_model_name": "FloatProgressModel", "bar_style": "success", "max": 87818, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 87818, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_cadd355bc1ca4d4d9f6927d1b49d371f" } }, "dbdb324190a74acdb92a5e10b10d2389": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_view_name": "HTMLView", "style": "IPY_MODEL_83878c010e1e4e71bab25cf35e4fb642", "_dom_classes": [], "description": "", "_model_name": "HTMLModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": " 87.8k/87.8k [00:00<00:00, 482kB/s]", "_view_count": null, "_view_module_version": "1.5.0", "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_947aaa604751411f98fb5195704619a6" } }, "fd83d349730345eaaa26705783fa7e37": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "ProgressStyleModel", "description_width": "initial", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "bar_color": null, "_model_module": "@jupyter-widgets/controls" } }, "cadd355bc1ca4d4d9f6927d1b49d371f": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "83878c010e1e4e71bab25cf35e4fb642": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "947aaa604751411f98fb5195704619a6": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "9133bff7fec248d5b2b3511f3d437ea7": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_view_name": "HBoxView", "_dom_classes": [], "_model_name": "HBoxModel", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.5.0", "box_style": "", "layout": "IPY_MODEL_696b7beb5fb14606999abf73c30160ae", "_model_module": "@jupyter-widgets/controls", "children": [ "IPY_MODEL_db6df59984de4b899b0d4be3f6ebc4ea", "IPY_MODEL_ffa846c31d544bd493ea1212748eef04" ] } }, "696b7beb5fb14606999abf73c30160ae": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "db6df59984de4b899b0d4be3f6ebc4ea": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_08daceaab1474996a0dc3afa0426f303", "_dom_classes": [], "description": "", "_model_name": "FloatProgressModel", "bar_style": "info", "max": 1, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 1, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_d6a006b9b2b34815ab2f589b4412bb51" } }, "ffa846c31d544bd493ea1212748eef04": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_view_name": "HTMLView", "style": "IPY_MODEL_ee74c668023b484baff60c8097e6bb21", "_dom_classes": [], "description": "", "_model_name": "HTMLModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": "67389 examples [00:04, 15006.02 examples/s]", "_view_count": null, "_view_module_version": "1.5.0", "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_da48a5a2a0f74df3ac062a78095a5fae" } }, "08daceaab1474996a0dc3afa0426f303": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "ProgressStyleModel", "description_width": "initial", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "bar_color": null, "_model_module": "@jupyter-widgets/controls" } }, "d6a006b9b2b34815ab2f589b4412bb51": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": "20px", "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "ee74c668023b484baff60c8097e6bb21": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "da48a5a2a0f74df3ac062a78095a5fae": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "32395c8bc58f4e54ba110e8db71a05aa": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_view_name": "HBoxView", "_dom_classes": [], "_model_name": "HBoxModel", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.5.0", "box_style": "", "layout": "IPY_MODEL_ae0b41faf92143eebb09b3a3131ef377", "_model_module": "@jupyter-widgets/controls", "children": [ "IPY_MODEL_b0efc5fd7a864e0b87f7cc97de58456e", "IPY_MODEL_4cae08c8e8b74bc7bbfb730a146b048d" ] } }, "ae0b41faf92143eebb09b3a3131ef377": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "b0efc5fd7a864e0b87f7cc97de58456e": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_1a8470958272425d9564d0365b943929", "_dom_classes": [], "description": "", "_model_name": "FloatProgressModel", "bar_style": "info", "max": 1, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 1, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_9685fdfee2ec4d67819791f7ddfd3101" } }, "4cae08c8e8b74bc7bbfb730a146b048d": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_view_name": "HTMLView", "style": "IPY_MODEL_4737188cb3a546969dc449a06f6b4be0", "_dom_classes": [], "description": "", "_model_name": "HTMLModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": "993 examples [00:00, 5027.43 examples/s]", "_view_count": null, "_view_module_version": "1.5.0", "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_2f008252e4844fd3a9460ca1492ab294" } }, "1a8470958272425d9564d0365b943929": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "ProgressStyleModel", "description_width": "initial", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "bar_color": null, "_model_module": "@jupyter-widgets/controls" } }, "9685fdfee2ec4d67819791f7ddfd3101": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": "20px", "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "4737188cb3a546969dc449a06f6b4be0": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "2f008252e4844fd3a9460ca1492ab294": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "b45f5712711543fc9272a09f70af15b1": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_view_name": "HBoxView", "_dom_classes": [], "_model_name": "HBoxModel", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.5.0", "box_style": "", "layout": "IPY_MODEL_359d5d1277884d34a12c0c4fa6d6f4b8", "_model_module": "@jupyter-widgets/controls", "children": [ "IPY_MODEL_3c23ea5798554bcbafb1e3be7e48829b", "IPY_MODEL_c1755e4640d744279c1db0847320f176" ] } }, "359d5d1277884d34a12c0c4fa6d6f4b8": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "3c23ea5798554bcbafb1e3be7e48829b": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_6017acbe82fb49db9a2cc28694ce18ac", "_dom_classes": [], "description": "", "_model_name": "FloatProgressModel", "bar_style": "info", "max": 1, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 1, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_342ee125045a4d34a37cf201b4a84b58" } }, "c1755e4640d744279c1db0847320f176": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_view_name": "HTMLView", "style": "IPY_MODEL_0d6a8299682549a7bc041d1210c6cbc4", "_dom_classes": [], "description": "", "_model_name": "HTMLModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": "1497 examples [00:00, 5867.35 examples/s]", "_view_count": null, "_view_module_version": "1.5.0", "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_56b3c7d433444820973e7a16466d6a50" } }, "6017acbe82fb49db9a2cc28694ce18ac": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "ProgressStyleModel", "description_width": "initial", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "bar_color": null, "_model_module": "@jupyter-widgets/controls" } }, "342ee125045a4d34a37cf201b4a84b58": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": "20px", "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "0d6a8299682549a7bc041d1210c6cbc4": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "56b3c7d433444820973e7a16466d6a50": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "d73b42fc86dc40edbca2a1bef6d839d4": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_view_name": "HBoxView", "_dom_classes": [], "_model_name": "HBoxModel", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.5.0", "box_style": "", "layout": "IPY_MODEL_4d97d5718ed646afa4a6e57dcc9ce820", "_model_module": "@jupyter-widgets/controls", "children": [ "IPY_MODEL_859096bacddd4bd7ab8bd26676a26ad1", "IPY_MODEL_ee582e249d9f4ac88bd12e99d9837dbc" ] } }, "4d97d5718ed646afa4a6e57dcc9ce820": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "859096bacddd4bd7ab8bd26676a26ad1": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_c1791af094cc472eb4b39f8775c15caf", "_dom_classes": [], "description": "", "_model_name": "FloatProgressModel", "bar_style": "info", "max": 1, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 1, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_fb6979db4c2b4d8196689d0d55c6c425" } }, "ee582e249d9f4ac88bd12e99d9837dbc": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_view_name": "HTMLView", "style": "IPY_MODEL_5e17016bfd8a43e8bb48015c7df3835f", "_dom_classes": [], "description": "", "_model_name": "HTMLModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": "500 examples [00:00, 4248.58 examples/s]", "_view_count": null, "_view_module_version": "1.5.0", "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_6f01cdc017314c4fb84d9857eb8a0144" } }, "c1791af094cc472eb4b39f8775c15caf": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "ProgressStyleModel", "description_width": "initial", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "bar_color": null, "_model_module": "@jupyter-widgets/controls" } }, "fb6979db4c2b4d8196689d0d55c6c425": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": "20px", "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "5e17016bfd8a43e8bb48015c7df3835f": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "6f01cdc017314c4fb84d9857eb8a0144": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "7beb7909e25140789e4bde255b69f859": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_view_name": "HBoxView", "_dom_classes": [], "_model_name": "HBoxModel", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.5.0", "box_style": "", "layout": "IPY_MODEL_e40741b3ec434614b6326f02e4532960", "_model_module": "@jupyter-widgets/controls", "children": [ "IPY_MODEL_6ba26205dc1f45ada489fc33e6c4b7dc", "IPY_MODEL_9985f0beff2841d4bbaac04b075c105c" ] } }, "e40741b3ec434614b6326f02e4532960": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "6ba26205dc1f45ada489fc33e6c4b7dc": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_45adaf3e96eb4a61800e9b1d2d1f0d36", "_dom_classes": [], "description": "", "_model_name": "FloatProgressModel", "bar_style": "info", "max": 1, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 1, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_ee50abf4c5f44b50885c04b06583731f" } }, "9985f0beff2841d4bbaac04b075c105c": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_view_name": "HTMLView", "style": "IPY_MODEL_419d6c6494dd4d73b9e66ffbfbdc7dd2", "_dom_classes": [], "description": "", "_model_name": "HTMLModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": "500 examples [00:00, 4386.84 examples/s]", "_view_count": null, "_view_module_version": "1.5.0", "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_21a21b8ef1b04c5ca8b8fe9866ec539c" } }, "45adaf3e96eb4a61800e9b1d2d1f0d36": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "ProgressStyleModel", "description_width": "initial", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "bar_color": null, "_model_module": "@jupyter-widgets/controls" } }, "ee50abf4c5f44b50885c04b06583731f": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": "20px", "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "419d6c6494dd4d73b9e66ffbfbdc7dd2": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "21a21b8ef1b04c5ca8b8fe9866ec539c": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "b38c0aac5d2943648592a859b19eede5": { "model_module": "@jupyter-widgets/controls", "model_name": "HBoxModel", "model_module_version": "1.5.0", "state": { "_view_name": "HBoxView", "_dom_classes": [], "_model_name": "HBoxModel", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.5.0", "box_style": "", "layout": "IPY_MODEL_f8e9e785809c4c9abc0ca2fcb8a7cfda", "_model_module": "@jupyter-widgets/controls", "children": [ "IPY_MODEL_16edba7fef104965a0a40a23758c4565", "IPY_MODEL_593da850d94c480a9e9cb1406302b87e" ] } }, "f8e9e785809c4c9abc0ca2fcb8a7cfda": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "16edba7fef104965a0a40a23758c4565": { "model_module": "@jupyter-widgets/controls", "model_name": "FloatProgressModel", "model_module_version": "1.5.0", "state": { "_view_name": "ProgressView", "style": "IPY_MODEL_c848fbf2cc914afe9b3a824b2eba55c2", "_dom_classes": [], "description": "", "_model_name": "FloatProgressModel", "bar_style": "info", "max": 1, "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": 1, "_view_count": null, "_view_module_version": "1.5.0", "orientation": "horizontal", "min": 0, "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_3a17ff56afb14c48871de3535b8f8576" } }, "593da850d94c480a9e9cb1406302b87e": { "model_module": "@jupyter-widgets/controls", "model_name": "HTMLModel", "model_module_version": "1.5.0", "state": { "_view_name": "HTMLView", "style": "IPY_MODEL_a90c1f26d6c94526b36b90d91b9675b3", "_dom_classes": [], "description": "", "_model_name": "HTMLModel", "placeholder": "​", "_view_module": "@jupyter-widgets/controls", "_model_module_version": "1.5.0", "value": "500 examples [00:00, 4958.43 examples/s]", "_view_count": null, "_view_module_version": "1.5.0", "description_tooltip": null, "_model_module": "@jupyter-widgets/controls", "layout": "IPY_MODEL_51049eb4022d4ca496d2a642214cc735" } }, "c848fbf2cc914afe9b3a824b2eba55c2": { "model_module": "@jupyter-widgets/controls", "model_name": "ProgressStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "ProgressStyleModel", "description_width": "initial", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "bar_color": null, "_model_module": "@jupyter-widgets/controls" } }, "3a17ff56afb14c48871de3535b8f8576": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": "20px", "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } }, "a90c1f26d6c94526b36b90d91b9675b3": { "model_module": "@jupyter-widgets/controls", "model_name": "DescriptionStyleModel", "model_module_version": "1.5.0", "state": { "_view_name": "StyleView", "_model_name": "DescriptionStyleModel", "description_width": "", "_view_module": "@jupyter-widgets/base", "_model_module_version": "1.5.0", "_view_count": null, "_view_module_version": "1.2.0", "_model_module": "@jupyter-widgets/controls" } }, "51049eb4022d4ca496d2a642214cc735": { "model_module": "@jupyter-widgets/base", "model_name": "LayoutModel", "model_module_version": "1.2.0", "state": { "_view_name": "LayoutView", "grid_template_rows": null, "right": null, "justify_content": null, "_view_module": "@jupyter-widgets/base", "overflow": null, "_model_module_version": "1.2.0", "_view_count": null, "flex_flow": null, "width": null, "min_width": null, "border": null, "align_items": null, "bottom": null, "_model_module": "@jupyter-widgets/base", "top": null, "grid_column": null, "overflow_y": null, "overflow_x": null, "grid_auto_flow": null, "grid_area": null, "grid_template_columns": null, "flex": null, "_model_name": "LayoutModel", "justify_items": null, "grid_row": null, "max_height": null, "align_content": null, "visibility": null, "align_self": null, "height": null, "min_height": null, "padding": null, "grid_auto_rows": null, "grid_gap": null, "max_width": null, "order": null, "_view_module_version": "1.2.0", "grid_template_areas": null, "object_position": null, "object_fit": null, "grid_auto_columns": null, "margin": null, "display": null, "left": null } } } } }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "d86DXrMMd1_X" }, "source": [ "# 1. Get NL-Augmenter and install dependencies" ] }, { "cell_type": "markdown", "metadata": { "id": "AZHffzbAfii2" }, "source": [ "## Copy git repository of NL-Augmenter" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "6itEUtbWiYr8", "outputId": "2f78ed25-bbbe-4edf-904a-0c627b1f9069" }, "source": [ "!git clone https://www.github.com/GEM-benchmark/NL-Augmenter" ], "execution_count": 1, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Cloning into 'NL-Augmenter'...\n", "warning: redirecting to https://github.com/GEM-benchmark/NL-Augmenter.git/\n", "remote: Enumerating objects: 11949, done.\u001b[K\n", "remote: Counting objects: 100% (620/620), done.\u001b[K\n", "remote: Compressing objects: 100% (414/414), done.\u001b[K\n", "remote: Total 11949 (delta 349), reused 384 (delta 205), pack-reused 11329\u001b[K\n", "Receiving objects: 100% (11949/11949), 91.25 MiB | 21.68 MiB/s, done.\n", "Resolving deltas: 100% (7799/7799), done.\n" ] } ] }, { "cell_type": "markdown", "metadata": { "id": "0tPppU_HfrkS" }, "source": [ "## Go to newly copied directory" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "dR62jWALiZrn", "outputId": "61797a92-e286-417e-c9d2-12ae17b377bb" }, "source": [ "cd NL-Augmenter" ], "execution_count": 2, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "/content/NL-Augmenter\n" ] } ] }, { "cell_type": "markdown", "metadata": { "id": "XVYUdoj2f7xW" }, "source": [ "## Install requirements" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "bUVJQTXRigRR", "outputId": "99982956-7748-44ce-c4b1-681d56fabed6" }, "source": [ "!pip install -r requirements.txt --quiet" ], "execution_count": 3, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\u001b[K |████████████████████████████████| 12.1 MB 29.3 MB/s \n", "\u001b[K |████████████████████████████████| 12.7 MB 194 kB/s \n", "\u001b[K |████████████████████████████████| 101 kB 10.6 MB/s \n", "\u001b[K |████████████████████████████████| 280 kB 27.3 MB/s \n", "\u001b[K |████████████████████████████████| 234 kB 60.4 MB/s \n", "\u001b[K |████████████████████████████████| 2.2 MB 40.6 MB/s \n", "\u001b[K |████████████████████████████████| 54 kB 3.0 MB/s \n", "\u001b[K |████████████████████████████████| 43 kB 2.0 MB/s \n", "\u001b[K |████████████████████████████████| 1.2 MB 43.1 MB/s \n", "\u001b[K |████████████████████████████████| 138 kB 72.0 MB/s \n", "\u001b[K |████████████████████████████████| 190 kB 45.6 MB/s \n", "\u001b[K |████████████████████████████████| 73 kB 1.7 MB/s \n", "\u001b[K |████████████████████████████████| 105 kB 58.9 MB/s \n", "\u001b[K |████████████████████████████████| 22.3 MB 14 kB/s \n", "\u001b[K |████████████████████████████████| 167 kB 62.4 MB/s \n", "\u001b[K |████████████████████████████████| 9.1 MB 45.8 MB/s \n", "\u001b[K |████████████████████████████████| 42 kB 1.4 MB/s \n", "\u001b[K |████████████████████████████████| 451 kB 70.7 MB/s \n", "\u001b[K |████████████████████████████████| 628 kB 65.9 MB/s \n", "\u001b[K |████████████████████████████████| 213 kB 55.9 MB/s \n", "\u001b[K |████████████████████████████████| 132 kB 75.2 MB/s \n", "\u001b[K |████████████████████████████████| 56 kB 5.3 MB/s \n", "\u001b[K |████████████████████████████████| 69 kB 7.9 MB/s \n", "\u001b[K |████████████████████████████████| 243 kB 73.9 MB/s \n", "\u001b[K |████████████████████████████████| 3.3 MB 47.5 MB/s \n", "\u001b[K |████████████████████████████████| 895 kB 51.5 MB/s \n", "\u001b[K |████████████████████████████████| 843 kB 54.7 MB/s \n", "\u001b[K |████████████████████████████████| 749 kB 50.4 MB/s \n", "\u001b[K |████████████████████████████████| 596 kB 60.8 MB/s \n", "\u001b[K |████████████████████████████████| 98 kB 8.5 MB/s \n", "\u001b[K |████████████████████████████████| 5.6 MB 36.6 MB/s \n", "\u001b[K |████████████████████████████████| 68 kB 7.1 MB/s \n", "\u001b[K |████████████████████████████████| 41 kB 561 kB/s \n", "\u001b[K |████████████████████████████████| 496 kB 59.8 MB/s \n", "\u001b[K |████████████████████████████████| 81 kB 10.1 MB/s \n", "\u001b[K |████████████████████████████████| 5.6 MB 35.8 MB/s \n", "\u001b[K |████████████████████████████████| 5.6 MB 37.1 MB/s \n", "\u001b[K |████████████████████████████████| 419 kB 68.3 MB/s \n", "\u001b[K |████████████████████████████████| 97 kB 6.8 MB/s \n", "\u001b[K |████████████████████████████████| 3.6 MB 54.0 MB/s \n", "\u001b[?25h Building wheel for checklist (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Building wheel for word2number (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Building wheel for seqeval (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Building wheel for iso-639 (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Building wheel for patternfork-nosql (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Building wheel for python-docx (setup.py) ... \u001b[?25l\u001b[?25hdone\n", " Building wheel for sgmllib3k (setup.py) ... \u001b[?25l\u001b[?25hdone\n", "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", "datascience 0.10.6 requires coverage==3.7.1, but you have coverage 6.1.2 which is incompatible.\n", "datascience 0.10.6 requires folium==0.2.1, but you have folium 0.8.3 which is incompatible.\n", "coveralls 0.5 requires coverage<3.999,>=3.6, but you have coverage 6.1.2 which is incompatible.\u001b[0m\n" ] } ] }, { "cell_type": "markdown", "metadata": { "id": "A4n-PqAAfJes" }, "source": [ "# 2. Load the data" ] }, { "cell_type": "markdown", "metadata": { "id": "T_GV8XWlgMMr" }, "source": [ "## Get dataloader and use it to load OrangeSUM dataset" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 171, "referenced_widgets": [ "bedbf1536d4e4e85b0c931ff74464ff1", "ea1152c90bc74b96995908ab99d37de2", "d019150c3a7544ea8f2b4a2975b7de4f", "b7fabd3352154751842babcbc1abdc9b", "2aee30c176ae439388068eb9053eee6b", "be586adc287c421eb14cc1c7dab5e01b", "aa53b5014f594396a18a59a3e4985021", "2a4af772127a45d7bec9a942da2ea3ce", "c35b4cd861aa4b70815e1b16a472aa39", "41f1507827954bd6a7f66365d39b2bfe", "aeccfb8c054640b9a59dec2ec8b422ed", "dbdb324190a74acdb92a5e10b10d2389", "fd83d349730345eaaa26705783fa7e37", "cadd355bc1ca4d4d9f6927d1b49d371f", "83878c010e1e4e71bab25cf35e4fb642", "947aaa604751411f98fb5195704619a6", "9133bff7fec248d5b2b3511f3d437ea7", "696b7beb5fb14606999abf73c30160ae", "db6df59984de4b899b0d4be3f6ebc4ea", "ffa846c31d544bd493ea1212748eef04", "08daceaab1474996a0dc3afa0426f303", "d6a006b9b2b34815ab2f589b4412bb51", "ee74c668023b484baff60c8097e6bb21", "da48a5a2a0f74df3ac062a78095a5fae", "32395c8bc58f4e54ba110e8db71a05aa", "ae0b41faf92143eebb09b3a3131ef377", "b0efc5fd7a864e0b87f7cc97de58456e", "4cae08c8e8b74bc7bbfb730a146b048d", "1a8470958272425d9564d0365b943929", "9685fdfee2ec4d67819791f7ddfd3101", "4737188cb3a546969dc449a06f6b4be0", "2f008252e4844fd3a9460ca1492ab294", "b45f5712711543fc9272a09f70af15b1", "359d5d1277884d34a12c0c4fa6d6f4b8", "3c23ea5798554bcbafb1e3be7e48829b", "c1755e4640d744279c1db0847320f176", "6017acbe82fb49db9a2cc28694ce18ac", "342ee125045a4d34a37cf201b4a84b58", "0d6a8299682549a7bc041d1210c6cbc4", "56b3c7d433444820973e7a16466d6a50", "d73b42fc86dc40edbca2a1bef6d839d4", "4d97d5718ed646afa4a6e57dcc9ce820", "859096bacddd4bd7ab8bd26676a26ad1", "ee582e249d9f4ac88bd12e99d9837dbc", "c1791af094cc472eb4b39f8775c15caf", "fb6979db4c2b4d8196689d0d55c6c425", "5e17016bfd8a43e8bb48015c7df3835f", "6f01cdc017314c4fb84d9857eb8a0144", "7beb7909e25140789e4bde255b69f859", "e40741b3ec434614b6326f02e4532960", "6ba26205dc1f45ada489fc33e6c4b7dc", "9985f0beff2841d4bbaac04b075c105c", "45adaf3e96eb4a61800e9b1d2d1f0d36", "ee50abf4c5f44b50885c04b06583731f", "419d6c6494dd4d73b9e66ffbfbdc7dd2", "21a21b8ef1b04c5ca8b8fe9866ec539c", "b38c0aac5d2943648592a859b19eede5", "f8e9e785809c4c9abc0ca2fcb8a7cfda", "16edba7fef104965a0a40a23758c4565", "593da850d94c480a9e9cb1406302b87e", "c848fbf2cc914afe9b3a824b2eba55c2", "3a17ff56afb14c48871de3535b8f8576", "a90c1f26d6c94526b36b90d91b9675b3", "51049eb4022d4ca496d2a642214cc735" ] }, "id": "VrIfrgGNj6WQ", "outputId": "8f4c42d2-2cb3-4a86-89c2-e49f53bc3ff5" }, "source": [ "from datasets import load_dataset\n", "\n", "data = load_dataset(\"orange_sum\", 'abstract')" ], "execution_count": 11, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Downloading and preparing dataset gem/common_gen (download: 1.84 MiB, generated: 10.87 MiB, post-processed: Unknown size, total: 12.71 MiB) to /root/.cache/huggingface/datasets/gem/common_gen/1.1.0/a94b3f239aacc2081ffa3ea4414c3cddff25bb680c09756a27ec3e76547187b4...\n" ] }, { "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "bedbf1536d4e4e85b0c931ff74464ff1", "version_minor": 0, "version_major": 2 }, "text/plain": [ "HBox(children=(FloatProgress(value=0.0, description='Downloading', max=1845699.0, style=ProgressStyle(descript…" ] }, "metadata": {} }, { "output_type": "stream", "name": "stdout", "text": [ "\n" ] }, { "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c35b4cd861aa4b70815e1b16a472aa39", "version_minor": 0, "version_major": 2 }, "text/plain": [ "HBox(children=(FloatProgress(value=0.0, description='Downloading', max=87818.0, style=ProgressStyle(descriptio…" ] }, "metadata": {} }, { "output_type": "stream", "name": "stdout", "text": [ "\n" ] }, { "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "9133bff7fec248d5b2b3511f3d437ea7", "version_minor": 0, "version_major": 2 }, "text/plain": [ "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "32395c8bc58f4e54ba110e8db71a05aa", "version_minor": 0, "version_major": 2 }, "text/plain": [ "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b45f5712711543fc9272a09f70af15b1", "version_minor": 0, "version_major": 2 }, "text/plain": [ "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d73b42fc86dc40edbca2a1bef6d839d4", "version_minor": 0, "version_major": 2 }, "text/plain": [ "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7beb7909e25140789e4bde255b69f859", "version_minor": 0, "version_major": 2 }, "text/plain": [ "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b38c0aac5d2943648592a859b19eede5", "version_minor": 0, "version_major": 2 }, "text/plain": [ "HBox(children=(FloatProgress(value=1.0, bar_style='info', layout=Layout(width='20px'), max=1.0), HTML(value=''…" ] }, "metadata": {} }, { "output_type": "stream", "name": "stdout", "text": [ "Dataset gem downloaded and prepared to /root/.cache/huggingface/datasets/gem/common_gen/1.1.0/a94b3f239aacc2081ffa3ea4414c3cddff25bb680c09756a27ec3e76547187b4. Subsequent calls will reuse this data.\n" ] } ] }, { "cell_type": "markdown", "metadata": { "id": "TpkLKbsvgeQp" }, "source": [ "## Explore data structure" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "A45FjLxfN394", "outputId": "dd53b2eb-9f10-434e-d6dd-3b6479b18b23" }, "source": [ "data" ], "execution_count": 99, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "DatasetDict({\n", " train: Dataset({\n", " features: ['text', 'summary'],\n", " num_rows: 21401\n", " })\n", " test: Dataset({\n", " features: ['text', 'summary'],\n", " num_rows: 1500\n", " })\n", " validation: Dataset({\n", " features: ['text', 'summary'],\n", " num_rows: 1500\n", " })\n", "})" ] }, "metadata": {}, "execution_count": 99 } ] }, { "cell_type": "markdown", "metadata": { "id": "jWaFVlMtg3iG" }, "source": [ "## Retrieve one entry from a train subset" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "M3FvWy4fDwvV", "outputId": "c06ecb37-1cab-419e-9ad4-be4a2c1ffef6" }, "source": [ "train_instance = data['train'][0]\n", "train_instance" ], "execution_count": 100, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "{'summary': \"L'information n'a pas été confirmée par l'intéressé qui déclare toutefois étudier la question.\\n\",\n", " 'text': 'Thierry Mariani sur la liste du Rassemblement national (RN, ex-FN) aux européennes ? C\\'est ce qu\\'affirme mardi 11 septembre Chez Pol, la nouvelle newsletter politique de Libération. L\\'ancien député Les Républicain et ministre de Nicolas Sarkozy serait sur le point de rejoindre les troupes de Marine Le Pen pour le élections européennes de 2019. \"Ça va se faire. Ce n\\'est plus qu\\'une question de calendrier. On n\\'est pas obligé de l\\'annoncer tout de suite, à huit mois des européennes\", aurait ainsi assuré un membre influent du RN. Contacté par Franceinfo, M. Mariani n\\'a pas confirmé l\\'information. \"Les élections sont en juin, je ne sais même pas qui sera numéro 1 sur la liste\", a répondu l\\'ancien ministre des Transports. Il reconnaît toutefois, toujours cité par Franceinfo, que son nom sur la liste du RN \"fait partie des possibilités\". \"Fréjus est une ville sympathique mais je n\\'ai pas prévu de m\\'y rendre ce week_end\", a-t-il par ailleurs commenté sur Twitter alors que Marine Le Pen réunit les cadres de son parti ce week-end dans la cité varoise. Une proximité connue avec le FNLa proximité de Thierry Mariani avec le parti frontiste n\\'est pas nouvelle. \"Sans alliés, nous allons rester dans l\\'opposition pour longtemps. Il est temps de renverser la table. Le Front national a évolué. Regardons si un accord ou un rapprochement sont possibles\", avait-il déclaré dans une interview donnée au Journal du Dimanche en mars dernier. Puis, en avril, avait bruissé la rumeur d\\'un rencontre entre l\\'ex-député et Marine Le Pen, qui lui aurait proposé de figurer en position éligible sur la liste de son parti aux européennes. \"Pas de conclusion hâtive\", avait-il à l\\'époque écrit sur Twitter. Le même mois, Thierry Mariani avait cosigné une tribune publiée dans Valeurs actuelles aux côté d\\'élus frontistes appelant à une union des droites.\\n'}" ] }, "metadata": {}, "execution_count": 100 } ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "QaRwb9xVK7Mv", "outputId": "58e08001-3f7e-4188-9c10-f4ec2c3a664a" }, "source": [ "def inject_gem_id(dataset_object, split_name):\n", " split_with_id = []\n", " for i in range(len(dataset_object[split_name])):\n", " my_object = {\n", " 'gem_id': 'orange_sum-' + split_name + '-' + str(i),\n", " 'summary': dataset_object[split_name][i].get(\"summary\"), \n", " 'text': dataset_object[split_name][i].get(\"text\") \n", " }\n", " split_with_id.append(my_object)\n", " return split_with_id\n", "\n", "train_split = inject_gem_id(data, \"train\")\n", "print(\"Train split length\", len(train_split))\n", "\n", "validation_split = inject_gem_id(data, \"validation\")\n", "print(\"Validation split length\", len(validation_split))\n", "\n", "test_split = inject_gem_id(data, \"test\")\n", "print(\"Test split length\", len(test_split))" ], "execution_count": 101, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Train split length 21401\n", "Validation split length 1500\n", "Test split length 1500\n" ] } ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "nbCjXZlYiHOP", "outputId": "a8983438-f292-4b95-a752-4a364fd18ed8" }, "source": [ "train_split[0]" ], "execution_count": 102, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "{'gem_id': 'orange_sum-train-0',\n", " 'summary': \"L'information n'a pas été confirmée par l'intéressé qui déclare toutefois étudier la question.\\n\",\n", " 'text': 'Thierry Mariani sur la liste du Rassemblement national (RN, ex-FN) aux européennes ? C\\'est ce qu\\'affirme mardi 11 septembre Chez Pol, la nouvelle newsletter politique de Libération. L\\'ancien député Les Républicain et ministre de Nicolas Sarkozy serait sur le point de rejoindre les troupes de Marine Le Pen pour le élections européennes de 2019. \"Ça va se faire. Ce n\\'est plus qu\\'une question de calendrier. On n\\'est pas obligé de l\\'annoncer tout de suite, à huit mois des européennes\", aurait ainsi assuré un membre influent du RN. Contacté par Franceinfo, M. Mariani n\\'a pas confirmé l\\'information. \"Les élections sont en juin, je ne sais même pas qui sera numéro 1 sur la liste\", a répondu l\\'ancien ministre des Transports. Il reconnaît toutefois, toujours cité par Franceinfo, que son nom sur la liste du RN \"fait partie des possibilités\". \"Fréjus est une ville sympathique mais je n\\'ai pas prévu de m\\'y rendre ce week_end\", a-t-il par ailleurs commenté sur Twitter alors que Marine Le Pen réunit les cadres de son parti ce week-end dans la cité varoise. Une proximité connue avec le FNLa proximité de Thierry Mariani avec le parti frontiste n\\'est pas nouvelle. \"Sans alliés, nous allons rester dans l\\'opposition pour longtemps. Il est temps de renverser la table. Le Front national a évolué. Regardons si un accord ou un rapprochement sont possibles\", avait-il déclaré dans une interview donnée au Journal du Dimanche en mars dernier. Puis, en avril, avait bruissé la rumeur d\\'un rencontre entre l\\'ex-député et Marine Le Pen, qui lui aurait proposé de figurer en position éligible sur la liste de son parti aux européennes. \"Pas de conclusion hâtive\", avait-il à l\\'époque écrit sur Twitter. Le même mois, Thierry Mariani avait cosigné une tribune publiée dans Valeurs actuelles aux côté d\\'élus frontistes appelant à une union des droites.\\n'}" ] }, "metadata": {}, "execution_count": 102 } ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "TI_6xCE6iKh-", "outputId": "510f2e6c-6111-45df-b02b-811c7f3e2dbb" }, "source": [ "validation_split[0]" ], "execution_count": 103, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "{'gem_id': 'orange_sum-validation-0',\n", " 'summary': 'Le bateau de croisière, long de 275 m, a percuté un quai lors de son arrivée dans le port de Venise, dimanche 2 juin. Quatre personnes ont été blessées.\\n',\n", " 'text': \"Sur les réseaux sociaux, les images sont impressionnantes. Dimanche matin à Venise, l'équipage du MSC Opéra a perdu le contrôle du paquebot, à son arrivée dans le port de la cité des Doges. Le navire, qui peut contenir plus de 2.600 passagers, est venu heurter le quai auquel il voulait s'arrimer. Le paquebot a raclé le quai sur plusieurs mètres, suscitant la panique des personnes à terre, avant de percuter un autre bateau touristique, le Michelangelo, stoppant ainsi sa course. Des témoins ont filmé la scène. Les vidéos montrent des touristes courant pour tenter de fuir le paquebot, qui ne semble pas vouloir s'arrêter. Quatre personnes ont été blessées dans cet accident : deux légèrement, tandis que les deux autres ont été transportées à l'hôpital pour des examens. L'incident s'est produit à San Basilio-Zaterre, dans le canal de la Giudecca, où de nombreux navires de croisière s'arrêtent pour permettre à leurs passagers de visiter Venise.Selon le quotidien italien Corriere della Serra, cette course folle serait due aux forts courants et à la rupture de l'un des câbles qui reliait le navire au remorqueur, qui l'aidait à entrer dans le canal.\\n\"}" ] }, "metadata": {}, "execution_count": 103 } ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "Zvpp47f3iPfv", "outputId": "953c7d7b-90c7-4958-9d34-0e0160dee929" }, "source": [ "test_split[0]" ], "execution_count": 104, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "{'gem_id': 'orange_sum-test-0',\n", " 'summary': \"En janvier dernier, l'animateur de D8 avait versé des nouilles dans le pantalon de son chroniqueur Matthieu Delormeau. Une séquence très commentée à l'époque.\\n\",\n", " 'text': 'Une scène \"sans précédent dans l\\'histoire de l\\'abjection à la télévision\". C\\'est ainsi que Bruno Donnet, journaliste sur France Inter, qualifiait il y a quelques mois une séquence diffusée fin janvier dans \"Touche pas à mon poste\" sur D8. On y voit Cyril Hanouna et Stéphane Rotenberg, le présentateur de \"Top Chef\" sur M6, verser un bol de nouilles dans le slip du chroniqueur Matthieu Delormeau en guise de gage. Pour le journaliste de la radio publique, \"cette séquence (...) normalise un comportement qui ne l\\'est pas. Humilier quelqu\\'un, le harceler au travail, c\\'est interdit par la loi\", s\\'était insurgé Bruno Donnet après la diffusion de cette séquence. \"Ce qu\\'il est important de retenir ici, c\\'est qu\\'il (Matthieu Delormeau) dit non. Il exprime son refus, avait insisté le journaliste. Il supplie qu\\'on ne lui fasse pas subir une scène aussi avilissante et pourtant, 30 secondes plus tard, dans l\\'hilarité générale et sans que personne n\\'intervienne, ce garçon qui a imploré qu\\'on ne l\\'humilie pas pour la énième fois va accepter de baisser son froc, dans tous les sens du terme, de recevoir des nouilles cuites et totalement dégueulasses dans le caleçon, et d\\'aller se rassoir\", avait expliqué Bruno Donnet, parlant d\\'une \"normalisation de l\\'humiliation\" dans l\\'émission. \"Hanouna est un énorme pourvoyeur d\\'audiences pour D8 donc personne n\\'ose lui dire que ce qu\\'il fait avec Delormeau est immonde\". window.pvp_7cce7bb9ab8f525a563dcdcc0f6cbaa5 = new Pvp(\\'dmpublic\\', {idDM: \"x3oe2gx\", mediaType: \"dm-public\"}, { \\'sequenceUrl\\': \"//pms.orange.fr/module/pm/1892/videoInfoEdito/extId/x3oe2gx/adCategory/embed\", \\'domNode\\': \"pvpContainer_7cce7bb9ab8f525a563dcdcc0f6cbaa5\", \"origin\": \"embed\", \"mute\": true, \"autoplay\": false\\n'}" ] }, "metadata": {}, "execution_count": 104 } ] }, { "cell_type": "markdown", "metadata": { "id": "QMJXgYtEhQkI" }, "source": [ "## Retrieve a target sentence from this entry object" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 35 }, "id": "R6N5r-HKOJEO", "outputId": "7c9273e8-72db-400d-c797-8951b50261c1" }, "source": [ "sentence = train_instance.get(\"summary\")\n", "sentence" ], "execution_count": 105, "outputs": [ { "output_type": "execute_result", "data": { "application/vnd.google.colaboratory.intrinsic+json": { "type": "string" }, "text/plain": [ "\"L'information n'a pas été confirmée par l'intéressé qui déclare toutefois étudier la question.\\n\"" ] }, "metadata": {}, "execution_count": 105 } ] }, { "cell_type": "markdown", "metadata": { "id": "gjXQnhLShpin" }, "source": [ "# 3. Test the filter" ] }, { "cell_type": "markdown", "metadata": { "id": "YpLi1-9Thyxk" }, "source": [ "## Load a filter class from a corresponding ditectory and try the example from its ReadMe" ] }, { "cell_type": "code", "metadata": { "id": "GxpwSB9Uiim3" }, "source": [ "from filters.gender_bias import GenderBiasFilter\n", "\n", "f = GenderBiasFilter(\"fr\")" ], "execution_count": 106, "outputs": [] }, { "cell_type": "markdown", "metadata": { "id": "KgMK5NZ3iIMc" }, "source": [ "## Take a subset of target sentences from OrangeSUM dataset \n" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "WQI_caltOnsZ", "outputId": "69f23a93-db32-4fc8-c544-1233920f8fc5" }, "source": [ "def get_sentences(split, num_iter):\n", " sentences = []\n", " for i in range(num_iter):\n", " sentence = split[i].get(\"summary\")\n", " sentences.append(sentence)\n", " return sentences\n", "\n", "sentences = get_sentences(train_split, 10)\n", "sentences" ], "execution_count": 107, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "[\"L'information n'a pas été confirmée par l'intéressé qui déclare toutefois étudier la question.\\n\",\n", " \"Le maire de Bordeaux ne fait plus partie des Républicains et il tient à le montrer. Lors de ses voeux à la presse, l'édile a pris ses distances avec sa famille politique historique, qu'il trouve trop proche de Marine Le Pen.\\n\",\n", " 'En 2020, les tribunaux d\\'instance fusionnent avec ceux de grande instance pour former un unique \"tribunal judiciaire\". C\\'est la principale mesure de la réforme de la Justice, portée par la garde des sceaux Nicole Belloubet.\\n',\n", " 'Les médecins jugés \"gros prescripteurs d\\'arrêts maladie\", sont notamment pointés du doigt par le patron du Medef Geoffroy Roux de Bézieux dans une interview au Figaro.\\n',\n", " 'Il aura fallu mobiliser 90 gendarmes pour cette opération d\\'envergure menée en Gironde, dans le Var et dans les Pyrénées-Orientales mardi. Dix personnes ont été arrêtées, soupçonnées d\\'avoir participé à une escroquerie \"d\\'ampleur\" sur des voitures de luxe.\\n',\n", " 'Les échanges de tirs ont eu lieu alors que les gendarmes tentaient de contrôler un véhicule.\\n',\n", " \"Marine Le Pen a prévu de se rendre sur l'Île-de-Sein ce jeudi pour célébrer l'appel du 18 juin. Le maire a déploré que la venue de la présidente du Rassemblement national perturbe la commémoration officielle.\\n\",\n", " 'De la SNCF à la RATP, en passant par Air France, EDF et les avocats, les appels à la grève le 5 décembre contre la réforme des retraites s\\'accumulent. À tel point que dans l\\'entourage d\\'Emmanuel Macron, on l\\'appelle le \"mur du 5 décembre\".\\n',\n", " \"L'accident de voiture qui a coûté la vie à cinq enfants lundi soir sur l'A7 dans la Drôme a été causé par la casse du turbo du véhicule. L'avocat de la famille, Me Nicolas Cellupica, met en cause le constructeur Renault.\\n\",\n", " 'Les enquêteurs de la police nationale multiplient les appels à témoins afin de tenter de retrouver trace de Léa Petitgas, disparue depuis le 13 décembre 2017.\\n']" ] }, "metadata": {}, "execution_count": 107 } ] }, { "cell_type": "markdown", "metadata": { "id": "itxrvpogigSD" }, "source": [ "## Apply a filter to this small subset" ] }, { "cell_type": "code", "metadata": { "id": "vZN-yXquuP-j", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "6fb73717-60d6-4a79-9765-e73e718c832d" }, "source": [ "f.filter(sentences)" ], "execution_count": 108, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "False" ] }, "metadata": {}, "execution_count": 108 } ] }, { "cell_type": "markdown", "metadata": { "id": "UUVKSJuhirRX" }, "source": [ "## Explore statistics which makes a filter returning the presence of gender bias" ] }, { "cell_type": "code", "metadata": { "id": "98iL8OjXuliC", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "9bfddb3a-318a-4733-ba18-083c3d705951" }, "source": [ "def get_stats(text, language):\n", " flagged_sentences = f.flag_sentences(text, language)\n", " feminine, masculine, neutral = f.count_genders(flagged_sentences)\n", " \n", " print(\"Feminine flagged sentences:\", feminine)\n", " print(\"Masculine flagged sentences:\", masculine)\n", " print(\"Neutral flagged sentences:\", neutral)\n", "\n", "get_stats(sentences, \"fr\")" ], "execution_count": 109, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Feminine flagged sentences: 2\n", "Masculine flagged sentences: 1\n", "Neutral flagged sentences: 7\n" ] } ] }, { "cell_type": "markdown", "metadata": { "id": "x8Fyq4Qui5eU" }, "source": [ "## Retrieve the sentences, corresponding to the statistics" ] }, { "cell_type": "code", "metadata": { "id": "R3qw6zORu-TI", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "5a287c3f-fffb-4879-b6ea-3ddbd380091a" }, "source": [ "def get_phrases(text, language):\n", " flagged_sentences = f.flag_sentences(text, language)\n", " feminine_group, masculine_group, neutral_group = f.sort_groups(flagged_sentences) \n", " return feminine_group, masculine_group, neutral_group\n", "\n", "feminine_group, masculine_group, neutral_group = get_phrases(sentences, \"fr\")\n", "\n", "print(\"This is a feminine group:\", feminine_group)\n", "print(\"This is a masculine group:\", masculine_group)\n", "print(\"This is a neutral group:\", neutral_group)" ], "execution_count": 110, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "This is a feminine group: ['En 2020, les tribunaux d\\'instance fusionnent avec ceux de grande instance pour former un unique \"tribunal judiciaire\". C\\'est la principale mesure de la réforme de la Justice, portée par la garde des sceaux Nicole Belloubet.\\n', \"Marine Le Pen a prévu de se rendre sur l'Île-de-Sein ce jeudi pour célébrer l'appel du 18 juin. Le maire a déploré que la venue de la présidente du Rassemblement national perturbe la commémoration officielle.\\n\"]\n", "This is a masculine group: ['Il aura fallu mobiliser 90 gendarmes pour cette opération d\\'envergure menée en Gironde, dans le Var et dans les Pyrénées-Orientales mardi. Dix personnes ont été arrêtées, soupçonnées d\\'avoir participé à une escroquerie \"d\\'ampleur\" sur des voitures de luxe.\\n']\n", "This is a neutral group: [\"L'information n'a pas été confirmée par l'intéressé qui déclare toutefois étudier la question.\\n\", \"Le maire de Bordeaux ne fait plus partie des Républicains et il tient à le montrer. Lors de ses voeux à la presse, l'édile a pris ses distances avec sa famille politique historique, qu'il trouve trop proche de Marine Le Pen.\\n\", 'Les médecins jugés \"gros prescripteurs d\\'arrêts maladie\", sont notamment pointés du doigt par le patron du Medef Geoffroy Roux de Bézieux dans une interview au Figaro.\\n', 'Les échanges de tirs ont eu lieu alors que les gendarmes tentaient de contrôler un véhicule.\\n', 'De la SNCF à la RATP, en passant par Air France, EDF et les avocats, les appels à la grève le 5 décembre contre la réforme des retraites s\\'accumulent. À tel point que dans l\\'entourage d\\'Emmanuel Macron, on l\\'appelle le \"mur du 5 décembre\".\\n', \"L'accident de voiture qui a coûté la vie à cinq enfants lundi soir sur l'A7 dans la Drôme a été causé par la casse du turbo du véhicule. L'avocat de la famille, Me Nicolas Cellupica, met en cause le constructeur Renault.\\n\", 'Les enquêteurs de la police nationale multiplient les appels à témoins afin de tenter de retrouver trace de Léa Petitgas, disparue depuis le 13 décembre 2017.\\n']\n" ] } ] }, { "cell_type": "code", "metadata": { "id": "nT28ouiNP1AJ" }, "source": [ "def create_filtered(split, num_iter, feminine_group, masculine_group, neutral_group):\n", " female = []\n", " male = []\n", " neutral = []\n", "\n", " for i in range(num_iter):\n", " train_instance = split[i].get(\"summary\")\n", " \n", " if train_instance in feminine_group:\n", " female.append(split[i].get(\"gem_id\"))\n", "\n", " elif train_instance in masculine_group:\n", " male.append(split[i].get(\"gem_id\"))\n", "\n", " elif train_instance in neutral_group:\n", " neutral.append(split[i].get(\"gem_id\"))\n", "\n", " filtered_entries = {\n", " \"female\": female,\n", " \"male\": male,\n", " \"neutral\": neutral\n", " }\n", "\n", " filtered_object = {\n", " \"gender_bias\": filtered_entries\n", " }\n", "\n", " return filtered_object" ], "execution_count": 111, "outputs": [] }, { "cell_type": "markdown", "metadata": { "id": "H1UQKf2dHctt" }, "source": [ "## Create final object with filtered data" ] }, { "cell_type": "code", "metadata": { "id": "_neZXkvnFumE", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "e077de1f-d47c-4e4c-e754-cf7532e64435" }, "source": [ "filtered_object = create_filtered(train_split, 10, feminine_group, masculine_group, neutral_group)\n", "filtered_object" ], "execution_count": 112, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "{'gender_bias': {'female': ['orange_sum-train-2', 'orange_sum-train-6'],\n", " 'male': ['orange_sum-train-4'],\n", " 'neutral': ['orange_sum-train-0',\n", " 'orange_sum-train-1',\n", " 'orange_sum-train-3',\n", " 'orange_sum-train-5',\n", " 'orange_sum-train-7',\n", " 'orange_sum-train-8',\n", " 'orange_sum-train-9']}}" ] }, "metadata": {}, "execution_count": 112 } ] }, { "cell_type": "markdown", "metadata": { "id": "1grVKh4ZHjtu" }, "source": [ "## Store the object in a json file" ] }, { "cell_type": "code", "metadata": { "id": "mhsiQWcAFo1H" }, "source": [ "import json\n", "\n", "with open('orange_sum_contrast_sets-test.json', 'w') as outfile:\n", " json.dump(filtered_object, outfile)" ], "execution_count": 84, "outputs": [] }, { "cell_type": "markdown", "metadata": { "id": "Ybx2Dw51vS-z" }, "source": [ "# 4. Apply the process to multiple entries" ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "PD2B0hpqRKpf", "outputId": "c29f4db4-bf83-4f52-b448-2e2895b21981" }, "source": [ "#Train\n", "sentences = get_sentences(train_split, len(train_split))\n", "f.filter(sentences)" ], "execution_count": 113, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "False" ] }, "metadata": {}, "execution_count": 113 } ] }, { "cell_type": "code", "metadata": { "id": "V4-8LRjD3erW", "colab": { "base_uri": "https://localhost:8080/" }, "outputId": "0a45e29d-2a34-4910-8b64-8fe938b3cb1a" }, "source": [ "get_stats(sentences, \"fr\")" ], "execution_count": 114, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Feminine flagged sentences: 4359\n", "Masculine flagged sentences: 4339\n", "Neutral flagged sentences: 12703\n" ] } ] }, { "cell_type": "code", "metadata": { "id": "INFDYWULH1Gg" }, "source": [ "feminine_group, masculine_group, neutral_group = get_phrases(sentences, \"fr\")\n", "filtered_object_train = create_filtered(train_split, len(train_split), feminine_group, masculine_group, neutral_group)" ], "execution_count": 115, "outputs": [] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "kx82Uhw0R24i", "outputId": "f82129cc-d021-4d13-b48c-bd318610464c" }, "source": [ "#Validation\n", "sentences = get_sentences(validation_split, len(validation_split))\n", "f.filter(sentences)" ], "execution_count": 116, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "False" ] }, "metadata": {}, "execution_count": 116 } ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "a8zkHWCdSAVm", "outputId": "95ff1224-aaee-43e3-b72e-d93976067a94" }, "source": [ "get_stats(sentences, \"fr\")" ], "execution_count": 117, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Feminine flagged sentences: 304\n", "Masculine flagged sentences: 287\n", "Neutral flagged sentences: 909\n" ] } ] }, { "cell_type": "code", "metadata": { "id": "SWjT6iMESIkE" }, "source": [ "feminine_group, masculine_group, neutral_group = get_phrases(sentences, \"fr\")\n", "filtered_object_validation = create_filtered(validation_split, len(validation_split), feminine_group, masculine_group, neutral_group)" ], "execution_count": 118, "outputs": [] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "gyL5Rp1FSVxp", "outputId": "e39b3576-9c8f-43af-ea0f-206b9ec3397b" }, "source": [ "#Test\n", "sentences = get_sentences(test_split, len(test_split))\n", "f.filter(sentences)" ], "execution_count": 119, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ "True" ] }, "metadata": {}, "execution_count": 119 } ] }, { "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "id": "A0fRYnSNSbf5", "outputId": "5d164fc1-eb47-43f7-b049-3258e6af9ae5" }, "source": [ "get_stats(sentences, \"fr\")" ], "execution_count": 120, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "Feminine flagged sentences: 290\n", "Masculine flagged sentences: 300\n", "Neutral flagged sentences: 910\n" ] } ] }, { "cell_type": "code", "metadata": { "id": "5cUzrrFJSeFn" }, "source": [ "feminine_group, masculine_group, neutral_group = get_phrases(sentences, \"fr\")\n", "filtered_object_test = create_filtered(test_split, len(test_split), feminine_group, masculine_group, neutral_group)" ], "execution_count": 121, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "vSZqYXhzS_tR" }, "source": [ "filtered_object = {\n", " 'train': filtered_object_train,\n", " 'validation': filtered_object_validation,\n", " 'test': filtered_object_test\n", "}" ], "execution_count": 122, "outputs": [] }, { "cell_type": "code", "metadata": { "id": "qaL8NfKZNcOY" }, "source": [ "with open('orange_sum_contrast_sets.json', 'w') as outfile:\n", " json.dump(filtered_object, outfile)" ], "execution_count": 123, "outputs": [] } ] }