{"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.12.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"widgets":{"application/vnd.jupyter.widget-state+json":{"state":{"008c8556917a445596c6f917fea1e411":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"02aebf6760d2414ea43952d2e71a2533":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"0675a2c05614405cbece6e85a23bd6c2":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"0f187e65712c45d49a55f35db267c8e2":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_64a0a46f5c964dcc8664625730e8b585","placeholder":"​","style":"IPY_MODEL_608d11bb66b3498daac010cee4beba7d","tabbable":null,"tooltip":null,"value":" 50000/50000 [00:00&lt;00:00, 56431.74it/s]"}},"1538d58eff0e4ec8acc9a99ccc401632":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"1bbe405bfda745b5b1612c23947a7f7d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"1c24f2f5c6154ae09394ad8ba5b270fa":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_82bb39a40edc47699285925d16db0382","placeholder":"​","style":"IPY_MODEL_fa1319cc704f4a05ab268c0f6bba9ec1","tabbable":null,"tooltip":null,"value":" 75481/75481 [00:01&lt;00:00, 47478.66it/s]"}},"1e1c593d41db49a08e535ed2bc8eb8ce":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"1e734913bd3f4fa7a2b362a96e2b0e20":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2434d7d55c4f472191884846f196a7da":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2b687b8f6c3a43058c86b212c257f05e":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2f8f4b61e0bb4cb2812af0165796da9a":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"32a4b2b86a524d4596fdaaf49ba47c20":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_dd3fcb78af794b95917d3a8c8277a2c1","IPY_MODEL_b591d81e02bb4da79e5e141bb9ee7bb4","IPY_MODEL_c439fd3db1c24276a18fa5bd58fd3d32"],"layout":"IPY_MODEL_f8ae8ecfb78f4659813a0c3e297b3a65","tabbable":null,"tooltip":null}},"35d34800073949f5843a0f8edeab76e7":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_d8173f11194d4265bcda483d9d47934d","placeholder":"​","style":"IPY_MODEL_4116503947ce4c838ede0113ca6d9f81","tabbable":null,"tooltip":null,"value":"100%"}},"4116503947ce4c838ede0113ca6d9f81":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"45c444d78dd44fcabd2809d40806e907":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"4c88cdff4d474a3da41c0577aea54f3a":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_8ac9e979218f43d596bbc500264fa70d","placeholder":"​","style":"IPY_MODEL_d9f34d37b6b04659bca25de1df08653b","tabbable":null,"tooltip":null,"value":"100%"}},"4d67f2791a8c4c44b4bc352ddb0bc87d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_79218e08f3bd4810b3fc0d4363454ca0","placeholder":"​","style":"IPY_MODEL_e80f6aa05eb94c609156d4915a14114a","tabbable":null,"tooltip":null,"value":"100%"}},"51803471308a47dcbb88bacfddf25dc4":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"5473c6d83e47469a843ccfc5339907e3":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_88b3a869f91447cd810708306b1265cc","placeholder":"​","style":"IPY_MODEL_d12fa1c4c6ba4fb48c0181e6aa560c54","tabbable":null,"tooltip":null,"value":" 75481/75481 [00:01&lt;00:00, 29265.79it/s]"}},"583508cd901249048e9f6adbedc3ea07":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_fc43f6a973bc49c094b66c46444a8739","max":75481,"min":0,"orientation":"horizontal","style":"IPY_MODEL_951771dc083d41b197457af6876e753e","tabbable":null,"tooltip":null,"value":75481}},"5c4e5c48f4ec45acb4569230bea9da91":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"5c73cc649c3347c29e65bec0a6830941":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_d5984f0329b04540aad02f6f91b3ca92","max":75481,"min":0,"orientation":"horizontal","style":"IPY_MODEL_f56572a1b1e8446484c5bdafa946a1fd","tabbable":null,"tooltip":null,"value":75481}},"5d249be9cacf4ab68c098787bec989ac":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"5ddf79e6e3a441ac9682cd04c39c4246":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"608d11bb66b3498daac010cee4beba7d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"64a0a46f5c964dcc8664625730e8b585":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"65220db9ce904e99bd8c85531fbcff1d":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"6528086db3c041098fd30aa018031b3e":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"6609eb7d65624f6fb8f338d15b0e14e9":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_5c4e5c48f4ec45acb4569230bea9da91","placeholder":"​","style":"IPY_MODEL_73285082f1e74e408b2ce48925b8db31","tabbable":null,"tooltip":null,"value":" 75481/75481 [00:01&lt;00:00, 43001.98it/s]"}},"6712370f2e45409da5ddffb1a20b6081":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"67b4459694304840b6f6e1f24bbf65d8":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"70ff07141b8242d4af01831824709194":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_008c8556917a445596c6f917fea1e411","placeholder":"​","style":"IPY_MODEL_a370b6689b314b77b21408e4cd75b8b0","tabbable":null,"tooltip":null,"value":"100%"}},"73285082f1e74e408b2ce48925b8db31":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"775409dc538e430c809adbe9210b21a2":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"79218e08f3bd4810b3fc0d4363454ca0":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7a0521b632da423eaf1cca4388646b0d":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"7adf86c05b8649ccaa18854e573ecd9a":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_ee8903a2677b4cafae94e75ecf44e986","IPY_MODEL_ada5dda1773442498dafa046c0fd148d","IPY_MODEL_dfa51a350094496db2889f3aff4afff0"],"layout":"IPY_MODEL_85c3be91711e45a79d80fb5cc7b609ec","tabbable":null,"tooltip":null}},"7dd5f4b3088d4409a9d1696de4cfafcd":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"82bb39a40edc47699285925d16db0382":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"85c3be91711e45a79d80fb5cc7b609ec":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"88b3a869f91447cd810708306b1265cc":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"8ac9e979218f43d596bbc500264fa70d":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"917dde0a383d43729650aacfd5139dfe":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"951771dc083d41b197457af6876e753e":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"9bc36d0f5258407fa40472ea00ce2c31":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_c974ecbba7754c4a9b5c2f8138fafbc1","max":75481,"min":0,"orientation":"horizontal","style":"IPY_MODEL_5ddf79e6e3a441ac9682cd04c39c4246","tabbable":null,"tooltip":null,"value":75481}},"9cc5cd46442443d89935d26ca70f09b0":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"9f80c7eb07504483b6cdcd2761babde7":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"a053e456bd734a3393a0e63968d5ec3b":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_1e734913bd3f4fa7a2b362a96e2b0e20","max":50000,"min":0,"orientation":"horizontal","style":"IPY_MODEL_0675a2c05614405cbece6e85a23bd6c2","tabbable":null,"tooltip":null,"value":50000}},"a370b6689b314b77b21408e4cd75b8b0":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"ada5dda1773442498dafa046c0fd148d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_1538d58eff0e4ec8acc9a99ccc401632","max":75481,"min":0,"orientation":"horizontal","style":"IPY_MODEL_917dde0a383d43729650aacfd5139dfe","tabbable":null,"tooltip":null,"value":75481}},"af825d3b47984be6945296555d747498":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_eeaf5d8c4e204fa1825fe3bc6f95e61d","IPY_MODEL_cefa39fa85ca4e2f84ab34de36b7bd24","IPY_MODEL_6609eb7d65624f6fb8f338d15b0e14e9"],"layout":"IPY_MODEL_2f8f4b61e0bb4cb2812af0165796da9a","tabbable":null,"tooltip":null}},"b09bdab7b9df4451a87d2ebc8a6bee0c":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_35d34800073949f5843a0f8edeab76e7","IPY_MODEL_9bc36d0f5258407fa40472ea00ce2c31","IPY_MODEL_1c24f2f5c6154ae09394ad8ba5b270fa"],"layout":"IPY_MODEL_775409dc538e430c809adbe9210b21a2","tabbable":null,"tooltip":null}},"b41fc0766ade415a9d9d2ee812343e71":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b591d81e02bb4da79e5e141bb9ee7bb4":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_2b687b8f6c3a43058c86b212c257f05e","max":50000,"min":0,"orientation":"horizontal","style":"IPY_MODEL_1bbe405bfda745b5b1612c23947a7f7d","tabbable":null,"tooltip":null,"value":50000}},"b7588bdd38464c538bf05ecc97301fbe":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b999890523144b6889484d5621f3ff12":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c3cc7de1d2784bf5ba58c38f1bba3a5d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_67b4459694304840b6f6e1f24bbf65d8","max":75481,"min":0,"orientation":"horizontal","style":"IPY_MODEL_5d249be9cacf4ab68c098787bec989ac","tabbable":null,"tooltip":null,"value":75481}},"c439fd3db1c24276a18fa5bd58fd3d32":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_6528086db3c041098fd30aa018031b3e","placeholder":"​","style":"IPY_MODEL_6712370f2e45409da5ddffb1a20b6081","tabbable":null,"tooltip":null,"value":" 50000/50000 [00:00&lt;00:00, 55084.51it/s]"}},"c974ecbba7754c4a9b5c2f8138fafbc1":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"ca1fe5e88c834c26bd789512e641c0c4":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_70ff07141b8242d4af01831824709194","IPY_MODEL_c3cc7de1d2784bf5ba58c38f1bba3a5d","IPY_MODEL_dc224afb4fce40d8b570d4d041b2b248"],"layout":"IPY_MODEL_e4139d37528d42b5b5446331b8fb237b","tabbable":null,"tooltip":null}},"cefa39fa85ca4e2f84ab34de36b7bd24":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_65220db9ce904e99bd8c85531fbcff1d","max":75481,"min":0,"orientation":"horizontal","style":"IPY_MODEL_d16bd759d8714e6984dc6589cab97e71","tabbable":null,"tooltip":null,"value":75481}},"cf094af5e9834a068ad5d4f0d4aacd74":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_b999890523144b6889484d5621f3ff12","placeholder":"​","style":"IPY_MODEL_e92b1c88aff94ab399db11e749eebe90","tabbable":null,"tooltip":null,"value":"100%"}},"d12fa1c4c6ba4fb48c0181e6aa560c54":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"d16bd759d8714e6984dc6589cab97e71":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"d424a0ef4ac84314a8966d1a07914ac5":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_4c88cdff4d474a3da41c0577aea54f3a","IPY_MODEL_5c73cc649c3347c29e65bec0a6830941","IPY_MODEL_d91b9500025e4eceb187b841fc60bc20"],"layout":"IPY_MODEL_9f80c7eb07504483b6cdcd2761babde7","tabbable":null,"tooltip":null}},"d5984f0329b04540aad02f6f91b3ca92":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"d6d51f79eec24f6391e2051921df1ae1":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"d74ee8d0c9864c2b947a9ffa5c9f4b54":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"d8173f11194d4265bcda483d9d47934d":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"d91b9500025e4eceb187b841fc60bc20":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_2434d7d55c4f472191884846f196a7da","placeholder":"​","style":"IPY_MODEL_d74ee8d0c9864c2b947a9ffa5c9f4b54","tabbable":null,"tooltip":null,"value":" 75481/75481 [00:01&lt;00:00, 46613.51it/s]"}},"d9f34d37b6b04659bca25de1df08653b":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"dc224afb4fce40d8b570d4d041b2b248":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_1e1c593d41db49a08e535ed2bc8eb8ce","placeholder":"​","style":"IPY_MODEL_45c444d78dd44fcabd2809d40806e907","tabbable":null,"tooltip":null,"value":" 75481/75481 [00:01&lt;00:00, 43550.59it/s]"}},"dd3fcb78af794b95917d3a8c8277a2c1":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_7dd5f4b3088d4409a9d1696de4cfafcd","placeholder":"​","style":"IPY_MODEL_02aebf6760d2414ea43952d2e71a2533","tabbable":null,"tooltip":null,"value":"100%"}},"dd7ec6bcb78f477f9ad6cf868d6b41e1":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"de58120ef55248509db34fbf04435865":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"dfa51a350094496db2889f3aff4afff0":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_de58120ef55248509db34fbf04435865","placeholder":"​","style":"IPY_MODEL_9cc5cd46442443d89935d26ca70f09b0","tabbable":null,"tooltip":null,"value":" 75481/75481 [00:01&lt;00:00, 47522.75it/s]"}},"e4139d37528d42b5b5446331b8fb237b":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"e80f6aa05eb94c609156d4915a14114a":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"e92b1c88aff94ab399db11e749eebe90":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"ee8903a2677b4cafae94e75ecf44e986":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_d6d51f79eec24f6391e2051921df1ae1","placeholder":"​","style":"IPY_MODEL_dd7ec6bcb78f477f9ad6cf868d6b41e1","tabbable":null,"tooltip":null,"value":"100%"}},"eeaf5d8c4e204fa1825fe3bc6f95e61d":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_b41fc0766ade415a9d9d2ee812343e71","placeholder":"​","style":"IPY_MODEL_51803471308a47dcbb88bacfddf25dc4","tabbable":null,"tooltip":null,"value":"100%"}},"f43cddac4cfa415ca28cf6ce71f0d7dc":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_4d67f2791a8c4c44b4bc352ddb0bc87d","IPY_MODEL_583508cd901249048e9f6adbedc3ea07","IPY_MODEL_5473c6d83e47469a843ccfc5339907e3"],"layout":"IPY_MODEL_b7588bdd38464c538bf05ecc97301fbe","tabbable":null,"tooltip":null}},"f56572a1b1e8446484c5bdafa946a1fd":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"f8ae8ecfb78f4659813a0c3e297b3a65":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"fa1319cc704f4a05ab268c0f6bba9ec1":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"fc43f6a973bc49c094b66c46444a8739":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":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,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"feac0c1675274b09989f3e58e42e35f9":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_cf094af5e9834a068ad5d4f0d4aacd74","IPY_MODEL_a053e456bd734a3393a0e63968d5ec3b","IPY_MODEL_0f187e65712c45d49a55f35db267c8e2"],"layout":"IPY_MODEL_7a0521b632da423eaf1cca4388646b0d","tabbable":null,"tooltip":null}}},"version_major":2,"version_minor":0}}},"nbformat_minor":4,"nbformat":4,"cells":[{"id":"1e8d1671","cell_type":"markdown","source":"# H&M Personalized Fashion Recommendations - Kaggle Submission Notebook\n\nThis notebook is competition-focused and produces a valid submission at `/kaggle/working/submission.csv`.\n\nEnd-to-end flow:\n1. Load competition data with memory-aware settings.\n2. Build leakage-safe temporal validation.\n3. Train ranking weights on offline MAP@12.\n4. Generate test recommendations for all customers.\n5. Save submission in Kaggle format.\n","metadata":{}},{"id":"d55381a2","cell_type":"code","source":"import math\nimport random\nfrom collections import defaultdict\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nfrom tqdm.auto import tqdm\n\nrandom.seed(42)\nnp.random.seed(42)\n\npd.set_option('display.max_columns', 120)\n","metadata":{"execution":{"iopub.status.busy":"2026-06-12T14:47:01.896001Z","iopub.execute_input":"2026-06-12T14:47:01.896342Z","iopub.status.idle":"2026-06-12T14:47:03.125687Z","shell.execute_reply.started":"2026-06-12T14:47:01.896313Z","shell.execute_reply":"2026-06-12T14:47:03.124782Z"},"trusted":true},"outputs":[],"execution_count":null},{"id":"d09a00a1","cell_type":"code","source":"CANDIDATE_ROOTS = [\n    Path('/kaggle/input/competitions/h-and-m-personalized-fashion-recommendations'),\n    Path('/kaggle/input/h-and-m-personalized-fashion-recommendations'),\n    Path.cwd() / 'data' / 'raw',\n]\nDATA_ROOT = next((p for p in CANDIDATE_ROOTS if p.exists()), None)\nassert DATA_ROOT is not None, 'H&M dataset root not found.'\n\nARTICLES_PATH = DATA_ROOT / 'articles.csv'\nCUSTOMERS_PATH = DATA_ROOT / 'customers.csv'\nTRANSACTIONS_PATH = DATA_ROOT / 'transactions_train.csv'\nSAMPLE_SUB_PATH = DATA_ROOT / 'sample_submission.csv'\n\nfor p in [ARTICLES_PATH, CUSTOMERS_PATH, TRANSACTIONS_PATH, SAMPLE_SUB_PATH]:\n    assert p.exists(), f'Missing required path: {p}'\n\nWORK_DIR = Path('/kaggle/working') if Path('/kaggle/working').exists() else Path.cwd()\nWORK_DIR.mkdir(parents=True, exist_ok=True)\n\nprint(f'DATA_ROOT: {DATA_ROOT}')\nprint(f'WORK_DIR: {WORK_DIR}')\n","metadata":{"execution":{"iopub.status.busy":"2026-06-12T14:47:03.127996Z","iopub.execute_input":"2026-06-12T14:47:03.128676Z","iopub.status.idle":"2026-06-12T14:47:03.141340Z","shell.execute_reply.started":"2026-06-12T14:47:03.128632Z","shell.execute_reply":"2026-06-12T14:47:03.140475Z"},"trusted":true},"outputs":[],"execution_count":null},{"id":"cbdb6c13","cell_type":"code","source":"articles = pd.read_csv(\n    ARTICLES_PATH,\n    usecols=['article_id', 'product_type_no', 'graphical_appearance_no', 'colour_group_code', 'section_no', 'garment_group_no'],\n    dtype={\n        'article_id': 'int32',\n        'product_type_no': 'int16',\n        'graphical_appearance_no': 'int16',\n        'colour_group_code': 'int16',\n        'section_no': 'int16',\n        'garment_group_no': 'int16',\n    },\n)\n\ncustomers = pd.read_csv(\n    CUSTOMERS_PATH,\n    usecols=['customer_id', 'age'],\n    dtype={'customer_id': 'string', 'age': 'float32'},\n)\n\ntransactions = pd.read_csv(\n    TRANSACTIONS_PATH,\n    usecols=['t_dat', 'customer_id', 'article_id', 'price', 'sales_channel_id'],\n    parse_dates=['t_dat'],\n    dtype={\n        'customer_id': 'string',\n        'article_id': 'int32',\n        'price': 'float32',\n        'sales_channel_id': 'int8',\n    },\n)\n\nsample_submission = pd.read_csv(SAMPLE_SUB_PATH, dtype={'customer_id': 'string'})\n\ncustomers['age'] = pd.to_numeric(customers['age'], errors='coerce')\ncustomers['age_bin'] = (customers['age'] // 5 * 5).astype('float32')\n\nprint('articles:', articles.shape)\nprint('customers:', customers.shape)\nprint('transactions:', transactions.shape)\nprint('sample_submission:', sample_submission.shape)\nprint('date range:', transactions['t_dat'].min(), 'to', transactions['t_dat'].max())\n\nIS_KAGGLE = Path('/kaggle').exists()\nif not IS_KAGGLE:\n    transactions = transactions.sort_values('t_dat').tail(3_000_000).copy()\n    sample_submission = sample_submission.head(100000).copy()\n    print('Local dry-run mode enabled: using reduced transactions and submission rows.')\n","metadata":{"execution":{"iopub.status.busy":"2026-06-12T14:47:03.142639Z","iopub.execute_input":"2026-06-12T14:47:03.142988Z","iopub.status.idle":"2026-06-12T14:48:14.235501Z","shell.execute_reply.started":"2026-06-12T14:47:03.142950Z","shell.execute_reply":"2026-06-12T14:48:14.234626Z"},"trusted":true},"outputs":[],"execution_count":null},{"id":"f20ee001","cell_type":"code","source":"def apk(actual, predicted, k=12):\n    if not actual:\n        return 0.0\n    pred = predicted[:k]\n    score = 0.0\n    hits = 0.0\n    used = set()\n    actual_set = set(actual)\n    for i, p in enumerate(pred, start=1):\n        if p in actual_set and p not in used:\n            used.add(p)\n            hits += 1.0\n            score += hits / i\n    return score / min(len(actual_set), k)\n\ndef mapk(actual_dict, pred_dict, k=12):\n    if not actual_dict:\n        return 0.0\n    scores = [apk(actual, pred_dict.get(cust, []), k=k) for cust, actual in actual_dict.items()]\n    return float(np.mean(scores))\n\ndef format_article(article_id: int) -> str:\n    return f\"{int(article_id):010d}\"\n\ndef build_actual_dict(df: pd.DataFrame) -> dict[str, list[int]]:\n    grouped = (\n        df.sort_values(['customer_id', 't_dat'], ascending=[True, False])\n        .groupby('customer_id')['article_id']\n        .apply(lambda x: list(dict.fromkeys(x.tolist())))\n    )\n    return grouped.to_dict()\n","metadata":{"execution":{"iopub.status.busy":"2026-06-12T14:48:14.236825Z","iopub.execute_input":"2026-06-12T14:48:14.237299Z","iopub.status.idle":"2026-06-12T14:48:14.246485Z","shell.execute_reply.started":"2026-06-12T14:48:14.237266Z","shell.execute_reply":"2026-06-12T14:48:14.245709Z"},"trusted":true},"outputs":[],"execution_count":null},{"id":"fe6575e9","cell_type":"markdown","source":"## Candidate generation and ranking features\n\nWe generate candidates from three sources:\n- **Personal recency history** (strongest signal)\n- **Age-segment popularity**\n- **Global popularity fallback**\n\nEach candidate receives engineered features:\n- personal recency score,\n- age popularity score,\n- global popularity score,\n- customer-article price affinity.\n\nWe then **train ranking weights** by maximizing offline MAP@12.\n","metadata":{}},{"id":"e9fcf200","cell_type":"code","source":"customer_age_bin = customers.set_index('customer_id')['age_bin'].to_dict()\n\ndef build_lookups(history_tx: pd.DataFrame, cutoff_date: pd.Timestamp):\n    recent_personal = history_tx[history_tx['t_dat'] >= cutoff_date - pd.Timedelta(days=120)].copy()\n    recent_personal['days_since'] = (cutoff_date - recent_personal['t_dat']).dt.days.clip(lower=0)\n    recent_personal['personal_score'] = np.exp(-recent_personal['days_since'] / 30.0)\n\n    personal = (\n        recent_personal.groupby(['customer_id', 'article_id'], as_index=False)['personal_score']\n        .sum()\n        .sort_values(['customer_id', 'personal_score'], ascending=[True, False])\n    )\n    personal['rnk'] = personal.groupby('customer_id').cumcount() + 1\n    personal = personal[personal['rnk'] <= 30]\n\n    personal_lookup: dict[str, list[tuple[int, float]]] = defaultdict(list)\n    for row in personal.itertuples(index=False):\n        personal_lookup[row.customer_id].append((int(row.article_id), float(row.personal_score)))\n\n    recent_30 = history_tx[history_tx['t_dat'] >= cutoff_date - pd.Timedelta(days=30)][['customer_id', 'article_id']].copy()\n    recent_30['age_bin'] = recent_30['customer_id'].map(customer_age_bin)\n    age_pop = (\n        recent_30.dropna(subset=['age_bin'])\n        .groupby(['age_bin', 'article_id'], as_index=False)\n        .size()\n        .rename(columns={'size': 'age_count'})\n        .sort_values(['age_bin', 'age_count'], ascending=[True, False])\n    )\n    age_pop['rnk'] = age_pop.groupby('age_bin').cumcount() + 1\n    age_pop = age_pop[age_pop['rnk'] <= 20]\n    age_pop['age_score'] = np.log1p(age_pop['age_count'])\n\n    age_lookup: dict[float, list[tuple[int, float]]] = defaultdict(list)\n    for row in age_pop.itertuples(index=False):\n        age_lookup[row.age_bin].append((int(row.article_id), float(row.age_score)))\n\n    global_pop = (\n        recent_30.groupby('article_id', as_index=False)\n        .size()\n        .rename(columns={'size': 'global_count'})\n        .sort_values('global_count', ascending=False)\n        .head(20)\n    )\n    global_pop['global_score'] = np.log1p(global_pop['global_count'])\n    global_list = [(int(r.article_id), float(r.global_score)) for r in global_pop.itertuples(index=False)]\n\n    article_mean_price = history_tx.groupby('article_id', as_index=True)['price'].mean().to_dict()\n    customer_mean_price = history_tx.groupby('customer_id', as_index=True)['price'].mean().to_dict()\n\n    return personal_lookup, age_lookup, global_list, article_mean_price, customer_mean_price\n\ndef recommend_one_customer(\n    customer_id: str,\n    weights: dict[str, float],\n    personal_lookup,\n    age_lookup,\n    global_list,\n    article_mean_price,\n    customer_mean_price,\n    k: int = 12,\n) -> list[int]:\n    scores = defaultdict(lambda: [0.0, 0.0, 0.0])  # personal, age, global\n\n    for article_id, score in personal_lookup.get(customer_id, []):\n        scores[article_id][0] = max(scores[article_id][0], score)\n\n    age_bin = customer_age_bin.get(customer_id)\n    if age_bin is not None:\n        for article_id, score in age_lookup.get(age_bin, []):\n            scores[article_id][1] = max(scores[article_id][1], score)\n\n    for article_id, score in global_list:\n        scores[article_id][2] = max(scores[article_id][2], score)\n\n    customer_price = customer_mean_price.get(customer_id)\n    ranked = []\n    for article_id, vals in scores.items():\n        article_price = article_mean_price.get(article_id)\n        if customer_price is None or article_price is None:\n            price_gap = 0.0\n        else:\n            price_gap = abs(math.log1p(float(customer_price)) - math.log1p(float(article_price)))\n\n        final_score = (\n            weights['personal'] * vals[0]\n            + weights['age'] * vals[1]\n            + weights['global'] * vals[2]\n            - weights['price_gap'] * price_gap\n        )\n        ranked.append((article_id, final_score))\n\n    ranked.sort(key=lambda x: x[1], reverse=True)\n    return [article_id for article_id, _ in ranked[:k]]\n\ndef recommend_many_customers(\n    customer_ids,\n    weights,\n    personal_lookup,\n    age_lookup,\n    global_list,\n    article_mean_price,\n    customer_mean_price,\n    k: int = 12,\n):\n    out = {}\n    for customer_id in tqdm(customer_ids, total=len(customer_ids)):\n        out[customer_id] = recommend_one_customer(\n            customer_id,\n            weights,\n            personal_lookup,\n            age_lookup,\n            global_list,\n            article_mean_price,\n            customer_mean_price,\n            k=k,\n        )\n    return out\n","metadata":{"execution":{"iopub.status.busy":"2026-06-12T14:48:14.247565Z","iopub.execute_input":"2026-06-12T14:48:14.247867Z","iopub.status.idle":"2026-06-12T14:48:15.561938Z","shell.execute_reply.started":"2026-06-12T14:48:14.247841Z","shell.execute_reply":"2026-06-12T14:48:15.561255Z"},"trusted":true},"outputs":[],"execution_count":null},{"id":"1fcf5fdc","cell_type":"markdown","source":"## Offline validation and weight training\n\nWe tune ranking weights on a temporal holdout week and select the combination with best MAP@12.\n","metadata":{}},{"id":"30354483","cell_type":"code","source":"max_date = transactions['t_dat'].max()\nval_start = max_date - pd.Timedelta(days=7)\ntrain_history = transactions[transactions['t_dat'] < val_start].copy()\nval_week = transactions[transactions['t_dat'] >= val_start].copy()\n\nval_customers = val_week['customer_id'].drop_duplicates().tolist()\nval_actual = build_actual_dict(val_week)\n\nprint('max_date:', max_date)\nprint('validation starts:', val_start)\nprint('history rows:', len(train_history))\nprint('validation rows:', len(val_week))\nprint('validation customers:', len(val_customers))\n\nlookups = build_lookups(train_history, val_start)\npersonal_lookup, age_lookup, global_list, article_mean_price, customer_mean_price = lookups\n\ncandidate_weight_grid = [\n    {'personal': 1.6, 'age': 0.7, 'global': 0.35, 'price_gap': 0.00},\n    {'personal': 1.8, 'age': 0.8, 'global': 0.35, 'price_gap': 0.05},\n    {'personal': 2.0, 'age': 0.8, 'global': 0.40, 'price_gap': 0.05},\n    {'personal': 2.2, 'age': 0.9, 'global': 0.45, 'price_gap': 0.05},\n    {'personal': 2.0, 'age': 1.0, 'global': 0.40, 'price_gap': 0.10},\n    {'personal': 2.3, 'age': 0.9, 'global': 0.50, 'price_gap': 0.10},\n]\n\ntuning_results = []\nfor w in candidate_weight_grid:\n    pred = recommend_many_customers(\n        val_customers,\n        w,\n        personal_lookup,\n        age_lookup,\n        global_list,\n        article_mean_price,\n        customer_mean_price,\n        k=12,\n    )\n    score = mapk(val_actual, pred, k=12)\n    tuning_results.append({'weights': w, 'map12': score})\n    print({'weights': w, 'map12': score})\n\ntuning_results = sorted(tuning_results, key=lambda x: x['map12'], reverse=True)\nbest_weights = tuning_results[0]['weights']\nbest_map12 = tuning_results[0]['map12']\n\nprint('Best weights:', best_weights)\nprint('Best offline MAP@12:', best_map12)\n","metadata":{"execution":{"iopub.status.busy":"2026-06-12T14:48:15.563135Z","iopub.execute_input":"2026-06-12T14:48:15.563573Z","iopub.status.idle":"2026-06-12T14:49:25.703778Z","shell.execute_reply.started":"2026-06-12T14:48:15.563534Z","shell.execute_reply":"2026-06-12T14:49:25.702617Z"},"trusted":true},"outputs":[],"execution_count":null},{"id":"ade69402","cell_type":"markdown","source":"## Final inference for Kaggle submission\n\nWe rebuild lookups using full transaction history, score all submission customers, and write `submission.csv`.\n","metadata":{}},{"id":"d27d9e13","cell_type":"code","source":"full_cutoff = max_date + pd.Timedelta(days=1)\nfull_lookups = build_lookups(transactions, full_cutoff)\n(\n    full_personal_lookup,\n    full_age_lookup,\n    full_global_list,\n    full_article_mean_price,\n    full_customer_mean_price,\n) = full_lookups\n\nsub_customers = sample_submission['customer_id'].tolist()\n\nbatch_size = 50000\nall_predictions = {}\n\nfor start in range(0, len(sub_customers), batch_size):\n    end = min(start + batch_size, len(sub_customers))\n    batch_customers = sub_customers[start:end]\n    batch_pred = recommend_many_customers(\n        batch_customers,\n        best_weights,\n        full_personal_lookup,\n        full_age_lookup,\n        full_global_list,\n        full_article_mean_price,\n        full_customer_mean_price,\n        k=12,\n    )\n    all_predictions.update(batch_pred)\n\nsubmission = sample_submission[['customer_id']].copy()\nsubmission['prediction'] = submission['customer_id'].map(\n    lambda cid: ' '.join(format_article(aid) for aid in all_predictions.get(cid, []))\n)\n\nassert submission['prediction'].str.len().gt(0).all(), 'Some customers have empty predictions.'\n\nsubmission_path = WORK_DIR / 'submission.csv'\nsubmission.to_csv(submission_path, index=False)\n\nprint(f'Submission saved to: {submission_path}')\nprint(submission.head())\n","metadata":{"execution":{"iopub.status.busy":"2026-06-12T14:49:25.705772Z","iopub.execute_input":"2026-06-12T14:49:25.706108Z","iopub.status.idle":"2026-06-12T14:51:30.061489Z","shell.execute_reply.started":"2026-06-12T14:49:25.706052Z","shell.execute_reply":"2026-06-12T14:51:30.060436Z"},"trusted":true},"outputs":[],"execution_count":null}]}