You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9717 lines
357 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "task_1_main_final.ipynb",
"provenance": [],
"collapsed_sections": [
"56jnJp8uiPn9",
"4XWzutwLM09r"
],
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9-final"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"fb7ab8f92b3b43f28bd5138c208402a1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_5de0acfff7c64856adbdcbefefbc4588",
"IPY_MODEL_2c8b7eb6c28a4afca6fcd93485debabc"
],
"layout": "IPY_MODEL_95ed528d8aba48389a823838ab38972a"
}
},
"5de0acfff7c64856adbdcbefefbc4588": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_93546486b98042439ea7ee15f3bba751",
"max": 17900,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_310b5d3b53c5465db8b9be0444f5fca9",
"value": 17900
}
},
"2c8b7eb6c28a4afca6fcd93485debabc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_6c917c22f4da4af4821cd0b1e5834015",
"placeholder": "",
"style": "IPY_MODEL_3f4fcf4523994ee0a2ddaaab37d5d2dc",
"value": " 17900/17900 [00:02<00:00, 7117.49it/s]"
}
},
"95ed528d8aba48389a823838ab38972a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"93546486b98042439ea7ee15f3bba751": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"310b5d3b53c5465db8b9be0444f5fca9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"6c917c22f4da4af4821cd0b1e5834015": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"3f4fcf4523994ee0a2ddaaab37d5d2dc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"37caa1edcff34aa4a87a1f0894dccd3c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_b108ce4f6f6a459990031a87bb0f93a7",
"IPY_MODEL_62f2507cde6e4314a383a7dd62007516"
],
"layout": "IPY_MODEL_b57c266b9f254a6f87c0d4eaca1e0998"
}
},
"b108ce4f6f6a459990031a87bb0f93a7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_060e1083dba644bd99192d1233b30d7b",
"max": 2419,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_9f292af3107740ab917f8b38d96695f7",
"value": 2419
}
},
"62f2507cde6e4314a383a7dd62007516": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_fcbbb36885d2422ba39300e96fbc1949",
"placeholder": "",
"style": "IPY_MODEL_4a5ac5265eb041bc91ae00b9daa8eca8",
"value": " 2419/2419 [00:00<00:00, 33802.61it/s]"
}
},
"b57c266b9f254a6f87c0d4eaca1e0998": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"060e1083dba644bd99192d1233b30d7b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9f292af3107740ab917f8b38d96695f7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"fcbbb36885d2422ba39300e96fbc1949": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"4a5ac5265eb041bc91ae00b9daa8eca8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"b0ecf23eb0e8480a857ed2b4abe24345": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_85ed3d2717c1496496e5bafcad6ea007",
"IPY_MODEL_81ecd670369746358383a15911a40b3d"
],
"layout": "IPY_MODEL_9c551f51cb3643af87f6e398a014d2e5"
}
},
"85ed3d2717c1496496e5bafcad6ea007": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_c4baabb50e4b48c6a3384386c20674d8",
"max": 3024,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_3e81a213e4d64ae38067ec87b8e390a4",
"value": 3024
}
},
"81ecd670369746358383a15911a40b3d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_230187bfe3e644e887a8743aa9c4fdcd",
"placeholder": "",
"style": "IPY_MODEL_9bebd45f500049d5b24a7cdb4de7a56a",
"value": " 3024/3024 [00:02<00:00, 1279.14it/s]"
}
},
"9c551f51cb3643af87f6e398a014d2e5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"c4baabb50e4b48c6a3384386c20674d8": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"3e81a213e4d64ae38067ec87b8e390a4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"230187bfe3e644e887a8743aa9c4fdcd": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9bebd45f500049d5b24a7cdb4de7a56a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"9a2544bce4bb4732841f0398bfb19271": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_b45ed8b5b87d4d0db8dae5c7de5071eb",
"IPY_MODEL_9751b09bb79e47338cd6ece722994a1d"
],
"layout": "IPY_MODEL_35e54f163da94fc3b36b3fb7f0565b96"
}
},
"b45ed8b5b87d4d0db8dae5c7de5071eb": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_b14ed2862c0347179298888ffb225e4f",
"max": 17900,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_e736fc01fd15438a8ad4ce26760cad4f",
"value": 17900
}
},
"9751b09bb79e47338cd6ece722994a1d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_317292518a3b4252ba38b92c90782d30",
"placeholder": "",
"style": "IPY_MODEL_95ebc48214ae49afa9b7441f23f71a00",
"value": " 17900/17900 [00:12<00:00, 1403.51it/s]"
}
},
"35e54f163da94fc3b36b3fb7f0565b96": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"b14ed2862c0347179298888ffb225e4f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"e736fc01fd15438a8ad4ce26760cad4f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"317292518a3b4252ba38b92c90782d30": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"95ebc48214ae49afa9b7441f23f71a00": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"c32e5b404aeb4ca1bdccd4e0438568ca": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_88742b538d25486ca22a4f523e120b0f",
"IPY_MODEL_ef2d2d15ba88499088c8493e4a8ca601"
],
"layout": "IPY_MODEL_10e5d52be10245c7bae95bd7d1094650"
}
},
"88742b538d25486ca22a4f523e120b0f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_67a0e71ef75a4bf5a1b3f4d88e318202",
"max": 2419,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_8c7bb227d31a4858a315f1ee3a62f025",
"value": 2419
}
},
"ef2d2d15ba88499088c8493e4a8ca601": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_1f41eff0073b4c9189f84f6e8303d7ac",
"placeholder": "",
"style": "IPY_MODEL_32c896d895af4311b6199147a5e2979a",
"value": " 2419/2419 [00:00<00:00, 12436.88it/s]"
}
},
"10e5d52be10245c7bae95bd7d1094650": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"67a0e71ef75a4bf5a1b3f4d88e318202": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"8c7bb227d31a4858a315f1ee3a62f025": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"1f41eff0073b4c9189f84f6e8303d7ac": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"32c896d895af4311b6199147a5e2979a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"ca7ff2053a9e47a18b693634a1a430ad": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_a7e3e89ac8e74933b29df3cce2b4787f",
"IPY_MODEL_474814c6cd8442c2a9149b564f45322b"
],
"layout": "IPY_MODEL_c13202570b6643bfbe02f523036705fe"
}
},
"a7e3e89ac8e74933b29df3cce2b4787f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_23a60351d9bd4b37a998d324dd263c69",
"max": 3024,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_16f92e9644b84a9aaec310b08e876c88",
"value": 3024
}
},
"474814c6cd8442c2a9149b564f45322b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_5f6f051141584804b5e5488d0096a3ae",
"placeholder": "",
"style": "IPY_MODEL_6917a2c512e94593bfa32888661d4bfe",
"value": " 3024/3024 [00:12<00:00, 246.92it/s]"
}
},
"c13202570b6643bfbe02f523036705fe": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"23a60351d9bd4b37a998d324dd263c69": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"16f92e9644b84a9aaec310b08e876c88": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"5f6f051141584804b5e5488d0096a3ae": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"6917a2c512e94593bfa32888661d4bfe": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"85769bcddc1e451ca366c61fbb5d439d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_c8c815119a2a4493b7b3d385207fd064",
"IPY_MODEL_55c505172d274cf2ab288160de4b8861"
],
"layout": "IPY_MODEL_12fa1e068a3c43aeafcd5bbc0ddb0de9"
}
},
"c8c815119a2a4493b7b3d385207fd064": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_9636d523277b41d6be5e68626c5667bc",
"max": 17900,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_0fd2218814ab42f48d6e411356377d69",
"value": 17900
}
},
"55c505172d274cf2ab288160de4b8861": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_fb93b11fac994683986f1b2af0bfbe1a",
"placeholder": "",
"style": "IPY_MODEL_242a92286abf41a79578ed9d8a4b0c53",
"value": " 17900/17900 [00:00<00:00, 141131.83it/s]"
}
},
"12fa1e068a3c43aeafcd5bbc0ddb0de9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"9636d523277b41d6be5e68626c5667bc": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"0fd2218814ab42f48d6e411356377d69": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"fb93b11fac994683986f1b2af0bfbe1a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"242a92286abf41a79578ed9d8a4b0c53": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"c422586570024ab69e3214e1ccbe155c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_44694e94b72b462a97f7d2c2ca53c880",
"IPY_MODEL_6e502243d98744b98b6ab8f4e48cd9f9"
],
"layout": "IPY_MODEL_5296fad4a68b4373be282d50e6a69b39"
}
},
"44694e94b72b462a97f7d2c2ca53c880": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_41c73d88e4f54f5a9de25a868697f3b1",
"max": 2419,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_43344abe1af94c918b97b2ad5f56e9b3",
"value": 2419
}
},
"6e502243d98744b98b6ab8f4e48cd9f9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_55517d84885648b09dcf3685f4768f0e",
"placeholder": "",
"style": "IPY_MODEL_57b8e03fe77c47fe998d1ba9fcb169d4",
"value": " 2419/2419 [00:00<00:00, 42970.86it/s]"
}
},
"5296fad4a68b4373be282d50e6a69b39": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"41c73d88e4f54f5a9de25a868697f3b1": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"43344abe1af94c918b97b2ad5f56e9b3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"55517d84885648b09dcf3685f4768f0e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"57b8e03fe77c47fe998d1ba9fcb169d4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"6232e4acf16746a18d88f01c10c01ecd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HBoxModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HBoxView",
"box_style": "",
"children": [
"IPY_MODEL_2624760a74d740d9aa98e5b996ba8c88",
"IPY_MODEL_9ef6fa07e84c4de5af3a3030c4800a42"
],
"layout": "IPY_MODEL_0d53032bb4f2401d9f169141b089ce8d"
}
},
"2624760a74d740d9aa98e5b996ba8c88": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "FloatProgressModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "ProgressView",
"bar_style": "success",
"description": "100%",
"description_tooltip": null,
"layout": "IPY_MODEL_848e1e4b974e40bd9e212a1bfba0d09e",
"max": 3024,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_32e9287356074bc29f606408c19675ca",
"value": 3024
}
},
"9ef6fa07e84c4de5af3a3030c4800a42": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_dom_classes": [],
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "HTMLModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/controls",
"_view_module_version": "1.5.0",
"_view_name": "HTMLView",
"description": "",
"description_tooltip": null,
"layout": "IPY_MODEL_67ca232763a140a3bfdeb8406f6b119a",
"placeholder": "",
"style": "IPY_MODEL_a7bc64aba0c14b66a6f61f5548b51e06",
"value": " 3024/3024 [00:05<00:00, 555.38it/s]"
}
},
"0d53032bb4f2401d9f169141b089ce8d": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"848e1e4b974e40bd9e212a1bfba0d09e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"32e9287356074bc29f606408c19675ca": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "ProgressStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"bar_color": null,
"description_width": "initial"
}
},
"67ca232763a140a3bfdeb8406f6b119a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"state": {
"_model_module": "@jupyter-widgets/base",
"_model_module_version": "1.2.0",
"_model_name": "LayoutModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "LayoutView",
"align_content": null,
"align_items": null,
"align_self": null,
"border": null,
"bottom": null,
"display": null,
"flex": null,
"flex_flow": null,
"grid_area": null,
"grid_auto_columns": null,
"grid_auto_flow": null,
"grid_auto_rows": null,
"grid_column": null,
"grid_gap": null,
"grid_row": null,
"grid_template_areas": null,
"grid_template_columns": null,
"grid_template_rows": null,
"height": null,
"justify_content": null,
"justify_items": null,
"left": null,
"margin": null,
"max_height": null,
"max_width": null,
"min_height": null,
"min_width": null,
"object_fit": null,
"object_position": null,
"order": null,
"overflow": null,
"overflow_x": null,
"overflow_y": null,
"padding": null,
"right": null,
"top": null,
"visibility": null,
"width": null
}
},
"a7bc64aba0c14b66a6f61f5548b51e06": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
},
"c719f3872c6f4223ad7fdaee113e4291": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_4f9847e35cef474d856c2cbb9dfa7268",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_2672c8ef681f4ff29441dbea671638c4",
"IPY_MODEL_55b159e44ed642bcb4e05ead62bf9e3f"
]
}
},
"4f9847e35cef474d856c2cbb9dfa7268": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"2672c8ef681f4ff29441dbea671638c4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_b495afa1a4994e019bc01b1a55ac7e79",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 9652,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 9652,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_2f99be63ef734347bb473c240f8060b6"
}
},
"55b159e44ed642bcb4e05ead62bf9e3f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_9192007e2ce642f28ca14ee3b0ff16e7",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 9652/9652 [00:00<00:00, 46603.32it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_0971568d3ea54ebbb13f2f644d8f9fac"
}
},
"b495afa1a4994e019bc01b1a55ac7e79": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"2f99be63ef734347bb473c240f8060b6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"9192007e2ce642f28ca14ee3b0ff16e7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"0971568d3ea54ebbb13f2f644d8f9fac": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"3880bab1f7c141c2ab45abbbdf9d345c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_6c739a52458a464594c392e56f54915f",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_1d88d016f2ed4cfd8677f4991af46eea",
"IPY_MODEL_3e8e7997c39e4e6789deffdd95502507"
]
}
},
"6c739a52458a464594c392e56f54915f": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"1d88d016f2ed4cfd8677f4991af46eea": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_c07c751a7a3544d09b784420b426f47e",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 2419,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 2419,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_6b2f79dcf1cf40f18a03508b72128d05"
}
},
"3e8e7997c39e4e6789deffdd95502507": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_9074f2532c164381b24ba63b838c2580",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2419/2419 [00:06<00:00, 382.29it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_f0423b2a6b2746c39778b5f60c1c75b0"
}
},
"c07c751a7a3544d09b784420b426f47e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"6b2f79dcf1cf40f18a03508b72128d05": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"9074f2532c164381b24ba63b838c2580": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"f0423b2a6b2746c39778b5f60c1c75b0": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"ada504e14cf1465580eac065354347c5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_1bf8000489d74e6a8f1d143636a7c9c5",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_f72506989e0d41fd8655ee46c5b50273",
"IPY_MODEL_aea004652c90444183d47f57a7dc568e"
]
}
},
"1bf8000489d74e6a8f1d143636a7c9c5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"f72506989e0d41fd8655ee46c5b50273": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_3db59eeab421411e86b42647e8308eda",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 3024,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 3024,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_390bd0733171490e87aad73fb23628ea"
}
},
"aea004652c90444183d47f57a7dc568e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_079ef7f7823842c98a3da9e2b3fab5e3",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 3024/3024 [00:06<00:00, 485.36it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_35aa302e1ed349ada317db14a4a1cd18"
}
},
"3db59eeab421411e86b42647e8308eda": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"390bd0733171490e87aad73fb23628ea": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"079ef7f7823842c98a3da9e2b3fab5e3": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"35aa302e1ed349ada317db14a4a1cd18": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"9ce8b489eeca4919a4032912499435b7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_ad73c85ef1a34d0087a78db58d871eca",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_55acfb75de9146b8aaea0dc32b81e241",
"IPY_MODEL_3afc37c3648a459993ccd3aad4b56b3d"
]
}
},
"ad73c85ef1a34d0087a78db58d871eca": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"55acfb75de9146b8aaea0dc32b81e241": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_3a7f69d694284de8b3e238c869a456c0",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 9652,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 9652,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_d3fd38187c774a5ea0aacea3cb6db7dd"
}
},
"3afc37c3648a459993ccd3aad4b56b3d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_48178f583ab5464992315328824aebdb",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 9652/9652 [01:14<00:00, 129.28it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_693f5e940fa54db0906e48555f9c4703"
}
},
"3a7f69d694284de8b3e238c869a456c0": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"d3fd38187c774a5ea0aacea3cb6db7dd": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"48178f583ab5464992315328824aebdb": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"693f5e940fa54db0906e48555f9c4703": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"60f8a46357e9484f924694016ce29f25": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_0c0ac965324a485abe79a0ff044901a5",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_acd35d5fb6d94b9db14a83185dba0bde",
"IPY_MODEL_2d27a0fbdb074992812e75026c5b04ea"
]
}
},
"0c0ac965324a485abe79a0ff044901a5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"acd35d5fb6d94b9db14a83185dba0bde": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_e8b0037011be4734ab295913ddebb6bc",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 2419,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 2419,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_ed6ba17e403e4461b528bec2d94882c4"
}
},
"2d27a0fbdb074992812e75026c5b04ea": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_3a3ad69d365646e4989e30b5cb6ed4b6",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2419/2419 [00:00<00:00, 7256.47it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_6d780643efb34a378cb87c0da9706a01"
}
},
"e8b0037011be4734ab295913ddebb6bc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"ed6ba17e403e4461b528bec2d94882c4": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"3a3ad69d365646e4989e30b5cb6ed4b6": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"6d780643efb34a378cb87c0da9706a01": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"2701f80ba2d447b79965d682fc2099af": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_5d5b0df776404b63983ed61ec96a4e67",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_a7ac838c70fc4057a1e6a9bfae5fff8f",
"IPY_MODEL_2df4a6fde8744f5ca23a0a5b59cfb953"
]
}
},
"5d5b0df776404b63983ed61ec96a4e67": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"a7ac838c70fc4057a1e6a9bfae5fff8f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_8dba55c7147a4055bf5d47aa69bce1ae",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 3024,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 3024,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_fc6737d10a3946bf8b9721275a9659cc"
}
},
"2df4a6fde8744f5ca23a0a5b59cfb953": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_5a95df4e174b409da85eeefc5dc99186",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 3024/3024 [01:14<00:00, 40.86it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_e6c5684603df48f0bbfc772387acf466"
}
},
"8dba55c7147a4055bf5d47aa69bce1ae": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"fc6737d10a3946bf8b9721275a9659cc": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"5a95df4e174b409da85eeefc5dc99186": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"e6c5684603df48f0bbfc772387acf466": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"f67c9ec20c984f8bbc26bf9091db6c2e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_56129e463f4c407da8e4838d33338878",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_5d2e8b829c0b4edabee472b385c47fb1",
"IPY_MODEL_3fcdd90cb1d94f13ad1acf0943c3aa28"
]
}
},
"56129e463f4c407da8e4838d33338878": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"5d2e8b829c0b4edabee472b385c47fb1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_9e55bb22b54f4d5da13e77dc2956fc84",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 9652,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 9652,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_89a76f0941164c8d94cba4ac168a741c"
}
},
"3fcdd90cb1d94f13ad1acf0943c3aa28": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_5eb5a30ee73b4fe7884975607683febd",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 9652/9652 [00:00<00:00, 54330.46it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_72a0260f739248e0a6a3a63fa9633117"
}
},
"9e55bb22b54f4d5da13e77dc2956fc84": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"89a76f0941164c8d94cba4ac168a741c": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"5eb5a30ee73b4fe7884975607683febd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"72a0260f739248e0a6a3a63fa9633117": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"925d7fc46db14c8d844ed0b4bfc5122e": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_22a18a9764d74574889907894fc8e7a8",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_9c98fcbff3b149e09014a1a348778c2f",
"IPY_MODEL_e9c727997bb44dcdb07f26a609fca05b"
]
}
},
"22a18a9764d74574889907894fc8e7a8": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"9c98fcbff3b149e09014a1a348778c2f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_7819e9f179184fee9d1713d47ff0c1ef",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 2419,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 2419,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_db2776394c474899aba71b6fb279a318"
}
},
"e9c727997bb44dcdb07f26a609fca05b": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_15a44a0fee374cccbce43fa95651e85c",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2419/2419 [00:00<00:00, 27877.21it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_99a33054e9a8402cbc617bcca7550e83"
}
},
"7819e9f179184fee9d1713d47ff0c1ef": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"db2776394c474899aba71b6fb279a318": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"15a44a0fee374cccbce43fa95651e85c": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"99a33054e9a8402cbc617bcca7550e83": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"009ef0a2be4c43929de0337d0d2a46dd": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_940513bb59dd48b987a7b56658805910",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_f7b20cb9a9e14f52bfba6fd250e8a4f5",
"IPY_MODEL_7959042cc9d04a5a98d052fb7e2ea18f"
]
}
},
"940513bb59dd48b987a7b56658805910": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"f7b20cb9a9e14f52bfba6fd250e8a4f5": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_2f3c5bc5e0cc47c5946fbd1ea2234164",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 3024,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 3024,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_c1075cd52534457eb7f282ea9a0cef68"
}
},
"7959042cc9d04a5a98d052fb7e2ea18f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_159e97124ec14f9ebf3db5bb3fc946b7",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 3024/3024 [00:42<00:00, 70.45it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_0e78d1b1dbf94a9e9ff9b3bc9ffa928e"
}
},
"2f3c5bc5e0cc47c5946fbd1ea2234164": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"c1075cd52534457eb7f282ea9a0cef68": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"159e97124ec14f9ebf3db5bb3fc946b7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"0e78d1b1dbf94a9e9ff9b3bc9ffa928e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"f168db82456a4f5fb60f2272e1b9d77f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_de1d57596eb0456dac05aff94719efb7",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_96a6cf6497e14d6eb4ab319b98ac2470",
"IPY_MODEL_51ef0907a32f44e9b227cdb3f7ac6aa4"
]
}
},
"de1d57596eb0456dac05aff94719efb7": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"96a6cf6497e14d6eb4ab319b98ac2470": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_c3ae145a5d53430da665466639bd28df",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 9652,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 9652,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_409e48749980469992cbac892c0809e6"
}
},
"51ef0907a32f44e9b227cdb3f7ac6aa4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_10e7571bdd5d48dd927f3455c6e68c03",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 9652/9652 [00:00<00:00, 88629.58it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_bffec8ba1e1a4e31b38c723dce999507"
}
},
"c3ae145a5d53430da665466639bd28df": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"409e48749980469992cbac892c0809e6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"10e7571bdd5d48dd927f3455c6e68c03": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"bffec8ba1e1a4e31b38c723dce999507": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"a1d35e41ec1746819672429292a59cb1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_f9da7f0dde8740008209f2d8607cd66b",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_96bb18d1964e440bab3cdfcf3ac939e1",
"IPY_MODEL_654cedfe9fbf45c99370a637342a6236"
]
}
},
"f9da7f0dde8740008209f2d8607cd66b": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"96bb18d1964e440bab3cdfcf3ac939e1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_704d43e9656042d7888c3bf0bd40d61f",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 2419,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 2419,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_74976b41142f4c7a8829168181134362"
}
},
"654cedfe9fbf45c99370a637342a6236": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_a24e57ec876d4ec68b0a1c7e22d03cb8",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2419/2419 [00:38<00:00, 62.92it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_0a29d5ce95db42d7ae1b9c5ffb3147af"
}
},
"704d43e9656042d7888c3bf0bd40d61f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"74976b41142f4c7a8829168181134362": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"a24e57ec876d4ec68b0a1c7e22d03cb8": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"0a29d5ce95db42d7ae1b9c5ffb3147af": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"481b6d080c3c487bbb1ee20fa16f02fc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_da9834e43f5d469087ff651ffb2a5c69",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_c74d94df4e6e4c46a8981c8e2d1af496",
"IPY_MODEL_fe598781b0d04e109b646873979453d1"
]
}
},
"da9834e43f5d469087ff651ffb2a5c69": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"c74d94df4e6e4c46a8981c8e2d1af496": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_ac93fb29e9e34ef2a8726df5707dfaf9",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 3024,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 3024,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_729cfe48bca34392859e7133b60d62aa"
}
},
"fe598781b0d04e109b646873979453d1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_900f8a8387574019b0d38e76c4499d25",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 3024/3024 [00:38<00:00, 78.81it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_91f77dc16420406b94534d2775f41823"
}
},
"ac93fb29e9e34ef2a8726df5707dfaf9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"729cfe48bca34392859e7133b60d62aa": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"900f8a8387574019b0d38e76c4499d25": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"91f77dc16420406b94534d2775f41823": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"e060975523ca49d4a356077d3762c517": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_24d69c068bd14fcd82cd3fa09093d401",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_99ad4be035904ff386d28c573853de15",
"IPY_MODEL_64348d43f5a643c8af6a28177056b896"
]
}
},
"24d69c068bd14fcd82cd3fa09093d401": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"99ad4be035904ff386d28c573853de15": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_970a98017f5c4dec83966f462bdd974d",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 9652,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 9652,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_51b5fc663dc542a3b3c90f6be1eeedde"
}
},
"64348d43f5a643c8af6a28177056b896": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_8e886ee3ecac4ffe9cf20fcb68ac5805",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 9652/9652 [03:49<00:00, 42.14it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_1f2abb15508347bd9fa8649de314e841"
}
},
"970a98017f5c4dec83966f462bdd974d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"51b5fc663dc542a3b3c90f6be1eeedde": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"8e886ee3ecac4ffe9cf20fcb68ac5805": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"1f2abb15508347bd9fa8649de314e841": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"c339b9b6569d41b8b9fa4880409dc96f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_019daac1d6a647ee8ace133bf463566e",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_189e926466a24000a391387182fb7ce4",
"IPY_MODEL_25e6a7531d654c4b9d3bf52d248a14b9"
]
}
},
"019daac1d6a647ee8ace133bf463566e": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"189e926466a24000a391387182fb7ce4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_6d1adf88dd6f4615a2876b8f06ed5825",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 2419,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 2419,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_bcb96faf50184f23882c9bd471d824e6"
}
},
"25e6a7531d654c4b9d3bf52d248a14b9": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_9f0b5349531f48bab97f1e46e2ef8e7a",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2419/2419 [01:16<00:00, 31.64it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_625b596d84f846b39ae42ca6fa36c8e9"
}
},
"6d1adf88dd6f4615a2876b8f06ed5825": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"bcb96faf50184f23882c9bd471d824e6": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"9f0b5349531f48bab97f1e46e2ef8e7a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"625b596d84f846b39ae42ca6fa36c8e9": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"272e61064c8c4641a38efb295dbb6de4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_edc4aa87d9cb48c3b10c48a7510ccc93",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_a7c9dcf92eaa4ed289e01a2432018e3f",
"IPY_MODEL_473de5a955994744a33ae7f21b797fb4"
]
}
},
"edc4aa87d9cb48c3b10c48a7510ccc93": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"a7c9dcf92eaa4ed289e01a2432018e3f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_57d754ace91549dd8feb6da3b90e5371",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 3024,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 3024,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_b0c6a78d94474680a50e4248b9dc8176"
}
},
"473de5a955994744a33ae7f21b797fb4": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_6b8afcc36cba4070969f250fc8f428ab",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 3024/3024 [00:47<00:00, 63.63it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_6c25eaabf1504effaa62a146225492e2"
}
},
"57d754ace91549dd8feb6da3b90e5371": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"b0c6a78d94474680a50e4248b9dc8176": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"6b8afcc36cba4070969f250fc8f428ab": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"6c25eaabf1504effaa62a146225492e2": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"9793357558c641db8216f46c9006992f": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_b49819801760481c9253bb1efc1acaf5",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_62e644c133214056947de95a7f7c0c32",
"IPY_MODEL_dac7e46d76c740d49e71d8e0f53d0114"
]
}
},
"b49819801760481c9253bb1efc1acaf5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"62e644c133214056947de95a7f7c0c32": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_d19ad0aea9584da5afbec71ab51bda47",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 9652,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 9652,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_65e37e9145094f2287d6af7d02964f0a"
}
},
"dac7e46d76c740d49e71d8e0f53d0114": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_82a5de8e64564c1386ac7d682ec97077",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 9652/9652 [00:01<00:00, 8410.55it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_06c8887a15ac48a09b0f7c5a4ce593fe"
}
},
"d19ad0aea9584da5afbec71ab51bda47": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"65e37e9145094f2287d6af7d02964f0a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"82a5de8e64564c1386ac7d682ec97077": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"06c8887a15ac48a09b0f7c5a4ce593fe": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"aa72c950c7664b9b894b687acc6feb1a": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_2d4d7338ccec4b0a800f890bd1ee8eb1",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_13cd981138034ee8a859f5b2dfa865fc",
"IPY_MODEL_7f903610319f447aa2271d3defb9aa06"
]
}
},
"2d4d7338ccec4b0a800f890bd1ee8eb1": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"13cd981138034ee8a859f5b2dfa865fc": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_332d3a959b4b420a9d54ba7abd7061c2",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 2419,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 2419,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_23002ede7f8f4089a496ae2da0aa8591"
}
},
"7f903610319f447aa2271d3defb9aa06": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_8cde5d980d8a47578f64d77329855a07",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 2419/2419 [00:00<00:00, 6749.19it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_18febe41046143109cf8fb1097e28e8a"
}
},
"332d3a959b4b420a9d54ba7abd7061c2": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"23002ede7f8f4089a496ae2da0aa8591": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"8cde5d980d8a47578f64d77329855a07": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"18febe41046143109cf8fb1097e28e8a": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"6ffde14d4869484eaafcfc566791bf74": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HBoxModel",
"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_3b28ee0fd91143718b61223793ceb361",
"_model_module": "@jupyter-widgets/controls",
"children": [
"IPY_MODEL_69f75bafa9814eb6b1f4cb00f398996d",
"IPY_MODEL_4ace7d82386c4bf7a01c42adffb5c9f1"
]
}
},
"3b28ee0fd91143718b61223793ceb361": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"69f75bafa9814eb6b1f4cb00f398996d": {
"model_module": "@jupyter-widgets/controls",
"model_name": "FloatProgressModel",
"state": {
"_view_name": "ProgressView",
"style": "IPY_MODEL_35140046ee40410b936055e182d83095",
"_dom_classes": [],
"description": "100%",
"_model_name": "FloatProgressModel",
"bar_style": "success",
"max": 3024,
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": 3024,
"_view_count": null,
"_view_module_version": "1.5.0",
"orientation": "horizontal",
"min": 0,
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_f76de61f7daa4e8e9ac111d96a9aa7f5"
}
},
"4ace7d82386c4bf7a01c42adffb5c9f1": {
"model_module": "@jupyter-widgets/controls",
"model_name": "HTMLModel",
"state": {
"_view_name": "HTMLView",
"style": "IPY_MODEL_a78f32c53e9f4293b247cbafc84e1eaa",
"_dom_classes": [],
"description": "",
"_model_name": "HTMLModel",
"placeholder": "",
"_view_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"value": " 3024/3024 [00:00<00:00, 8430.13it/s]",
"_view_count": null,
"_view_module_version": "1.5.0",
"description_tooltip": null,
"_model_module": "@jupyter-widgets/controls",
"layout": "IPY_MODEL_bc1cc4f4e8c7435e958a1b941f1b0c21"
}
},
"35140046ee40410b936055e182d83095": {
"model_module": "@jupyter-widgets/controls",
"model_name": "ProgressStyleModel",
"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"
}
},
"f76de61f7daa4e8e9ac111d96a9aa7f5": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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
}
},
"a78f32c53e9f4293b247cbafc84e1eaa": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"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"
}
},
"bc1cc4f4e8c7435e958a1b941f1b0c21": {
"model_module": "@jupyter-widgets/base",
"model_name": "LayoutModel",
"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": "2TvyemfDlDmu"
},
"source": [
"### Coursework coding instructions (please also see full coursework spec)\n",
"\n",
"Version: Ready to submit\n",
"\n",
"Please choose if you want to do either Task 1 or Task 2. You should write your report about one task only.\n",
"\n",
"For the task you choose you will need to do two approaches:\n",
" - Approach 1, which can use use pre-trained embeddings / models\n",
" - Approach 2, which should not use any pre-trained embeddings or models\n",
"We should be able to run both approaches from the same colab file\n",
"\n",
"#### Running your code:\n",
" - Your models should run automatically when running your colab file without further intervention\n",
" - For each task you should automatically output the performance of both models\n",
" - Your code should automatically download any libraries required\n",
"\n",
"#### Structure of your code:\n",
" - You are expected to use the 'train', 'eval' and 'model_performance' functions, although you may edit these as required\n",
" - Otherwise there are no restrictions on what you can do in your code\n",
"\n",
"#### Documentation:\n",
" - You are expected to produce a .README file summarising how you have approached both tasks\n",
"\n",
"#### Reproducibility:\n",
" - Your .README file should explain how to replicate the different experiments mentioned in your report\n",
"\n",
"Good luck! We are really looking forward to seeing your reports and your model code!"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "cmdavIkJ5a02"
},
"source": [
"#### README\n",
"You can run Approach1 and 2 directly separately, Please place the data set in '/content/drive/MyDrive/data/task-1/'.\n",
"\n",
"\n",
"\n",
"* The .README FILE: [README](https://1drv.ms/u/s!Aqc8bRqOh1johe0FeGHe4AA6WHkaGg?e=GLvaaU) \n",
"* The Dataset: [Dataset](https://cs.rochester.edu/u/nhossain/humicroedit.html)\n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "2HPElK7v13qJ"
},
"source": [
"#### Approach 1: Pre-trained representations"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "fv_4Z6Zj5-fy"
},
"source": [
"##### Method 1: The BiLSTM model "
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "H-9_dr7fQH6h",
"outputId": "841fba4f-d11d-4f92-e238-df77ab8a4e17"
},
"source": [
"from google.colab import drive\n",
"drive.mount('/content/drive')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Mounted at /content/drive\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Gai7vw5rUBlI",
"outputId": "44aaad00-02d3-4cb2-84a7-3abfe0124fb6"
},
"source": [
"# You will need to download any word embeddings required for your code, e.g.:\n",
"\n",
"# %cd /content/drive/My\\ Drive/nlp-task1\n",
"!wget http://nlp.stanford.edu/data/glove.6B.zip\n",
"!unzip glove.6B.zip\n",
"\n",
"# For any packages that Colab does not provide auotmatically you will also need to install these below, e.g.:\n",
"\n",
"# ! pip install torch\n",
"# ! pip install torchtext"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"/content/drive/My Drive/nlp-task1\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "i-rXJ9hBUG_v",
"outputId": "2681da1f-19cb-4739-a9fb-c95d20f83304"
},
"source": [
"# Imports\n",
"\n",
"import re\n",
"import torch\n",
"import nltk\n",
"import torch.nn as nn\n",
"import pandas as pd\n",
"import numpy as np\n",
"from torch.utils.data import Dataset, random_split\n",
"from torchtext.data.utils import get_tokenizer\n",
"from nltk.stem import WordNetLemmatizer \n",
"from nltk.corpus import stopwords\n",
"import codecs\n",
"\n",
"nltk.download(\"stopwords\")\n",
"nltk.download('wordnet')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"[nltk_data] Downloading package stopwords to /root/nltk_data...\n",
"[nltk_data] Package stopwords is already up-to-date!\n",
"[nltk_data] Downloading package wordnet to /root/nltk_data...\n",
"[nltk_data] Package wordnet is already up-to-date!\n"
],
"name": "stdout"
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"True"
]
},
"metadata": {
"tags": []
},
"execution_count": 22
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "Lj4frDUVUI07"
},
"source": [
"# Setting random seed and device\n",
"SEED = 1\n",
"\n",
"torch.manual_seed(SEED)\n",
"torch.cuda.manual_seed(SEED)\n",
"torch.backends.cudnn.deterministic = True\n",
"\n",
"use_cuda = torch.cuda.is_available()\n",
"device = torch.device(\"cuda:0\" if use_cuda else \"cpu\")"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "SeRF8JlVUKad"
},
"source": [
"# Load data\n",
"train_humicroedit_df = pd.read_csv('/content/drive/MyDrive/data/task-1/train.csv')\n",
"train_funlines_df = pd.read_csv('/content/drive/MyDrive/data/task-1/train_funlines.csv')\n",
"\n",
"train_df = train_humicroedit_df.append(train_funlines_df, ignore_index=True)\n",
"train_df = pd.read_csv('/content/drive/MyDrive/data/task-1/train.csv')\n",
"test_df = pd.read_csv('/content/drive/MyDrive/data/task-1/dev.csv')"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "rGEY8d6dULoI"
},
"source": [
"# Number of epochs\n",
"epochs = 20\n",
"\n",
"# Proportion of training data for train compared to dev\n",
"train_proportion = 0.8"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "TYqyHExh43k3"
},
"source": [
"# We define our training loop\n",
"def train(train_iter, dev_iter, model, number_epoch):\n",
" \"\"\"\n",
" Training loop for the model, which calls on eval to evaluate after each epoch\n",
" \"\"\"\n",
"\n",
" print(\"Training model.\")\n",
"\n",
" for epoch in range(1, number_epoch+1):\n",
"\n",
" model.train()\n",
" epoch_loss = 0\n",
" epoch_sse = 0\n",
" no_observations = 0 # Observations used for training so far\n",
"\n",
" for batch in train_iter:\n",
"\n",
" feature, target = batch\n",
"\n",
" feature, target = feature.to(device), target.to(device)\n",
"\n",
" # for RNN:\n",
" model.batch_size = target.shape[0]\n",
" no_observations = no_observations + target.shape[0]\n",
" # model.hidden = model.init_hidden()\n",
"\n",
" predictions = model(feature).squeeze(1)\n",
"\n",
" optimizer.zero_grad()\n",
"\n",
" loss = loss_fn(predictions, target)\n",
"\n",
" sse, __ = model_performance(predictions.detach().cpu().numpy(), target.detach().cpu().numpy())\n",
"\n",
" loss.backward()\n",
" optimizer.step()\n",
"\n",
" epoch_loss += loss.item()*target.shape[0]\n",
" epoch_sse += sse\n",
"\n",
" valid_loss, valid_mse, __, __ = eval(dev_iter, model)\n",
"\n",
" epoch_loss, epoch_mse = epoch_loss / no_observations, epoch_sse / no_observations\n",
" print(f'| Epoch: {epoch:02} | Train Loss: {epoch_loss:.2f} | Train MSE: {epoch_mse:.2f} | Train RMSE: {epoch_mse**0.5:.2f} | \\\n",
" Val. Loss: {valid_loss:.2f} | Val. MSE: {valid_mse:.2f} | Val. RMSE: {valid_mse**0.5:.2f} |')"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "o72u3oiv49GU"
},
"source": [
"# We evaluate performance on our dev set\n",
"def eval(data_iter, model):\n",
" \"\"\"\n",
" Evaluating model performance on the dev set\n",
" \"\"\"\n",
" model.eval()\n",
" epoch_loss = 0\n",
" epoch_sse = 0\n",
" pred_all = []\n",
" trg_all = []\n",
" no_observations = 0\n",
"\n",
" with torch.no_grad():\n",
" for batch in data_iter:\n",
" feature, target = batch\n",
"\n",
" feature, target = feature.to(device), target.to(device)\n",
"\n",
" # for RNN:\n",
" model.batch_size = target.shape[0]\n",
" no_observations = no_observations + target.shape[0]\n",
" # model.hidden = model.init_hidden()\n",
"\n",
" predictions = model(feature).squeeze(1)\n",
" loss = loss_fn(predictions, target)\n",
"\n",
" # We get the mse\n",
" pred, trg = predictions.detach().cpu().numpy(), target.detach().cpu().numpy()\n",
" sse, __ = model_performance(pred, trg)\n",
"\n",
" epoch_loss += loss.item()*target.shape[0]\n",
" epoch_sse += sse\n",
" pred_all.extend(pred)\n",
" trg_all.extend(trg)\n",
"\n",
" return epoch_loss/no_observations, epoch_sse/no_observations, np.array(pred_all), np.array(trg_all)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "1U8f4Eai4_eG"
},
"source": [
"# How we print the model performance\n",
"def model_performance(output, target, print_output=False):\n",
" \"\"\"\n",
" Returns SSE and MSE per batch (printing the MSE and the RMSE)\n",
" \"\"\"\n",
"\n",
" sq_error = (output - target)**2\n",
"\n",
" sse = np.sum(sq_error)\n",
" mse = np.mean(sq_error)\n",
" rmse = np.sqrt(mse)\n",
"\n",
" if print_output:\n",
" print(f'| MSE: {mse:.2f} | RMSE: {rmse:.2f} |')\n",
"\n",
" return sse, mse"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "YfA_jzeoUR-O"
},
"source": [
"def create_vocab(data):\n",
" \"\"\"\n",
" Creating a corpus of all the tokens used\n",
" \"\"\"\n",
" tokenized_corpus = [] # Let us put the tokenized corpus in a list\n",
"\n",
" # define a tokenizer\n",
" tokenizer = get_tokenizer(\"spacy\")\n",
"\n",
" # define stopwords\n",
" stopwordList = set(stopwords.words('english'))\n",
"\n",
" # define a lemmatizer\n",
" lemmatizer = WordNetLemmatizer()\n",
"\n",
" for sentence in data:\n",
"\n",
" tokenized_sentence = tokenizer(sentence)\n",
" valid_tokenized_sentence = []\n",
" \n",
" for word in tokenized_sentence:\n",
"\n",
" if re.match(\"^[A-Za-z]+$\", word) and word not in stopwordList:\n",
"\n",
" valid_tokenized_sentence.append(lemmatizer.lemmatize(word))\n",
"\n",
" # for token in sentence.split(' '): # simplest split is\n",
" # tokenized_sentence.append(token)\n",
"\n",
" tokenized_corpus.append(valid_tokenized_sentence)\n",
"\n",
" # Create single list of all vocabulary\n",
" vocabulary = [] # Let us put all the tokens (mostly words) appearing in the vocabulary in a list\n",
"\n",
" for sentence in tokenized_corpus:\n",
"\n",
" for token in sentence:\n",
"\n",
" if token not in vocabulary:\n",
"\n",
" if True:\n",
" vocabulary.append(token)\n",
"\n",
" return vocabulary, tokenized_corpus"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "9ocB-WJDUThX"
},
"source": [
"def collate_fn_padd(batch):\n",
" '''\n",
" We add padding to our minibatches and create tensors for our model\n",
" '''\n",
"\n",
" batch_labels = [l for f, l in batch]\n",
" batch_features = [f for f, l in batch]\n",
"\n",
" batch_features_len = [len(f) for f, l in batch]\n",
"\n",
" seq_tensor = torch.zeros((len(batch), max(batch_features_len))).long()\n",
"\n",
" for idx, (seq, seqlen) in enumerate(zip(batch_features, batch_features_len)):\n",
" seq_tensor[idx, :seqlen] = torch.LongTensor(seq)\n",
"\n",
" batch_labels = torch.FloatTensor(batch_labels)\n",
"\n",
" return seq_tensor, batch_labels\n",
"\n",
"class Task1Dataset(Dataset):\n",
"\n",
" def __init__(self, train_data, labels):\n",
" self.x_train = train_data\n",
" self.y_train = labels\n",
"\n",
" def __len__(self):\n",
" return len(self.y_train)\n",
"\n",
" def __getitem__(self, item):\n",
" return self.x_train[item], self.y_train[item]"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "j8NgLj5KUU9P"
},
"source": [
"class BiLSTM(nn.Module):\n",
"\n",
" def __init__(self, embedding_dim, hidden_dim, vocab_size, batch_size, device):\n",
" super(BiLSTM, self).__init__()\n",
" self.hidden_dim = hidden_dim\n",
" self.embedding_dim = embedding_dim\n",
" self.device = device\n",
" self.batch_size = batch_size\n",
" self.embedding = nn.Embedding(vocab_size, embedding_dim, padding_idx=0)\n",
" \n",
" # The LSTM takes word embeddings as inputs, and outputs hidden states\n",
" # with dimensionality hidden_dim.\n",
" self.lstm = nn.LSTM(embedding_dim, hidden_dim, bidirectional=True, dropout=0.2) \n",
"\n",
" # The batch normalization layer that standardizes the inputs to a layer\n",
" # for each mini-batch\n",
" self.bn = nn.BatchNorm1d(hidden_dim * 2)\n",
"\n",
" # The linear layer that maps from hidden state space to tag space\n",
" self.hidden2label = nn.Linear(hidden_dim * 2, 1)\n",
" self.hidden = torch.zeros(2, self.batch_size, self.hidden_dim).to(self.device), \\\n",
" torch.zeros(2, self.batch_size, self.hidden_dim).to(self.device) \n",
"\n",
" # The activation layer that produces non-negative real outputs\n",
" self.activation = nn.ReLU(True)\n",
"\n",
" def forward(self, sentence):\n",
"\n",
" # Before we've done anything, we dont have any hidden state.\n",
" # Refer to the Pytorch documentation to see exactly why they have this dimensionality.\n",
" # The axes semantics are (num_layers * num_directions, minibatch_size, hidden_dim)\n",
" self.hidden = torch.zeros(2, self.batch_size, self.hidden_dim).to(self.device), \\\n",
" torch.zeros(2, self.batch_size, self.hidden_dim).to(self.device) \n",
"\n",
" embedded = self.embedding(sentence)\n",
" embedded = embedded.permute(1, 0, 2)\n",
"\n",
" lstm_out, self.hidden = self.lstm(\n",
" embedded.view(len(embedded), self.batch_size, self.embedding_dim), self.hidden)\n",
"\n",
" out = self.bn(lstm_out[-1])\n",
" out = self.hidden2label(out)\n",
" out = self.activation(out)\n",
"\n",
" # print(self.embedding_dim, self.hidden_dim, lstm_out.shape)\n",
"\n",
" return out"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "56jnJp8uiPn9"
},
"source": [
"\n",
"\n",
"Proposed model\n",
"1. Original sentences were changed by using edit words.\n",
"2. On the edited sentences, pre-trained word embedding model was implemented to obtain the high-quality distributed vector representation for our datasets.\n",
"3. Next, we apply the Bidirectional LSTMs (BiLSTMs) models to extract the higher level feature sequences with sequential information from the edited news headlines embedding.\n",
"4. We employ an encoder pre-trained by Google News word2vec model to encode each word into 300-dimensional feature vector. These features are then sent to a Bidirectional LSTM module.\n",
"5. Finally, the generated output feature sequences from Bidirectional LSTMs fed into the fully-connected prediction module to determine the prediction.\n",
"\n"
]
},
{
"cell_type": "code",
"metadata": {
"id": "ptoTJGg4xvAz"
},
"source": [
"## Data preprocessing\n",
"\n",
"# original sentences were changed by using edit words\n",
"train_df[\"edited\"] = train_df.apply(lambda x: re.sub(\"<.*/>\", f\"{x.edit}\", x.original), axis=1) \n",
"test_df[\"edited\"] = test_df.apply(lambda x: re.sub(\"<.*/>\", f\"{x.edit}\", x.original), axis=1)\n",
"\n",
"# make all edited lower case\n",
"train_df[\"edited\"] = train_df[\"edited\"].str.lower()\n",
"test_df[\"edited\"] = test_df[\"edited\"].str.lower()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Q7bRldAG3nd3",
"outputId": "a1b42b36-8c99-46f6-a0b3-0405623026e1"
},
"source": [
"# We set our training data and test data\n",
"training_data = train_df['edited']\n",
"test_data = test_df['edited']\n",
"\n",
"# Creating word vectors\n",
"training_vocab, training_tokenized_corpus = create_vocab(training_data)\n",
"test_vocab, test_tokenized_corpus = create_vocab(test_data)\n",
"\n",
"# Creating joint vocab from test and train:\n",
"joint_vocab, joint_tokenized_corpus = create_vocab(pd.concat([training_data, test_data]))\n",
"\n",
"print(\"Vocab created.\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Vocab created.\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "WP2vzdBY76tN",
"outputId": "de4c92dd-40b5-4eb9-9744-76fcba41e4f1"
},
"source": [
"# We create representations for our tokens\n",
"wvecs = [[0 for _ in range(100)]] # word vectors\n",
"word2idx = [(\"<pad>\", 0)] # word2index\n",
"idx2word = [(0, \"<pad>\")]\n",
"\n",
"# This is a large file, it will take a while to load in the memory!\n",
"with codecs.open('glove.6B.100d.txt', 'r','utf-8') as f:\n",
" index = 1\n",
" for line in f.readlines():\n",
" # Ignore the first line - first line typically contains vocab, dimensionality\n",
" if len(line.strip().split()) > 3:\n",
" word = line.strip().split()[0]\n",
" if word in joint_vocab:\n",
" (word, vec) = (word,\n",
" list(map(float,line.strip().split()[1:])))\n",
" wvecs.append(vec)\n",
" word2idx.append((word, index))\n",
" idx2word.append((index, word))\n",
" index += 1\n",
"\n",
"wvecs = np.array(wvecs)\n",
"word2idx = dict(word2idx)\n",
"idx2word = dict(idx2word)\n",
"\n",
"vectorized_seqs = [[word2idx[tok] for tok in seq if tok in word2idx] for seq in training_tokenized_corpus]\n",
"\n",
"# To avoid any sentences being empty (if no words match to our word embeddings)\n",
"vectorized_seqs = [x if len(x) > 0 else [0] for x in vectorized_seqs]\n",
"\n",
"print('Token representations created')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Token representations created\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "DM6wVjy9vf2X",
"outputId": "e5f87c7a-66dc-495f-a356-10c2b8ea0ce0"
},
"source": [
"# check the coverage of word2idx w.r.t. vocab\n",
"counter = 0\n",
"wordList = word2idx.keys()\n",
"for word in joint_vocab:\n",
" if word in wordList:\n",
" counter += 1\n",
" # else:\n",
" # print(word, len(word))\n",
"\n",
"print(f\"{ counter } / { len(joint_vocab) } of joint_vocab is in the word2idx\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"13853 / 14480 of joint_vocab is in the word2idx\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "CVGIhi8pUWTY",
"outputId": "e9ecbcf7-1d26-4bf7-9d2e-a2a7b86b4be5"
},
"source": [
"INPUT_DIM = len(word2idx)\n",
"EMBEDDING_DIM = 100\n",
"HIDDEN_DIM = 50\n",
"BATCH_SIZE = 128\n",
"lr = 5e-4\n",
"\n",
"model = BiLSTM(EMBEDDING_DIM, HIDDEN_DIM, INPUT_DIM, BATCH_SIZE, device)\n",
"print(\"Model initialised.\")\n",
"\n",
"model.to(device)\n",
"# We provide the model with our embeddings\n",
"model.embedding.weight.data.copy_(torch.from_numpy(wvecs))\n",
"\n",
"feature = vectorized_seqs\n",
"\n",
"# 'feature' is a list of lists, each containing embedding IDs for word tokens\n",
"# print(len(feature), len(train_df['meanGrade']), train_df['meanGrade'][0])\n",
"train_and_dev = Task1Dataset(feature, train_df['meanGrade'])\n",
"\n",
"train_examples = round(len(train_and_dev)*train_proportion)\n",
"dev_examples = len(train_and_dev) - train_examples\n",
"\n",
"train_dataset, dev_dataset = random_split(train_and_dev,\n",
" (train_examples,\n",
" dev_examples))\n",
"\n",
"train_loader = torch.utils.data.DataLoader(train_dataset, shuffle=True, batch_size=BATCH_SIZE, collate_fn=collate_fn_padd)\n",
"dev_loader = torch.utils.data.DataLoader(dev_dataset, batch_size=BATCH_SIZE, collate_fn=collate_fn_padd)\n",
"\n",
"print(\"Dataloaders created.\")\n",
"\n",
"loss_fn = nn.MSELoss()\n",
"loss_fn = loss_fn.to(device)\n",
"\n",
"optimizer = torch.optim.Adam(model.parameters(), lr=lr)\n",
"\n",
"train(train_loader, dev_loader, model, epochs)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"/usr/local/lib/python3.6/dist-packages/torch/nn/modules/rnn.py:61: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.2 and num_layers=1\n",
" \"num_layers={}\".format(dropout, num_layers))\n"
],
"name": "stderr"
},
{
"output_type": "stream",
"text": [
"Model initialised.\n",
"Dataloaders created.\n",
"Training model.\n",
"| Epoch: 01 | Train Loss: 0.74 | Train MSE: 0.74 | Train RMSE: 0.86 | Val. Loss: 0.50 | Val. MSE: 0.50 | Val. RMSE: 0.71 |\n",
"| Epoch: 02 | Train Loss: 0.49 | Train MSE: 0.49 | Train RMSE: 0.70 | Val. Loss: 0.49 | Val. MSE: 0.49 | Val. RMSE: 0.70 |\n",
"| Epoch: 03 | Train Loss: 0.43 | Train MSE: 0.43 | Train RMSE: 0.66 | Val. Loss: 0.42 | Val. MSE: 0.42 | Val. RMSE: 0.65 |\n",
"| Epoch: 04 | Train Loss: 0.39 | Train MSE: 0.39 | Train RMSE: 0.63 | Val. Loss: 0.39 | Val. MSE: 0.39 | Val. RMSE: 0.63 |\n",
"| Epoch: 05 | Train Loss: 0.35 | Train MSE: 0.35 | Train RMSE: 0.60 | Val. Loss: 0.37 | Val. MSE: 0.37 | Val. RMSE: 0.61 |\n",
"| Epoch: 06 | Train Loss: 0.31 | Train MSE: 0.31 | Train RMSE: 0.56 | Val. Loss: 0.37 | Val. MSE: 0.37 | Val. RMSE: 0.61 |\n",
"| Epoch: 07 | Train Loss: 0.27 | Train MSE: 0.27 | Train RMSE: 0.52 | Val. Loss: 0.37 | Val. MSE: 0.37 | Val. RMSE: 0.60 |\n",
"| Epoch: 08 | Train Loss: 0.24 | Train MSE: 0.24 | Train RMSE: 0.49 | Val. Loss: 0.38 | Val. MSE: 0.38 | Val. RMSE: 0.61 |\n",
"| Epoch: 09 | Train Loss: 0.22 | Train MSE: 0.22 | Train RMSE: 0.47 | Val. Loss: 0.38 | Val. MSE: 0.38 | Val. RMSE: 0.62 |\n",
"| Epoch: 10 | Train Loss: 0.20 | Train MSE: 0.20 | Train RMSE: 0.44 | Val. Loss: 0.43 | Val. MSE: 0.43 | Val. RMSE: 0.66 |\n",
"| Epoch: 11 | Train Loss: 0.18 | Train MSE: 0.18 | Train RMSE: 0.42 | Val. Loss: 0.44 | Val. MSE: 0.44 | Val. RMSE: 0.66 |\n",
"| Epoch: 12 | Train Loss: 0.16 | Train MSE: 0.16 | Train RMSE: 0.41 | Val. Loss: 0.43 | Val. MSE: 0.43 | Val. RMSE: 0.66 |\n",
"| Epoch: 13 | Train Loss: 0.16 | Train MSE: 0.16 | Train RMSE: 0.39 | Val. Loss: 0.42 | Val. MSE: 0.42 | Val. RMSE: 0.65 |\n",
"| Epoch: 14 | Train Loss: 0.14 | Train MSE: 0.14 | Train RMSE: 0.37 | Val. Loss: 0.43 | Val. MSE: 0.43 | Val. RMSE: 0.66 |\n",
"| Epoch: 15 | Train Loss: 0.13 | Train MSE: 0.13 | Train RMSE: 0.36 | Val. Loss: 0.42 | Val. MSE: 0.42 | Val. RMSE: 0.65 |\n",
"| Epoch: 16 | Train Loss: 0.13 | Train MSE: 0.13 | Train RMSE: 0.36 | Val. Loss: 0.46 | Val. MSE: 0.46 | Val. RMSE: 0.68 |\n",
"| Epoch: 17 | Train Loss: 0.12 | Train MSE: 0.12 | Train RMSE: 0.35 | Val. Loss: 0.44 | Val. MSE: 0.44 | Val. RMSE: 0.66 |\n",
"| Epoch: 18 | Train Loss: 0.11 | Train MSE: 0.11 | Train RMSE: 0.34 | Val. Loss: 0.47 | Val. MSE: 0.47 | Val. RMSE: 0.68 |\n",
"| Epoch: 19 | Train Loss: 0.11 | Train MSE: 0.11 | Train RMSE: 0.33 | Val. Loss: 0.49 | Val. MSE: 0.49 | Val. RMSE: 0.70 |\n",
"| Epoch: 20 | Train Loss: 0.11 | Train MSE: 0.11 | Train RMSE: 0.32 | Val. Loss: 0.49 | Val. MSE: 0.49 | Val. RMSE: 0.70 |\n",
"| Epoch: 21 | Train Loss: 0.10 | Train MSE: 0.10 | Train RMSE: 0.31 | Val. Loss: 0.48 | Val. MSE: 0.48 | Val. RMSE: 0.69 |\n",
"| Epoch: 22 | Train Loss: 0.10 | Train MSE: 0.10 | Train RMSE: 0.31 | Val. Loss: 0.51 | Val. MSE: 0.51 | Val. RMSE: 0.71 |\n",
"| Epoch: 23 | Train Loss: 0.09 | Train MSE: 0.09 | Train RMSE: 0.30 | Val. Loss: 0.51 | Val. MSE: 0.51 | Val. RMSE: 0.71 |\n",
"| Epoch: 24 | Train Loss: 0.09 | Train MSE: 0.09 | Train RMSE: 0.29 | Val. Loss: 0.51 | Val. MSE: 0.51 | Val. RMSE: 0.71 |\n",
"| Epoch: 25 | Train Loss: 0.09 | Train MSE: 0.09 | Train RMSE: 0.29 | Val. Loss: 0.55 | Val. MSE: 0.55 | Val. RMSE: 0.74 |\n",
"| Epoch: 26 | Train Loss: 0.08 | Train MSE: 0.08 | Train RMSE: 0.29 | Val. Loss: 0.53 | Val. MSE: 0.53 | Val. RMSE: 0.73 |\n",
"| Epoch: 27 | Train Loss: 0.08 | Train MSE: 0.08 | Train RMSE: 0.28 | Val. Loss: 0.53 | Val. MSE: 0.53 | Val. RMSE: 0.73 |\n",
"| Epoch: 28 | Train Loss: 0.07 | Train MSE: 0.07 | Train RMSE: 0.27 | Val. Loss: 0.52 | Val. MSE: 0.52 | Val. RMSE: 0.72 |\n",
"| Epoch: 29 | Train Loss: 0.07 | Train MSE: 0.07 | Train RMSE: 0.27 | Val. Loss: 0.55 | Val. MSE: 0.55 | Val. RMSE: 0.74 |\n",
"| Epoch: 30 | Train Loss: 0.07 | Train MSE: 0.07 | Train RMSE: 0.26 | Val. Loss: 0.55 | Val. MSE: 0.55 | Val. RMSE: 0.74 |\n",
"| Epoch: 31 | Train Loss: 0.07 | Train MSE: 0.07 | Train RMSE: 0.26 | Val. Loss: 0.54 | Val. MSE: 0.54 | Val. RMSE: 0.74 |\n",
"| Epoch: 32 | Train Loss: 0.06 | Train MSE: 0.06 | Train RMSE: 0.25 | Val. Loss: 0.55 | Val. MSE: 0.55 | Val. RMSE: 0.74 |\n",
"| Epoch: 33 | Train Loss: 0.06 | Train MSE: 0.06 | Train RMSE: 0.24 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 34 | Train Loss: 0.06 | Train MSE: 0.06 | Train RMSE: 0.25 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 35 | Train Loss: 0.06 | Train MSE: 0.06 | Train RMSE: 0.24 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 36 | Train Loss: 0.05 | Train MSE: 0.05 | Train RMSE: 0.23 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 37 | Train Loss: 0.05 | Train MSE: 0.05 | Train RMSE: 0.23 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 38 | Train Loss: 0.05 | Train MSE: 0.05 | Train RMSE: 0.23 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 39 | Train Loss: 0.05 | Train MSE: 0.05 | Train RMSE: 0.23 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 40 | Train Loss: 0.05 | Train MSE: 0.05 | Train RMSE: 0.22 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 41 | Train Loss: 0.04 | Train MSE: 0.04 | Train RMSE: 0.21 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.78 |\n",
"| Epoch: 42 | Train Loss: 0.04 | Train MSE: 0.04 | Train RMSE: 0.21 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 43 | Train Loss: 0.04 | Train MSE: 0.04 | Train RMSE: 0.20 | Val. Loss: 0.63 | Val. MSE: 0.63 | Val. RMSE: 0.79 |\n",
"| Epoch: 44 | Train Loss: 0.04 | Train MSE: 0.04 | Train RMSE: 0.21 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 45 | Train Loss: 0.04 | Train MSE: 0.04 | Train RMSE: 0.20 | Val. Loss: 0.64 | Val. MSE: 0.64 | Val. RMSE: 0.80 |\n",
"| Epoch: 46 | Train Loss: 0.04 | Train MSE: 0.04 | Train RMSE: 0.19 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 47 | Train Loss: 0.04 | Train MSE: 0.04 | Train RMSE: 0.19 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.77 |\n",
"| Epoch: 48 | Train Loss: 0.03 | Train MSE: 0.03 | Train RMSE: 0.19 | Val. Loss: 0.65 | Val. MSE: 0.65 | Val. RMSE: 0.80 |\n",
"| Epoch: 49 | Train Loss: 0.03 | Train MSE: 0.03 | Train RMSE: 0.18 | Val. Loss: 0.55 | Val. MSE: 0.55 | Val. RMSE: 0.74 |\n",
"| Epoch: 50 | Train Loss: 0.03 | Train MSE: 0.03 | Train RMSE: 0.17 | Val. Loss: 0.62 | Val. MSE: 0.62 | Val. RMSE: 0.79 |\n",
"| Epoch: 51 | Train Loss: 0.03 | Train MSE: 0.03 | Train RMSE: 0.17 | Val. Loss: 0.61 | Val. MSE: 0.61 | Val. RMSE: 0.78 |\n",
"| Epoch: 52 | Train Loss: 0.03 | Train MSE: 0.03 | Train RMSE: 0.16 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.77 |\n",
"| Epoch: 53 | Train Loss: 0.03 | Train MSE: 0.03 | Train RMSE: 0.16 | Val. Loss: 0.62 | Val. MSE: 0.62 | Val. RMSE: 0.79 |\n",
"| Epoch: 54 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.15 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.77 |\n",
"| Epoch: 55 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.15 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 56 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.14 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 57 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.15 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 58 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.15 | Val. Loss: 0.62 | Val. MSE: 0.62 | Val. RMSE: 0.79 |\n",
"| Epoch: 59 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.14 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 60 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.13 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 61 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.13 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.77 |\n",
"| Epoch: 62 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.12 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.78 |\n",
"| Epoch: 63 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.12 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.77 |\n",
"| Epoch: 64 | Train Loss: 0.02 | Train MSE: 0.02 | Train RMSE: 0.12 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 65 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.12 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 66 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.12 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 67 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.12 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 68 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.12 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 69 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.59 | Val. MSE: 0.59 | Val. RMSE: 0.77 |\n",
"| Epoch: 70 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.61 | Val. MSE: 0.61 | Val. RMSE: 0.78 |\n",
"| Epoch: 71 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 72 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.77 |\n",
"| Epoch: 73 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 74 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.60 | Val. MSE: 0.60 | Val. RMSE: 0.77 |\n",
"| Epoch: 75 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 76 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 77 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 78 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 79 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 80 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 81 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.11 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 82 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 83 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 84 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 85 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 86 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 87 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 88 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 89 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.75 |\n",
"| Epoch: 90 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 91 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.09 | Val. Loss: 0.54 | Val. MSE: 0.54 | Val. RMSE: 0.74 |\n",
"| Epoch: 92 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 93 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 94 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.57 | Val. MSE: 0.57 | Val. RMSE: 0.76 |\n",
"| Epoch: 95 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 96 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.58 | Val. MSE: 0.58 | Val. RMSE: 0.76 |\n",
"| Epoch: 97 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.09 | Val. Loss: 0.54 | Val. MSE: 0.54 | Val. RMSE: 0.74 |\n",
"| Epoch: 98 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.09 | Val. Loss: 0.54 | Val. MSE: 0.54 | Val. RMSE: 0.74 |\n",
"| Epoch: 99 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.09 | Val. Loss: 0.56 | Val. MSE: 0.56 | Val. RMSE: 0.75 |\n",
"| Epoch: 100 | Train Loss: 0.01 | Train MSE: 0.01 | Train RMSE: 0.10 | Val. Loss: 0.54 | Val. MSE: 0.54 | Val. RMSE: 0.73 |\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "prt72fOX6I7r"
},
"source": [
"##### Method 2: The BERT model"
]
},
{
"cell_type": "code",
"metadata": {
"id": "LRWFk-kelDoA",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "bf0dcc5b-8717-4464-c199-3649a840e885"
},
"source": [
"# You will need to download any word embeddings required for your code, e.g.:\n",
"\n",
"# !wget http://nlp.stanford.edu/data/glove.6B.zip\n",
"# !unzip glove.6B.zip\n",
"\n",
"# For any packages that Colab does not provide auotmatically you will also need to install these below, e.g.:\n",
"\n",
"!pip install torch transformers"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Requirement already satisfied: torch in /usr/local/lib/python3.7/dist-packages (1.7.1+cu101)\n",
"Collecting transformers\n",
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/f9/54/5ca07ec9569d2f232f3166de5457b63943882f7950ddfcc887732fc7fb23/transformers-4.3.3-py3-none-any.whl (1.9MB)\n",
"\u001b[K |████████████████████████████████| 1.9MB 11.9MB/s \n",
"\u001b[?25hRequirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from torch) (3.7.4.3)\n",
"Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from torch) (1.19.5)\n",
"Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.7/dist-packages (from transformers) (2019.12.20)\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.7/dist-packages (from transformers) (3.0.12)\n",
"Requirement already satisfied: importlib-metadata; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from transformers) (3.7.0)\n",
"Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.7/dist-packages (from transformers) (4.41.1)\n",
"Requirement already satisfied: packaging in /usr/local/lib/python3.7/dist-packages (from transformers) (20.9)\n",
"Collecting sacremoses\n",
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/7d/34/09d19aff26edcc8eb2a01bed8e98f13a1537005d31e95233fd48216eed10/sacremoses-0.0.43.tar.gz (883kB)\n",
"\u001b[K |████████████████████████████████| 890kB 55.1MB/s \n",
"\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from transformers) (2.23.0)\n",
"Collecting tokenizers<0.11,>=0.10.1\n",
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/71/23/2ddc317b2121117bf34dd00f5b0de194158f2a44ee2bf5e47c7166878a97/tokenizers-0.10.1-cp37-cp37m-manylinux2010_x86_64.whl (3.2MB)\n",
"\u001b[K |████████████████████████████████| 3.2MB 43.0MB/s \n",
"\u001b[?25hRequirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata; python_version < \"3.8\"->transformers) (3.4.0)\n",
"Requirement already satisfied: pyparsing>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from packaging->transformers) (2.4.7)\n",
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers) (1.15.0)\n",
"Requirement already satisfied: click in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers) (7.1.2)\n",
"Requirement already satisfied: joblib in /usr/local/lib/python3.7/dist-packages (from sacremoses->transformers) (1.0.1)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2020.12.5)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (1.24.3)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (3.0.4)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->transformers) (2.10)\n",
"Building wheels for collected packages: sacremoses\n",
" Building wheel for sacremoses (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for sacremoses: filename=sacremoses-0.0.43-cp37-none-any.whl size=893262 sha256=4e50a3290df9b6f3aabe2bc9a42ac57c4d12e7efd0a76a967f84f5bf5076a4d0\n",
" Stored in directory: /root/.cache/pip/wheels/29/3c/fd/7ce5c3f0666dab31a50123635e6fb5e19ceb42ce38d4e58f45\n",
"Successfully built sacremoses\n",
"Installing collected packages: sacremoses, tokenizers, transformers\n",
"Successfully installed sacremoses-0.0.43 tokenizers-0.10.1 transformers-4.3.3\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "WX9TqmK7lDoK"
},
"source": [
"# Imports\n",
"\n",
"import torch\n",
"import torch.nn as nn\n",
"import pandas as pd\n",
"import numpy as np\n",
"from sklearn.feature_extraction.text import CountVectorizer\n",
"from torch.utils.data import Dataset, random_split, DataLoader\n",
"from sklearn.feature_extraction.text import TfidfTransformer\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.linear_model import LinearRegression\n",
"import codecs\n",
"import re\n",
"from transformers import BertTokenizer\n",
"from transformers import BertForSequenceClassification"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "OhyPlbiN69oU",
"outputId": "c2b4d522-2ee9-4580-938e-b57d9b03681a"
},
"source": [
"from google.colab import drive\n",
"drive.mount('/content/drive')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Mounted at /content/drive\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "X09jt8VRlDoM"
},
"source": [
"# Setting random seed and device\n",
"SEED = 1\n",
"\n",
"torch.manual_seed(SEED)\n",
"torch.cuda.manual_seed(SEED)\n",
"torch.backends.cudnn.deterministic = True\n",
"\n",
"use_cuda = torch.cuda.is_available()\n",
"device = torch.device(\"cuda:0\" if use_cuda else \"cpu\")"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "AqhlzLl6lDoO"
},
"source": [
"# Load data\n",
"train_df = pd.read_csv('/content/drive/MyDrive/data/task-1/train.csv')\n",
"valid_df = pd.read_csv('/content/drive/MyDrive/data/task-1/dev.csv')\n",
"test_df = pd.read_csv('/content/drive/MyDrive/data/task-1/test.csv')\n",
"train_extra = pd.read_csv('/content/drive/MyDrive/data/task-1/train_funlines.csv')\n",
"train_df = pd.concat([train_df,train_extra], ignore_index=True)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "qAgZW6K1lDoR"
},
"source": [
"# We define our training loop\n",
"def train(train_iter, dev_iter, model, number_epoch):\n",
" \"\"\"\n",
" Training loop for the model, which calls on eval to evaluate after each epoch\n",
" \"\"\"\n",
"\n",
" \n",
" print(\"Training model.\")\n",
"\n",
" for epoch in range(1, number_epoch+1):\n",
"\n",
" model.train()\n",
" epoch_loss = 0\n",
" epoch_sse = 0\n",
" no_observations = 0 # Observations used for training so far\n",
"\n",
" for batch in train_iter:\n",
"\n",
" input, attention, token, target = batch\n",
"\n",
" input, attention, token, target = input.to(device), attention.to(device), token.to(device), target.to(device)\n",
"\n",
" no_observations = no_observations + target.shape[0]\n",
"\n",
" predictions = model(input, attention, token)[0].squeeze(1)\n",
"\n",
" optimizer.zero_grad()\n",
"\n",
" loss = loss_fn(predictions, target)\n",
"\n",
" sse, __ = model_performance(predictions.detach().cpu().numpy(), target.detach().cpu().numpy())\n",
"\n",
" loss.backward()\n",
" optimizer.step()\n",
" scheduler.step()\n",
"\n",
" epoch_loss += loss.item()*target.shape[0]\n",
" epoch_sse += sse\n",
"\n",
" valid_loss, valid_mse, __, __ = eval(dev_iter, model)\n",
"\n",
" epoch_loss, epoch_mse = epoch_loss / no_observations, epoch_sse / no_observations\n",
" print(f'| Epoch: {epoch:02} | Train Loss: {epoch_loss:.2f} | Train MSE: {epoch_mse:.2f} | Train RMSE: {epoch_mse**0.5:.4f} | \\\n",
" Val. Loss: {valid_loss:.2f} | Val. MSE: {valid_mse:.2f} | Val. RMSE: {valid_mse**0.5:.4f} |')"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "NzXeDgHmlDob"
},
"source": [
"# We evaluate performance on our dev set\n",
"def eval(data_iter, model):\n",
" \"\"\"\n",
" Evaluating model performance on the dev set\n",
" \"\"\"\n",
" model.eval()\n",
" epoch_loss = 0\n",
" epoch_sse = 0\n",
" pred_all = []\n",
" trg_all = []\n",
" no_observations = 0\n",
"\n",
" with torch.no_grad():\n",
" for batch in data_iter:\n",
" input, attention, token, target = batch\n",
"\n",
" input, attention, token, target = input.to(device), attention.to(device), token.to(device), target.to(device)\n",
"\n",
" no_observations = no_observations + target.shape[0]\n",
"\n",
" predictions = model(input, attention, token)[0].squeeze(1)\n",
" loss = loss_fn(predictions, target)\n",
"\n",
" # We get the mse\n",
" pred, trg = predictions.detach().cpu().numpy(), target.detach().cpu().numpy()\n",
" sse, __ = model_performance(pred, trg)\n",
"\n",
" epoch_loss += loss.item()*target.shape[0]\n",
" epoch_sse += sse\n",
" pred_all.extend(pred)\n",
" trg_all.extend(trg)\n",
"\n",
" return epoch_loss/no_observations, epoch_sse/no_observations, np.array(pred_all), np.array(trg_all)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "2_22fHHElDog"
},
"source": [
"# How we print the model performance\n",
"def model_performance(output, target, print_output=False):\n",
" \"\"\"\n",
" Returns SSE and MSE per batch (printing the MSE and the RMSE)\n",
" \"\"\"\n",
"\n",
" sq_error = (output - target)**2\n",
"\n",
" sse = np.sum(sq_error)\n",
" mse = np.mean(sq_error)\n",
" rmse = np.sqrt(mse)\n",
"\n",
" if print_output:\n",
" print(f'| MSE: {mse:.2f} | RMSE: {rmse:.2f} |')\n",
"\n",
" return sse, mse"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "jzQ0KLXslDoq"
},
"source": [
"class Task1Dataset(Dataset):\n",
"\n",
" def __init__(self, input, attention, token, labels):\n",
" self.len = input.shape[0]\n",
" self.x1_train = input.to(device)\n",
" self.x2_train = attention.to(device)\n",
" self.x3_train = token.to(device)\n",
" self.y_train = labels.to(device)\n",
"\n",
" def __len__(self):\n",
" return self.len\n",
"\n",
" def __getitem__(self, item):\n",
" return self.x1_train[item], self.x2_train[item], self.x3_train[item], self.y_train[item]"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 217,
"referenced_widgets": [
"fb7ab8f92b3b43f28bd5138c208402a1",
"5de0acfff7c64856adbdcbefefbc4588",
"2c8b7eb6c28a4afca6fcd93485debabc",
"95ed528d8aba48389a823838ab38972a",
"93546486b98042439ea7ee15f3bba751",
"310b5d3b53c5465db8b9be0444f5fca9",
"6c917c22f4da4af4821cd0b1e5834015",
"3f4fcf4523994ee0a2ddaaab37d5d2dc",
"37caa1edcff34aa4a87a1f0894dccd3c",
"b108ce4f6f6a459990031a87bb0f93a7",
"62f2507cde6e4314a383a7dd62007516",
"b57c266b9f254a6f87c0d4eaca1e0998",
"060e1083dba644bd99192d1233b30d7b",
"9f292af3107740ab917f8b38d96695f7",
"fcbbb36885d2422ba39300e96fbc1949",
"4a5ac5265eb041bc91ae00b9daa8eca8",
"b0ecf23eb0e8480a857ed2b4abe24345",
"85ed3d2717c1496496e5bafcad6ea007",
"81ecd670369746358383a15911a40b3d",
"9c551f51cb3643af87f6e398a014d2e5",
"c4baabb50e4b48c6a3384386c20674d8",
"3e81a213e4d64ae38067ec87b8e390a4",
"230187bfe3e644e887a8743aa9c4fdcd",
"9bebd45f500049d5b24a7cdb4de7a56a"
]
},
"id": "vYgIiDcgw97O",
"outputId": "1da8198d-b896-42e7-f443-5c1738de29b2"
},
"source": [
"from tqdm.auto import tqdm\n",
"tqdm.pandas()\n",
"\n",
"# preprocess headline, delete \"</>\" and extra space\n",
"\n",
"def preprocess(text):\n",
" text = text.strip()\n",
" text = text.replace(\"<\", \"\").replace(\"/>\", \"\")\n",
" text = \" \".join(text.split())\n",
" return text\n",
"\n",
"train_df[\"preprocess_headline\"] = train_df[\"original\"].progress_apply(preprocess)\n",
"valid_df[\"preprocess_headline\"] = valid_df[\"original\"].progress_apply(preprocess)\n",
"test_df[\"preprocess_headline\"] = test_df[\"original\"].progress_apply(preprocess)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"/usr/local/lib/python3.7/dist-packages/tqdm/std.py:658: FutureWarning: The Panel class is removed from pandas. Accessing it from the top-level namespace will also be removed in the next version\n",
" from pandas import Panel\n"
],
"name": "stderr"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "fb7ab8f92b3b43f28bd5138c208402a1",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=17900.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "37caa1edcff34aa4a87a1f0894dccd3c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "b0ecf23eb0e8480a857ed2b4abe24345",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 163,
"referenced_widgets": [
"9a2544bce4bb4732841f0398bfb19271",
"b45ed8b5b87d4d0db8dae5c7de5071eb",
"9751b09bb79e47338cd6ece722994a1d",
"35e54f163da94fc3b36b3fb7f0565b96",
"b14ed2862c0347179298888ffb225e4f",
"e736fc01fd15438a8ad4ce26760cad4f",
"317292518a3b4252ba38b92c90782d30",
"95ebc48214ae49afa9b7441f23f71a00",
"c32e5b404aeb4ca1bdccd4e0438568ca",
"88742b538d25486ca22a4f523e120b0f",
"ef2d2d15ba88499088c8493e4a8ca601",
"10e5d52be10245c7bae95bd7d1094650",
"67a0e71ef75a4bf5a1b3f4d88e318202",
"8c7bb227d31a4858a315f1ee3a62f025",
"1f41eff0073b4c9189f84f6e8303d7ac",
"32c896d895af4311b6199147a5e2979a",
"ca7ff2053a9e47a18b693634a1a430ad",
"a7e3e89ac8e74933b29df3cce2b4787f",
"474814c6cd8442c2a9149b564f45322b",
"c13202570b6643bfbe02f523036705fe",
"23a60351d9bd4b37a998d324dd263c69",
"16f92e9644b84a9aaec310b08e876c88",
"5f6f051141584804b5e5488d0096a3ae",
"6917a2c512e94593bfa32888661d4bfe"
]
},
"id": "5z9et1sXzrcJ",
"outputId": "912f7fe0-097a-42c3-cc89-fc77622a93be"
},
"source": [
"# preprocess new headline, delete \"</>\" and extra space\n",
"def preprocess_newhead(text, new_word):\n",
" text = text.strip()\n",
" p = re.compile(r'\\<(.*?)\\/\\>')\n",
" text = p.sub(new_word, text)\n",
" text = \" \".join(text.split())\n",
" return text\n",
"train_df[\"preprocess_new_headline\"] = train_df.progress_apply(lambda row:preprocess_newhead(row['original'],row['edit']), axis=1)\n",
"valid_df[\"preprocess_new_headline\"] = valid_df.progress_apply(lambda row:preprocess_newhead(row['original'],row['edit']), axis=1)\n",
"test_df[\"preprocess_new_headline\"] = test_df.progress_apply(lambda row:preprocess_newhead(row['original'],row['edit']), axis=1)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9a2544bce4bb4732841f0398bfb19271",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=17900.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c32e5b404aeb4ca1bdccd4e0438568ca",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ca7ff2053a9e47a18b693634a1a430ad",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 163,
"referenced_widgets": [
"85769bcddc1e451ca366c61fbb5d439d",
"c8c815119a2a4493b7b3d385207fd064",
"55c505172d274cf2ab288160de4b8861",
"12fa1e068a3c43aeafcd5bbc0ddb0de9",
"9636d523277b41d6be5e68626c5667bc",
"0fd2218814ab42f48d6e411356377d69",
"fb93b11fac994683986f1b2af0bfbe1a",
"242a92286abf41a79578ed9d8a4b0c53",
"c422586570024ab69e3214e1ccbe155c",
"44694e94b72b462a97f7d2c2ca53c880",
"6e502243d98744b98b6ab8f4e48cd9f9",
"5296fad4a68b4373be282d50e6a69b39",
"41c73d88e4f54f5a9de25a868697f3b1",
"43344abe1af94c918b97b2ad5f56e9b3",
"55517d84885648b09dcf3685f4768f0e",
"57b8e03fe77c47fe998d1ba9fcb169d4",
"6232e4acf16746a18d88f01c10c01ecd",
"2624760a74d740d9aa98e5b996ba8c88",
"9ef6fa07e84c4de5af3a3030c4800a42",
"0d53032bb4f2401d9f169141b089ce8d",
"848e1e4b974e40bd9e212a1bfba0d09e",
"32e9287356074bc29f606408c19675ca",
"67ca232763a140a3bfdeb8406f6b119a",
"a7bc64aba0c14b66a6f61f5548b51e06"
]
},
"id": "ExbXSH84qL9U",
"outputId": "cc9cbfc1-9617-47ff-a942-d8b5b08522b3"
},
"source": [
"# preprocess edited word, delete extra space\n",
"def preprocess_new_word(text):\n",
" # text = text.lower()\n",
" text = text.strip()\n",
" text = \" \".join(text.split())\n",
" return text\n",
"\n",
"train_df[\"preprocess_edit\"] = train_df[\"edit\"].progress_apply(preprocess_new_word)\n",
"valid_df[\"preprocess_edit\"] = valid_df[\"edit\"].progress_apply(preprocess_new_word)\n",
"test_df[\"preprocess_edit\"] = test_df[\"edit\"].progress_apply(preprocess_new_word)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "85769bcddc1e451ca366c61fbb5d439d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=17900.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c422586570024ab69e3214e1ccbe155c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6232e4acf16746a18d88f01c10c01ecd",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "XFKjCf855pBv"
},
"source": [
"# get original headline, new headline, new word and original word\n",
"train_o_headlines = train_df[\"preprocess_headline\"].tolist()\n",
"train_n_headlines = train_df[\"preprocess_new_headline\"].tolist()\n",
"train_n_word = train_df[\"preprocess_edit\"].tolist()\n",
"train_labels_l = train_df[\"meanGrade\"].tolist()\n",
"\n",
"valid_o_headlines = valid_df[\"preprocess_headline\"].tolist()\n",
"valid_n_headlines = valid_df[\"preprocess_new_headline\"].tolist()\n",
"valid_n_word = valid_df[\"preprocess_edit\"].tolist()\n",
"valid_labels_l = valid_df[\"meanGrade\"].tolist()\n",
"\n",
"test_o_headlines = test_df[\"preprocess_headline\"].tolist()\n",
"test_n_headlines = test_df[\"preprocess_new_headline\"].tolist()\n",
"test_n_word = test_df[\"preprocess_edit\"].tolist()\n",
"test_labels_l = test_df[\"meanGrade\"].tolist()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "cHpFaqrv9ZGT"
},
"source": [
"# Initialize tokenizer\n",
"\n",
"tokenizer = BertTokenizer.from_pretrained('bert-base-uncased', do_lower_case=True)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "rIrt3gOR9ox6"
},
"source": [
"# get encoded inputs, and we choose concatenating original headlines and new headlines\n",
"train_encoded_inputs = tokenizer(train_o_headlines, train_n_headlines, padding='max_length', max_length=70, truncation=True, return_tensors=\"pt\")\n",
"valid_encoded_inputs = tokenizer(valid_o_headlines, valid_n_headlines, padding='max_length', max_length=70, truncation=True, return_tensors=\"pt\")\n",
"test_encoded_inputs = tokenizer(test_o_headlines, test_n_headlines, padding='max_length', max_length=70, truncation=True, return_tensors=\"pt\")"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "yVTmd79BZJz8",
"outputId": "13b25194-91cf-423c-8175-a03cc04a5b73"
},
"source": [
"# get input_id, attention_mask, token_type_id and labels(MeanGrades)\n",
"train_input_ids = train_encoded_inputs['input_ids']\n",
"train_attention_mask = train_encoded_inputs['attention_mask']\n",
"train_token_type_ids = train_encoded_inputs['token_type_ids']\n",
"train_labels = torch.Tensor(train_labels_l)\n",
"\n",
"valid_input_ids = valid_encoded_inputs['input_ids']\n",
"valid_attention_mask = valid_encoded_inputs['attention_mask']\n",
"valid_token_type_ids = valid_encoded_inputs['token_type_ids']\n",
"valid_labels = torch.Tensor(valid_labels_l)\n",
"\n",
"test_input_ids = test_encoded_inputs['input_ids']\n",
"test_attention_mask = test_encoded_inputs['attention_mask']\n",
"test_token_type_ids = test_encoded_inputs['token_type_ids']\n",
"test_labels = torch.Tensor(test_labels_l)\n",
"\n",
"print(tokenizer.decode(train_input_ids.tolist()[0]))"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"[CLS] france is hunting down its citizens who joined isis without trial in iraq [SEP] france is hunting down its citizens who joined twins without trial in iraq [SEP] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD] [PAD]\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "pIuE_v89iCUW"
},
"source": [
"# Get Dataset\n",
"batch = 16\n",
"train_dataset = Task1Dataset(train_input_ids, train_attention_mask, train_token_type_ids, train_labels)\n",
"valid_dataset = Task1Dataset(valid_input_ids, valid_attention_mask, valid_token_type_ids, valid_labels)\n",
"test_dataset = Task1Dataset(test_input_ids, test_attention_mask, test_token_type_ids, test_labels)\n",
"\n",
"train_dataloader = DataLoader(train_dataset, batch_size=batch, shuffle=True)\n",
"valid_dataloader = DataLoader(valid_dataset, batch_size=batch, shuffle=True)\n",
"test_dataloader = DataLoader(test_dataset, batch_size=batch, shuffle=True)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "smcSFYqWzCcY"
},
"source": [
"# Number of epochs\n",
"epochs = 1"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "mNx3lT3GiRmL",
"outputId": "bd168285-a458-48ef-c8c2-9d5c06fb4e7b"
},
"source": [
"# Training\n",
"model = BertForSequenceClassification.from_pretrained(\"bert-base-uncased\",num_labels = 1,output_attentions = False,output_hidden_states = False)\n",
"model.to(device)\n",
"\n",
"loss_fn = nn.MSELoss()\n",
"loss_fn = loss_fn.to(device)\n",
"\n",
"optimizer = torch.optim.AdamW(model.parameters(), lr = 3e-5, eps = 1e-8)\n",
"\n",
"from transformers import get_linear_schedule_with_warmup\n",
"\n",
"scheduler = get_linear_schedule_with_warmup(optimizer,num_warmup_steps = 0.1, num_training_steps = len(train_dataloader) * 8)\n",
"\n",
"train(train_dataloader, valid_dataloader, model, epochs)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForSequenceClassification: ['cls.predictions.bias', 'cls.predictions.transform.dense.weight', 'cls.predictions.transform.dense.bias', 'cls.predictions.decoder.weight', 'cls.seq_relationship.weight', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.predictions.transform.LayerNorm.bias']\n",
"- This IS expected if you are initializing BertForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
"- This IS NOT expected if you are initializing BertForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
"Some weights of BertForSequenceClassification were not initialized from the model checkpoint at bert-base-uncased and are newly initialized: ['classifier.weight', 'classifier.bias']\n",
"You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
],
"name": "stderr"
},
{
"output_type": "stream",
"text": [
"Training model.\n",
"| Epoch: 01 | Train Loss: 0.35 | Train MSE: 0.35 | Train RMSE: 0.5912 | Val. Loss: 0.28 | Val. MSE: 0.28 | Val. RMSE: 0.5256 |\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Yk5tcKdZg_KZ",
"outputId": "1471b185-252a-401a-99a7-a4285969f2c3"
},
"source": [
"# Test RMSE LOSS\n",
"model.eval()\n",
"\n",
"test_input_ids = test_input_ids.to(device)\n",
"test_attention_mask = test_attention_mask.to(device)\n",
"test_token_type_ids = test_token_type_ids.to(device)\n",
"test_labels = test_labels.to(device)\n",
"\n",
"with torch.no_grad():\n",
" test_predictions = model(test_input_ids,\n",
" test_attention_mask,\n",
" test_token_type_ids)[0].squeeze(1)\n",
" test_loss = torch.sqrt(((test_predictions - test_labels)**2).mean()).item()\n",
"\n",
"print(f'| Test Loss: {test_loss:.5f} |')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"| Test Loss: 0.53059 |\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "rdeFaoc3lDpK"
},
"source": [
"#### Approach 2: No pre-trained representations"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "4XWzutwLM09r"
},
"source": [
"##### Method1: Word2Vec+SpaCy+Regression"
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "fVsYg8JzO3Qn",
"outputId": "c8ceabc1-293a-4414-d94a-b845409da2e7"
},
"source": [
"!pip install torch spacy"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Requirement already satisfied: torch in /usr/local/lib/python3.7/dist-packages (1.7.1+cu101)\n",
"Requirement already satisfied: spacy in /usr/local/lib/python3.7/dist-packages (2.2.4)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from torch) (3.7.4.3)\n",
"Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from torch) (1.19.5)\n",
"Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /usr/local/lib/python3.7/dist-packages (from spacy) (4.41.1)\n",
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.7/dist-packages (from spacy) (1.0.5)\n",
"Requirement already satisfied: thinc==7.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy) (7.4.0)\n",
"Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy) (0.8.2)\n",
"Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from spacy) (54.0.0)\n",
"Requirement already satisfied: plac<1.2.0,>=0.9.6 in /usr/local/lib/python3.7/dist-packages (from spacy) (1.1.3)\n",
"Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in /usr/local/lib/python3.7/dist-packages (from spacy) (1.0.0)\n",
"Requirement already satisfied: blis<0.5.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy) (0.4.1)\n",
"Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/local/lib/python3.7/dist-packages (from spacy) (2.23.0)\n",
"Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy) (3.0.5)\n",
"Requirement already satisfied: srsly<1.1.0,>=1.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy) (1.0.5)\n",
"Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy) (2.0.5)\n",
"Requirement already satisfied: importlib-metadata>=0.20; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from catalogue<1.1.0,>=0.0.7->spacy) (3.7.0)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy) (3.0.4)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy) (2020.12.5)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy) (1.24.3)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy) (2.10)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=0.20; python_version < \"3.8\"->catalogue<1.1.0,>=0.0.7->spacy) (3.4.0)\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "omOx4sGzFPan"
},
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import nltk\n",
"import spacy\n",
"import gensim.models.keyedvectors as word2vec\n",
"import re\n",
"\n",
"from sklearn.model_selection import GridSearchCV\n",
"from sklearn.model_selection import PredefinedSplit\n",
"from sklearn.linear_model import LinearRegression, Lasso, Ridge\n",
"from sklearn.neural_network import MLPRegressor\n",
"from sklearn.metrics import mean_squared_error\n",
"\n",
"import warnings\n",
"warnings.filterwarnings(\"ignore\")\n",
"\n",
"import gensim\n",
"import logging\n",
"import multiprocessing\n",
"\n",
"from tqdm.auto import tqdm\n",
"tqdm.pandas()"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "pE7oGt6U5f4N",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "56ac2752-9665-4e99-a6a9-52b569dbd059"
},
"source": [
"from google.colab import drive\n",
"drive.mount('/content/drive')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Mounted at /content/drive\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "9NWDbJTZO3Qn"
},
"source": [
"# Load data\n",
"train_df = pd.read_csv('/content/drive/MyDrive/data/task-1/train.csv')\n",
"valid_df = pd.read_csv('/content/drive/MyDrive/data/task-1/dev.csv')\n",
"test_df = pd.read_csv('/content/drive/MyDrive/data/task-1/test.csv')\n",
"# train_extra = pd.read_csv('/content/drive/MyDrive/data/task-1/train_funlines.csv')\n",
"# train_df = pd.concat([train_df,train_extra], ignore_index=True)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NYscdomUO3Qo",
"outputId": "556acb52-0c38-4506-9bc4-d60ffcc046f9"
},
"source": [
"# get stopwords\n",
"import nltk\n",
"nltk.download('stopwords')"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"[nltk_data] Downloading package stopwords to /root/nltk_data...\n",
"[nltk_data] Unzipping corpora/stopwords.zip.\n"
],
"name": "stdout"
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"True"
]
},
"metadata": {
"tags": []
},
"execution_count": 6
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 163,
"referenced_widgets": [
"c719f3872c6f4223ad7fdaee113e4291",
"4f9847e35cef474d856c2cbb9dfa7268",
"2672c8ef681f4ff29441dbea671638c4",
"55b159e44ed642bcb4e05ead62bf9e3f",
"b495afa1a4994e019bc01b1a55ac7e79",
"2f99be63ef734347bb473c240f8060b6",
"9192007e2ce642f28ca14ee3b0ff16e7",
"0971568d3ea54ebbb13f2f644d8f9fac",
"3880bab1f7c141c2ab45abbbdf9d345c",
"6c739a52458a464594c392e56f54915f",
"1d88d016f2ed4cfd8677f4991af46eea",
"3e8e7997c39e4e6789deffdd95502507",
"c07c751a7a3544d09b784420b426f47e",
"6b2f79dcf1cf40f18a03508b72128d05",
"9074f2532c164381b24ba63b838c2580",
"f0423b2a6b2746c39778b5f60c1c75b0",
"ada504e14cf1465580eac065354347c5",
"1bf8000489d74e6a8f1d143636a7c9c5",
"f72506989e0d41fd8655ee46c5b50273",
"aea004652c90444183d47f57a7dc568e",
"3db59eeab421411e86b42647e8308eda",
"390bd0733171490e87aad73fb23628ea",
"079ef7f7823842c98a3da9e2b3fab5e3",
"35aa302e1ed349ada317db14a4a1cd18"
]
},
"id": "KGVOc5TfO3Qo",
"outputId": "f462b00d-b514-4c76-a9b5-ac3ef5feeaf6"
},
"source": [
"## preprocess original headlines\n",
"# we remove all the punctuation in the headlines, replace abbreviations, \n",
"# remove all the nonalphabetic symbols using regular expression \n",
"# and also use lowercase except for the initials and proprietary nouns.\n",
"\n",
"STOP_WORDS = set(nltk.corpus.stopwords.words('english'))\n",
"\n",
"def preprocess(text):\n",
" # text = text.lower()\n",
" text = text.strip()\n",
" text = text.replace(\"<\", \"\").replace(\"/>\", \"\")\n",
" text = text.replace(\"\", \"'\")\n",
" text = text.replace(\"'s\", \"is\").replace(\"'ve\", \"have\").replace(\"'m\", \"am\").replace(\"'re\", \"are\").replace(\"n't\",\"not\")\n",
" # tokens = word_tokenize(text)\n",
" # tagged_sent = pos_tag(tokens)\n",
" # wnl = WordNetLemmatizer()\n",
" # lemmas_sent = []\n",
" # for tag in tagged_sent:\n",
" # wordnet_pos = get_wordnet_pos(tag[1]) or wordnet.NOUN\n",
" # lemmas_sent.append(wnl.lemmatize(tag[0], pos=wordnet_pos))\n",
" # text = \" \".join(lemmas_sent)\n",
" for w in text.split(\" \"):\n",
" if not w.isalpha():\n",
" text = text.replace(w, \"\")\n",
" text = \" \".join(text.split())\n",
" if all([w[0].isupper() for w in text.split(\" \") if w not in STOP_WORDS]):\n",
" text = text.lower()\n",
" text = text[0].upper() + text[1:]\n",
" \n",
" return text\n",
"\n",
"train_df[\"preprocess_headline\"] = train_df[\"original\"].progress_apply(preprocess)\n",
"valid_df[\"preprocess_headline\"] = valid_df[\"original\"].progress_apply(preprocess)\n",
"test_df[\"preprocess_headline\"] = test_df[\"original\"].progress_apply(preprocess)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c719f3872c6f4223ad7fdaee113e4291",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=9652.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3880bab1f7c141c2ab45abbbdf9d345c",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ada504e14cf1465580eac065354347c5",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 163,
"referenced_widgets": [
"9ce8b489eeca4919a4032912499435b7",
"ad73c85ef1a34d0087a78db58d871eca",
"55acfb75de9146b8aaea0dc32b81e241",
"3afc37c3648a459993ccd3aad4b56b3d",
"3a7f69d694284de8b3e238c869a456c0",
"d3fd38187c774a5ea0aacea3cb6db7dd",
"48178f583ab5464992315328824aebdb",
"693f5e940fa54db0906e48555f9c4703",
"60f8a46357e9484f924694016ce29f25",
"0c0ac965324a485abe79a0ff044901a5",
"acd35d5fb6d94b9db14a83185dba0bde",
"2d27a0fbdb074992812e75026c5b04ea",
"e8b0037011be4734ab295913ddebb6bc",
"ed6ba17e403e4461b528bec2d94882c4",
"3a3ad69d365646e4989e30b5cb6ed4b6",
"6d780643efb34a378cb87c0da9706a01",
"2701f80ba2d447b79965d682fc2099af",
"5d5b0df776404b63983ed61ec96a4e67",
"a7ac838c70fc4057a1e6a9bfae5fff8f",
"2df4a6fde8744f5ca23a0a5b59cfb953",
"8dba55c7147a4055bf5d47aa69bce1ae",
"fc6737d10a3946bf8b9721275a9659cc",
"5a95df4e174b409da85eeefc5dc99186",
"e6c5684603df48f0bbfc772387acf466"
]
},
"id": "7ROLnfw2owAO",
"outputId": "64ab4856-489f-43ca-9548-697162020fc1"
},
"source": [
"# preprocess new headlines\n",
"import re\n",
"def new_head(text, new_word):\n",
" p = re.compile(r'\\<(.*?)\\/\\>')\n",
" text = p.sub(new_word, text)\n",
" text = text.replace(\"\", \"'\")\n",
" text = text.replace(\"'s\", \"is\").replace(\"'ve\", \"have\").replace(\"'m\", \"am\").replace(\"'re\", \"are\").replace(\"n't\",\"not\")\n",
" for w in text.split(\" \"):\n",
" if not w.isalpha():\n",
" text = text.replace(w, \"\")\n",
" text = \" \".join(text.split())\n",
" if all([w[0].isupper() for w in text.split(\" \") if w not in STOP_WORDS]):\n",
" text = text.lower()\n",
" text = text[0].upper() + text[1:]\n",
" return text\n",
"train_df[\"new_headline\"] = train_df.progress_apply(lambda row:new_head(row['original'],row['edit']), axis=1)\n",
"valid_df[\"new_headline\"] = valid_df.progress_apply(lambda row:new_head(row['original'],row['edit']), axis=1)\n",
"test_df[\"new_headline\"] = test_df.progress_apply(lambda row:new_head(row['original'],row['edit']), axis=1)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9ce8b489eeca4919a4032912499435b7",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=9652.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "60f8a46357e9484f924694016ce29f25",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2701f80ba2d447b79965d682fc2099af",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 163,
"referenced_widgets": [
"f67c9ec20c984f8bbc26bf9091db6c2e",
"56129e463f4c407da8e4838d33338878",
"5d2e8b829c0b4edabee472b385c47fb1",
"3fcdd90cb1d94f13ad1acf0943c3aa28",
"9e55bb22b54f4d5da13e77dc2956fc84",
"89a76f0941164c8d94cba4ac168a741c",
"5eb5a30ee73b4fe7884975607683febd",
"72a0260f739248e0a6a3a63fa9633117",
"925d7fc46db14c8d844ed0b4bfc5122e",
"22a18a9764d74574889907894fc8e7a8",
"9c98fcbff3b149e09014a1a348778c2f",
"e9c727997bb44dcdb07f26a609fca05b",
"7819e9f179184fee9d1713d47ff0c1ef",
"db2776394c474899aba71b6fb279a318",
"15a44a0fee374cccbce43fa95651e85c",
"99a33054e9a8402cbc617bcca7550e83",
"009ef0a2be4c43929de0337d0d2a46dd",
"940513bb59dd48b987a7b56658805910",
"f7b20cb9a9e14f52bfba6fd250e8a4f5",
"7959042cc9d04a5a98d052fb7e2ea18f",
"2f3c5bc5e0cc47c5946fbd1ea2234164",
"c1075cd52534457eb7f282ea9a0cef68",
"159e97124ec14f9ebf3db5bb3fc946b7",
"0e78d1b1dbf94a9e9ff9b3bc9ffa928e"
]
},
"id": "1e2ZrSF9O3Qp",
"outputId": "2c20186b-d178-4e2e-d559-01df864a42a8"
},
"source": [
"# preprocess new word\n",
"def preprocess_new_word(text):\n",
" text = text.lower()\n",
" text = text.strip()\n",
" text = \" \".join(text.split())\n",
" return text\n",
"\n",
"train_df[\"preprocess_edit\"] = train_df[\"edit\"].progress_apply(preprocess_new_word)\n",
"valid_df[\"preprocess_edit\"] = valid_df[\"edit\"].progress_apply(preprocess_new_word)\n",
"test_df[\"preprocess_edit\"] = test_df[\"edit\"].progress_apply(preprocess_new_word)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f67c9ec20c984f8bbc26bf9091db6c2e",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=9652.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "925d7fc46db14c8d844ed0b4bfc5122e",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "009ef0a2be4c43929de0337d0d2a46dd",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 163,
"referenced_widgets": [
"f168db82456a4f5fb60f2272e1b9d77f",
"de1d57596eb0456dac05aff94719efb7",
"96a6cf6497e14d6eb4ab319b98ac2470",
"51ef0907a32f44e9b227cdb3f7ac6aa4",
"c3ae145a5d53430da665466639bd28df",
"409e48749980469992cbac892c0809e6",
"10e7571bdd5d48dd927f3455c6e68c03",
"bffec8ba1e1a4e31b38c723dce999507",
"a1d35e41ec1746819672429292a59cb1",
"f9da7f0dde8740008209f2d8607cd66b",
"96bb18d1964e440bab3cdfcf3ac939e1",
"654cedfe9fbf45c99370a637342a6236",
"704d43e9656042d7888c3bf0bd40d61f",
"74976b41142f4c7a8829168181134362",
"a24e57ec876d4ec68b0a1c7e22d03cb8",
"0a29d5ce95db42d7ae1b9c5ffb3147af",
"481b6d080c3c487bbb1ee20fa16f02fc",
"da9834e43f5d469087ff651ffb2a5c69",
"c74d94df4e6e4c46a8981c8e2d1af496",
"fe598781b0d04e109b646873979453d1",
"ac93fb29e9e34ef2a8726df5707dfaf9",
"729cfe48bca34392859e7133b60d62aa",
"900f8a8387574019b0d38e76c4499d25",
"91f77dc16420406b94534d2775f41823"
]
},
"id": "j6ivRGoVTHdb",
"outputId": "4fdb05a2-9bcf-487d-de7b-4765a65cb85f"
},
"source": [
"# Get original word\n",
"def get_original_word(headline):\n",
" start = \"<\"\n",
" end = \"/>\"\n",
" original_word = headline[(headline.index(start)+len(start)):headline.index(end)].strip().lower()\n",
" return original_word\n",
"\n",
"train_df[\"original_word\"] = train_df[\"original\"].progress_apply(get_original_word)\n",
"valid_df[\"original_word\"] = valid_df[\"original\"].progress_apply(get_original_word)\n",
"test_df[\"original_word\"] = test_df[\"original\"].progress_apply(get_original_word)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f168db82456a4f5fb60f2272e1b9d77f",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=9652.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a1d35e41ec1746819672429292a59cb1",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "481b6d080c3c487bbb1ee20fa16f02fc",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "jb_5FGOcO3Qp",
"outputId": "4f3696c4-ed58-4127-8bcf-7caec2b0e351"
},
"source": [
"!python -m spacy download en_core_web_md"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"Collecting en_core_web_md==2.2.5\n",
"\u001b[?25l Downloading https://github.com/explosion/spacy-models/releases/download/en_core_web_md-2.2.5/en_core_web_md-2.2.5.tar.gz (96.4MB)\n",
"\u001b[K |████████████████████████████████| 96.4MB 1.2MB/s \n",
"\u001b[?25hRequirement already satisfied: spacy>=2.2.2 in /usr/local/lib/python3.7/dist-packages (from en_core_web_md==2.2.5) (2.2.4)\n",
"Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (0.8.2)\n",
"Requirement already satisfied: numpy>=1.15.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (1.19.5)\n",
"Requirement already satisfied: tqdm<5.0.0,>=4.38.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (4.41.1)\n",
"Requirement already satisfied: preshed<3.1.0,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (3.0.5)\n",
"Requirement already satisfied: cymem<2.1.0,>=2.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (2.0.5)\n",
"Requirement already satisfied: blis<0.5.0,>=0.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (0.4.1)\n",
"Requirement already satisfied: srsly<1.1.0,>=1.0.2 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (1.0.5)\n",
"Requirement already satisfied: thinc==7.4.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (7.4.0)\n",
"Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (1.0.5)\n",
"Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (54.0.0)\n",
"Requirement already satisfied: plac<1.2.0,>=0.9.6 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (1.1.3)\n",
"Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (2.23.0)\n",
"Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in /usr/local/lib/python3.7/dist-packages (from spacy>=2.2.2->en_core_web_md==2.2.5) (1.0.0)\n",
"Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy>=2.2.2->en_core_web_md==2.2.5) (3.0.4)\n",
"Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy>=2.2.2->en_core_web_md==2.2.5) (1.24.3)\n",
"Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy>=2.2.2->en_core_web_md==2.2.5) (2.10)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests<3.0.0,>=2.13.0->spacy>=2.2.2->en_core_web_md==2.2.5) (2020.12.5)\n",
"Requirement already satisfied: importlib-metadata>=0.20; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from catalogue<1.1.0,>=0.0.7->spacy>=2.2.2->en_core_web_md==2.2.5) (3.7.0)\n",
"Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=0.20; python_version < \"3.8\"->catalogue<1.1.0,>=0.0.7->spacy>=2.2.2->en_core_web_md==2.2.5) (3.4.0)\n",
"Requirement already satisfied: typing-extensions>=3.6.4; python_version < \"3.8\" in /usr/local/lib/python3.7/dist-packages (from importlib-metadata>=0.20; python_version < \"3.8\"->catalogue<1.1.0,>=0.0.7->spacy>=2.2.2->en_core_web_md==2.2.5) (3.7.4.3)\n",
"Building wheels for collected packages: en-core-web-md\n",
" Building wheel for en-core-web-md (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Created wheel for en-core-web-md: filename=en_core_web_md-2.2.5-cp37-none-any.whl size=98051305 sha256=228817a03969c987c4c964b0c3a59fb32140e855b111b8435dd2b2c63750559c\n",
" Stored in directory: /tmp/pip-ephem-wheel-cache-beb_704_/wheels/df/94/ad/f5cf59224cea6b5686ac4fd1ad19c8a07bc026e13c36502d81\n",
"Successfully built en-core-web-md\n",
"Installing collected packages: en-core-web-md\n",
"Successfully installed en-core-web-md-2.2.5\n",
"\u001b[38;5;2m✔ Download and installation successful\u001b[0m\n",
"You can now load the model via spacy.load('en_core_web_md')\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 163,
"referenced_widgets": [
"e060975523ca49d4a356077d3762c517",
"24d69c068bd14fcd82cd3fa09093d401",
"99ad4be035904ff386d28c573853de15",
"64348d43f5a643c8af6a28177056b896",
"970a98017f5c4dec83966f462bdd974d",
"51b5fc663dc542a3b3c90f6be1eeedde",
"8e886ee3ecac4ffe9cf20fcb68ac5805",
"1f2abb15508347bd9fa8649de314e841",
"c339b9b6569d41b8b9fa4880409dc96f",
"019daac1d6a647ee8ace133bf463566e",
"189e926466a24000a391387182fb7ce4",
"25e6a7531d654c4b9d3bf52d248a14b9",
"6d1adf88dd6f4615a2876b8f06ed5825",
"bcb96faf50184f23882c9bd471d824e6",
"9f0b5349531f48bab97f1e46e2ef8e7a",
"625b596d84f846b39ae42ca6fa36c8e9",
"272e61064c8c4641a38efb295dbb6de4",
"edc4aa87d9cb48c3b10c48a7510ccc93",
"a7c9dcf92eaa4ed289e01a2432018e3f",
"473de5a955994744a33ae7f21b797fb4",
"57d754ace91549dd8feb6da3b90e5371",
"b0c6a78d94474680a50e4248b9dc8176",
"6b8afcc36cba4070969f250fc8f428ab",
"6c25eaabf1504effaa62a146225492e2"
]
},
"id": "mDY6r9VLO3Qq",
"outputId": "d6c5bcfb-4f94-40e9-c886-90c1bec78c71"
},
"source": [
"# Using Spacy\n",
"import en_core_web_md\n",
"class EntityRetokenizeComponent:\n",
" def __init__(self, pipeline):\n",
" pass\n",
" \n",
" def __call__(self, doc):\n",
" with doc.retokenize() as retokenizer:\n",
" for ent in doc.ents:\n",
" retokenizer.merge(doc[ent.start:ent.end], attrs={\"LEMMA\": str(doc[ent.start:ent.end])})\n",
" return doc\n",
"\n",
"spacy_pipeline = en_core_web_md.load()\n",
"retokenizer = EntityRetokenizeComponent(spacy_pipeline) \n",
"spacy_pipeline.add_pipe(retokenizer, name='merge_enitities', last=True)\n",
"\n",
"train_df[\"headline_spacy\"] = train_df[\"preprocess_headline\"].progress_apply(spacy_pipeline)\n",
"valid_df[\"headline_spacy\"] = valid_df[\"preprocess_headline\"].progress_apply(spacy_pipeline)\n",
"test_df[\"headline_spacy\"] = test_df[\"preprocess_headline\"].progress_apply(spacy_pipeline)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e060975523ca49d4a356077d3762c517",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=9652.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c339b9b6569d41b8b9fa4880409dc96f",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "272e61064c8c4641a38efb295dbb6de4",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "cDuWGFmzdsyl"
},
"source": [
"# Change sentences to lists\n",
"def get_text(list):\n",
" s = []\n",
" for i in list:\n",
" i = re.sub(r\"\\s*[^A-Za-z]+\\s*\", \" \", i)\n",
" t = i.split( )\n",
" s.append(t)\n",
" return s\n",
" "
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "Arl0meggFVAn"
},
"source": [
"# train word2vec\n",
"train_headlines = train_df[\"preprocess_headline\"].tolist() + train_df[\"new_headline\"].tolist() + valid_df[\"preprocess_headline\"].tolist() + valid_df[\"new_headline\"].tolist() + test_df[\"preprocess_headline\"].tolist() + test_df[\"new_headline\"].tolist()\n",
"text = get_text(train_headlines)\n",
"model = gensim.models.Word2Vec(text, size=20, window=10, min_count=4, workers=multiprocessing.cpu_count())"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "pZQgqmIRnfhA"
},
"source": [
"# save model\n",
"model.wv.save_word2vec_format(\"/content/drive/MyDrive/data/task-1/word2vec_gensim_bin3\",binary = True)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "NHY5-FscmogG"
},
"source": [
"# get vocab\n",
"w2v_path = f\"/content/drive/MyDrive/data/task-1/word2vec_gensim_bin3\"\n",
"w2v = word2vec.KeyedVectors.load_word2vec_format(w2v_path, binary=True)\n",
"vocab = set(w2v.vocab)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 163,
"referenced_widgets": [
"9793357558c641db8216f46c9006992f",
"b49819801760481c9253bb1efc1acaf5",
"62e644c133214056947de95a7f7c0c32",
"dac7e46d76c740d49e71d8e0f53d0114",
"d19ad0aea9584da5afbec71ab51bda47",
"65e37e9145094f2287d6af7d02964f0a",
"82a5de8e64564c1386ac7d682ec97077",
"06c8887a15ac48a09b0f7c5a4ce593fe",
"aa72c950c7664b9b894b687acc6feb1a",
"2d4d7338ccec4b0a800f890bd1ee8eb1",
"13cd981138034ee8a859f5b2dfa865fc",
"7f903610319f447aa2271d3defb9aa06",
"332d3a959b4b420a9d54ba7abd7061c2",
"23002ede7f8f4089a496ae2da0aa8591",
"8cde5d980d8a47578f64d77329855a07",
"18febe41046143109cf8fb1097e28e8a",
"6ffde14d4869484eaafcfc566791bf74",
"3b28ee0fd91143718b61223793ceb361",
"69f75bafa9814eb6b1f4cb00f398996d",
"4ace7d82386c4bf7a01c42adffb5c9f1",
"35140046ee40410b936055e182d83095",
"f76de61f7daa4e8e9ac111d96a9aa7f5",
"a78f32c53e9f4293b247cbafc84e1eaa",
"bc1cc4f4e8c7435e958a1b941f1b0c21"
]
},
"id": "tZ9I9y4WnGZ2",
"outputId": "ebd32a69-bd75-47fa-a607-68e6c24b764e"
},
"source": [
"# get tokens\n",
"def tokenize(spacy):\n",
" tokens = []\n",
" for word in spacy.doc:\n",
" w = str(word)\n",
" if spacy_pipeline.vocab[word.text.lower()].is_stop: continue\n",
" if w in vocab:\n",
" tokens.append(w)\n",
" else:\n",
" capitalized_word = \" \".join([x.capitalize() for x in w.split(\" \")])\n",
" if capitalized_word in vocab:\n",
" tokens.append(capitalized_word)\n",
" else:\n",
" w = w.lower()\n",
" if w in vocab:\n",
" tokens.append(w)\n",
" \n",
" return tokens\n",
"\n",
"train_df[\"headline_tokens\"] = train_df[\"headline_spacy\"].progress_apply(tokenize)\n",
"valid_df[\"headline_tokens\"] = valid_df[\"headline_spacy\"].progress_apply(tokenize)\n",
"test_df[\"headline_tokens\"] = test_df[\"headline_spacy\"].progress_apply(tokenize)"
],
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9793357558c641db8216f46c9006992f",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=9652.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "aa72c950c7664b9b894b687acc6feb1a",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=2419.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
},
{
"output_type": "display_data",
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "6ffde14d4869484eaafcfc566791bf74",
"version_minor": 0,
"version_major": 2
},
"text/plain": [
"HBox(children=(FloatProgress(value=0.0, max=3024.0), HTML(value='')))"
]
},
"metadata": {
"tags": []
}
},
{
"output_type": "stream",
"text": [
"\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "QPE8wbLRn-CX"
},
"source": [
"# get labels\n",
"y_train = train_df[\"meanGrade\"]\n",
"y_valid = valid_df[\"meanGrade\"]\n",
"y_test = test_df[\"meanGrade\"]"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "XCMHvBCVoEix"
},
"source": [
"# get average vector\n",
"vecs = []\n",
"for i, tokens in enumerate(train_df[\"headline_tokens\"]):\n",
" for token in tokens:\n",
" if token in w2v.vocab:\n",
" vec = w2v[token]\n",
" vecs.append(vec)\n",
"avg_vec = np.nanmean(vecs, axis=0)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "OEAJUFfaoHwd"
},
"source": [
"# concatenate the average vectors of the headlines, \n",
"# the vector of the edited word, \n",
"# and the original word as the feature vectors.\n",
"\n",
"def get_concat(df):\n",
" feature1 = np.zeros((len(df), 20))\n",
" feature2 = np.zeros((len(df), 20))\n",
" feature3 = np.zeros((len(df), 20))\n",
" \n",
" for i, tokens in enumerate(df[\"headline_tokens\"]):\n",
" vecs = []\n",
" for token in tokens:\n",
" if token in w2v.vocab:\n",
" vec = w2v[token]\n",
" vecs.append(vec)\n",
" if len(vecs) == 0:\n",
" vecs.append(np.zeros(20))\n",
" feature1[i,:] = np.mean(vecs, axis=0)\n",
" \n",
" for i, token in enumerate(df[\"original_word\"]):\n",
" if token in w2v.vocab:\n",
" feature2[i,:] = w2v[token]\n",
" else:\n",
" feature2[i,:] = avg_vec\n",
" \n",
" for i, token in enumerate(df[\"preprocess_edit\"]):\n",
" if token in w2v.vocab:\n",
" feature3[i,:] = w2v[token]\n",
" else:\n",
" feature3[i,:] = avg_vec\n",
" \n",
" return np.concatenate((feature1, feature2, feature3), axis=1)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "gBd81YSpoWyN"
},
"source": [
"#get vector\n",
"x_train = get_concat(train_df)\n",
"x_valid = get_concat(valid_df)\n",
"x_test = get_concat(test_df)"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "_ZxgJVzGohF9",
"outputId": "f6770a2b-fb53-4021-faec-6c9d89061446"
},
"source": [
"# Linear regression\n",
"regressor = LinearRegression(normalize=True)\n",
"regressor.fit(x_train, y_train)\n",
"y_pred_v = regressor.predict(x_valid)\n",
"print(f\"|Valid. RMSE error: {np.sqrt(mean_squared_error(y_valid, y_pred_v))}|\")\n",
"y_pred_t = regressor.predict(x_test)\n",
"print(f\"|Test RMSE error: {np.sqrt(mean_squared_error(y_test, y_pred_t))}|\")"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"|Valid. RMSE error: 0.5715549311058523|\n",
"|Test RMSE error: 0.566636362185281|\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "zL_DZNlPokwP",
"outputId": "c79f1c55-66f8-4db6-ccab-10624fc1b5e3"
},
"source": [
"# Ridge\n",
"regressor = Ridge(alpha=0.1, normalize = True, tol=1)\n",
"regressor.fit(x_train, y_train)\n",
"y_pred_v = regressor.predict(x_valid)\n",
"print(f\"|Valid. RMSE error: {np.sqrt(mean_squared_error(y_valid, y_pred_v))}|\")\n",
"y_pred_t = regressor.predict(x_test)\n",
"print(f\"|Test RMSE error: {np.sqrt(mean_squared_error(y_test, y_pred_t))}|\")\n",
"\n",
"\n",
"df_pred = pd.DataFrame({\n",
" \"id\": test_df[\"id\"],\n",
" \"pred\": y_pred_t\n",
"})\n",
"df_pred.to_csv(f\"task-1-output.csv\", index=False)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"|Valid. RMSE error: 0.5698993044642675|\n",
"|Test RMSE error: 0.5651532891228751|\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "2zwMY3nqMaZu"
},
"source": [
"##### Method2: Use UnionFeature to do feature extraction and Ridge Regression"
]
},
{
"cell_type": "code",
"metadata": {
"id": "1bwJdEykNBF3"
},
"source": [
"# How we print the model performance\n",
"def model_performance(output, target, print_output=False):\n",
" \"\"\"\n",
" Returns SSE and MSE per batch (printing the MSE and the RMSE)\n",
" \"\"\"\n",
"\n",
" sq_error = (output - target)**2\n",
"\n",
" sse = np.sum(sq_error)\n",
" mse = np.mean(sq_error)\n",
" rmse = np.sqrt(mse)\n",
"\n",
" if print_output:\n",
" print(f'| MSE: {mse:.2f} | RMSE: {rmse:.2f} |')\n",
"\n",
" return sse, mse"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "1MS5xG1XNw6J"
},
"source": [
"# Proportion of training data for train compared to dev\n",
"train_proportion = 0.8"
],
"execution_count": null,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "YHPOfQUVMZ-7",
"outputId": "b0f97f9d-bdda-4b8e-8490-bf7327965110"
},
"source": [
"import spacy\n",
"from sklearn.decomposition import PCA, TruncatedSVD, SparsePCA\n",
"from sklearn.pipeline import Pipeline, FeatureUnion\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.feature_extraction.text import CountVectorizer\n",
"from sklearn.feature_extraction.text import TfidfTransformer\n",
"tokenizer = spacy.load(\"en_core_web_sm\")\n",
"\n",
"def spacy_tokenize(text):\n",
" return [x.text for x in tokenizer(text)]\n",
"\n",
"train_and_dev = train_df['edit']\n",
"\n",
"training_data, dev_data, training_y, dev_y = train_test_split(train_df['edit'], train_df['meanGrade'],\n",
" test_size=(1-train_proportion),\n",
" random_state=42)\n",
"\n",
"count_vect = CountVectorizer(stop_words='english', tokenizer=spacy_tokenize)\n",
"train_counts = count_vect.fit_transform(training_data)\n",
"\n",
"pca = SparsePCA(n_components=2)\n",
"svd = TruncatedSVD(n_components=2)\n",
"# svd = TruncatedSVD()\n",
"tfidf = TfidfTransformer()\n",
"# pca.fit(training_data)\n",
"\n",
"combined_features = FeatureUnion([('svd', svd), ('tfidf', tfidf)])\n",
"\n",
"x_features = combined_features.fit(train_counts, training_y).transform(train_counts)\n",
"\n",
"regression_model = Ridge().fit(x_features, training_y)\n",
"\n",
"# Train predictions\n",
"predicted_train = regression_model.predict(x_features)\n",
"\n",
"\n",
"# Calculate Tf-idf using train and dev, and validate model on dev:\n",
"test_and_test_counts = count_vect.transform(train_and_dev)\n",
"transformer = TfidfTransformer().fit(test_and_test_counts)\n",
"\n",
"test_counts = count_vect.transform(dev_data)\n",
"test_features = combined_features.fit(test_counts, dev_y).transform(test_counts)\n",
"\n",
"# Dev predictions\n",
"predicted = regression_model.predict(test_features)\n",
"\n",
"# We run the evaluation:\n",
"print(\"\\nTrain performance:\")\n",
"sse, mse = model_performance(predicted_train, training_y, True)\n",
"\n",
"print(\"\\nDev performance:\")\n",
"sse, mse = model_performance(predicted, dev_y, True)"
],
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"text": [
"\n",
"Train performance:\n",
"| MSE: 0.17 | RMSE: 0.41 |\n",
"\n",
"Dev performance:\n",
"| MSE: 0.32 | RMSE: 0.57 |\n"
],
"name": "stdout"
}
]
}
]
}