, {'features': {'game': tensor([[0, 0],\n",
+ " [0, 1],\n",
+ " [1, 0],\n",
+ " [1, 1],\n",
+ " [1, 1]]), 'user': tensor([21, 44, 16, 25])}, 'label': {'user': tensor([1, 2, 0, 1])}})\n",
+ "--------------\n",
"\n",
- "1) https://tutorials.arangodb.cloud:8529/_db/TUT56z6dbtgsoeu5cc6aixs7d/_admin/aardvark/index.html#graph/Lollipop_With_Attributes\n",
- "2) https://tutorials.arangodb.cloud:8529/_db/TUT56z6dbtgsoeu5cc6aixs7d/_admin/aardvark/index.html#graph/Hypercube_With_Attributes\n",
- "3) https://tutorials.arangodb.cloud:8529/_db/TUT56z6dbtgsoeu5cc6aixs7d/_admin/aardvark/index.html#graph/Clique_With_Attributes\n",
- "\n"
+ "{'features': tensor([[ 6, 1],\n",
+ " [1000, 0]])}\n"
]
}
],
"source": [
- "# Load the dgl graphs\n",
- "dgl_lollipop_graph = remove_self_loop(MiniGCDataset(8, 7, 8)[3][0])\n",
- "dgl_hypercube_graph = remove_self_loop(MiniGCDataset(8, 8, 9)[4][0])\n",
- "dgl_clique_graph = remove_self_loop(MiniGCDataset(8, 6, 7)[6][0])\n",
- "\n",
- " # Add DGL Node & Edge Features to each graph\n",
- "dgl_lollipop_graph.ndata[\"random_ndata\"] = torch.tensor(\n",
- " [[i, i, i] for i in range(0, dgl_lollipop_graph.num_nodes())]\n",
- ")\n",
- "dgl_lollipop_graph.edata[\"random_edata\"] = torch.rand(dgl_lollipop_graph.num_edges())\n",
- "\n",
- "dgl_hypercube_graph.ndata[\"random_ndata\"] = torch.rand(dgl_hypercube_graph.num_nodes())\n",
- "dgl_hypercube_graph.edata[\"random_edata\"] = torch.tensor(\n",
- " [[[i], [i], [i]] for i in range(0, dgl_hypercube_graph.num_edges())]\n",
- ")\n",
- "\n",
- "dgl_clique_graph.ndata['clique_ndata'] = torch.tensor([1,2,3,4,5,6])\n",
- "dgl_clique_graph.edata['clique_edata'] = torch.tensor(\n",
- " [1 if i % 2 == 0 else 0 for i in range(0, dgl_clique_graph.num_edges())]\n",
- ")\n",
- "\n",
- "# A user-defined Controller class is OPTIONAL when converting DGL features\n",
- "# to ArangoDB attributes. NOTE: A custom Controller is NOT needed if you want to\n",
- "# keep the numerical-based values of your DGL features.\n",
- "class Clique_ADBDGL_Controller(ADBDGL_Controller):\n",
- " \"\"\"ArangoDB-DGL controller.\n",
- "\n",
- " Responsible for controlling how ArangoDB attributes\n",
- " are converted into DGL features, and vice-versa.\n",
+ "# Define the metagraph that transfers attributes via user-defined functions\n",
+ "def udf_user_features(user_df):\n",
+ " # process the user_df Pandas DataFrame to return a feature matrix in a tensor\n",
+ " # user_df[\"features\"] = ...\n",
+ " return torch.tensor(user_df[\"features\"].to_list())\n",
"\n",
- " You can derive your own custom ADBDGL_Controller if you want to maintain\n",
- " consistency between your ArangoDB attributes & your DGL features.\n",
- " \"\"\"\n",
- "\n",
- " def _dgl_feature_to_adb_attribute(self, key: str, col: str, val: Tensor):\n",
- " \"\"\"\n",
- " Given a DGL feature key, its assigned value (for an arbitrary node or edge),\n",
- " and the collection it belongs to, convert it to a valid ArangoDB attribute\n",
- " (e.g string, list, number, ...).\n",
- "\n",
- " NOTE: No action is needed here if you want to keep the numerical-based values\n",
- " of your DGL features.\n",
- "\n",
- " :param key: The DGL attribute key name\n",
- " :type key: str\n",
- " :param col: The ArangoDB collection of the (soon-to-be) ArangoDB document.\n",
- " :type col: str\n",
- " :param val: The assigned attribute value of the DGL node.\n",
- " :type val: Tensor\n",
- " :return: The feature's representation as an ArangoDB Attribute\n",
- " :rtype: Any\n",
- " \"\"\"\n",
"\n",
- " if key == \"clique_ndata\":\n",
- " try:\n",
- " return [\"Eins\", \"Zwei\", \"Drei\", \"Vier\", \"Fünf\", \"Sechs\"][key-1]\n",
- " except:\n",
- " return -1\n",
+ "def udf_game_features(game_df):\n",
+ " # process the game_df Pandas DataFrame to return a feature matrix in a tensor\n",
+ " # game_df[\"features\"] = ...\n",
+ " return torch.tensor(game_df[\"features\"].to_list())\n",
"\n",
- " if key == \"clique_edata\":\n",
- " return bool(val)\n",
- "\n",
- " return super()._dgl_feature_to_adb_attribute(key, col, val)\n",
- "\n",
- "# Re-instantiate a new adapter specifically for the Clique Graph Conversion\n",
- "clique_adbgl_adapter = ADBDGL_Adapter(db, Clique_ADBDGL_Controller())\n",
- "\n",
- "# Create the ArangoDB graphs\n",
- "lollipop = \"Lollipop_With_Attributes\"\n",
- "hypercube = \"Hypercube_With_Attributes\"\n",
- "clique = \"Clique_With_Attributes\"\n",
"\n",
- "db.delete_graph(lollipop, drop_collections=True, ignore_missing=True)\n",
- "db.delete_graph(hypercube, drop_collections=True, ignore_missing=True)\n",
- "db.delete_graph(clique, drop_collections=True, ignore_missing=True)\n",
+ "metagraph_v3 = {\n",
+ " \"vertexCollections\": {\n",
+ " \"user\": {\n",
+ " \"features\": udf_user_features, # supports named functions\n",
+ " \"label\": lambda df: torch.tensor(df[\"label\"].to_list()), # also supports lambda functions\n",
+ " },\n",
+ " \"game\": {\"features\": udf_game_features},\n",
+ " },\n",
+ " \"edgeCollections\": {\n",
+ " \"plays\": {\"features\": (lambda df: torch.tensor(df[\"features\"].to_list()))},\n",
+ " },\n",
+ "}\n",
"\n",
- "adb_lollipop_graph = adbdgl_adapter.dgl_to_arangodb(lollipop, dgl_lollipop_graph)\n",
- "adb_hypercube_graph = adbdgl_adapter.dgl_to_arangodb(hypercube, dgl_hypercube_graph)\n",
- "adb_clique_graph = clique_adbgl_adapter.dgl_to_arangodb(clique, dgl_clique_graph) # Notice the new adapter here!\n",
+ "# Create the DGL Graph\n",
+ "dgl_g = adbdgl_adapter.arangodb_to_dgl(\"FakeHetero\", metagraph_v3)\n",
"\n",
- "print('\\n--------------------')\n",
- "print(\"URL: \" + con[\"url\"])\n",
- "print(\"Username: \" + con[\"username\"])\n",
- "print(\"Password: \" + con[\"password\"])\n",
- "print(\"Database: \" + con[\"dbName\"])\n",
- "print('--------------------\\n')\n",
- "print(\"View the created graphs here:\\n\")\n",
- "print(f\"1) {con['url']}/_db/{con['dbName']}/_admin/aardvark/index.html#graph/{lollipop}\")\n",
- "print(f\"2) {con['url']}/_db/{con['dbName']}/_admin/aardvark/index.html#graph/{hypercube}\")\n",
- "print(f\"3) {con['url']}/_db/{con['dbName']}/_admin/aardvark/index.html#graph/{clique}\\n\")"
+ "# Show graph data\n",
+ "print('\\n--------------')\n",
+ "print(dgl_g)\n",
+ "print('\\n--------------')\n",
+ "print(dgl_g.ndata)\n",
+ "print('--------------\\n')\n",
+ "print(dgl_g.edata)"
]
}
],
"metadata": {
"colab": {
"collapsed_sections": [
- "KS9c-vE5eG89",
"ot1oJqn7m78n",
"Oc__NAd1eG8-",
"7y81WHO8eG8_",
"QfE_tKxneG9A",
+ "bvzJXSHHTi3v",
+ "UafSB_3JZNwK",
+ "CNj1xKhwoJoL",
+ "n08RC_GtkDrC",
+ "mk6m0hBRkkkT",
"uByvwf9feG9A",
- "bvzJXSHHTi3v"
+ "ZrEDmtqCVD0W",
+ "RQ4CknYfUEuz",
+ "qEH6OdSB23Ya",
+ "0806IB4o3WRz",
+ "d5ijSCcY4bYs"
],
- "name": "ArangoDB_DGL_Adapter_v2.ipynb",
"provenance": []
},
"kernelspec": {
@@ -1568,6 +3488,3723 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
+ },
+ "widgets": {
+ "application/vnd.jupyter.widget-state+json": {
+ "0083494093574c50952dd066502a708d": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "0478c90ef8234f3a8987dbe9cd3030b2": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "09d25097c75c4fa8a2c7376f1965afc5": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "09e8c93741bf45acb69ba9e757107564": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_d7d06973b2984eb19fa050409bf62222",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'plays', 'game') (2) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'plays', 'game') (2)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "13d0f7da120b40b993ce3c0b257d5788": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "14b29dc1f2b8454fa9acc1d79dcd4870": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "1690574b32cc4b48a8b87520458d5066": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_a9edf4f85a4a4504b155608bb740178a",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): topic ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): topic\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "1dea128bde204a8fa53e094e014183fe": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_50f8ff3637ee4fc7af8c811cd5d177be",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): topic (3) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): topic (3)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "21e50aa61c3d4de19b5cc0bbe27d53c9": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "289a6e16c3d640c29d96edf09908bd0f": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_61f3832c906445a3ab7e7ba9b41c0127",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): topic (3) ▰▰▰▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): topic (3)\u001b[0m \u001b[38;2;153;70;2m▰▰▰▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "2a380fe111794c3a951cdafa4a2bf0b3": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "2b13e46a722e4be384fad74e1b3e6461": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_848230df62434c77b5b18f9a43e2d14f",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): Movies ▰▰▰▰▰▰▰ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): Movies\u001b[0m \u001b[38;2;252;253;252m▰▰▰▰▰▰▰\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "2c2900512b5244d3a0fcaf7409446d0e": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_c5d064af7f4a49dca6716f98d052e951",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): plays ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): plays\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "2d1fc41d509e481cb779603827359184": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_87d9c9de620847f48b4088e8577cd653",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('Karate_N', 'Karate_E', 'Karate_N') (156) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('Karate_N', 'Karate_E', 'Karate_N') (156)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "31a9f782f36d407f8cc42b19679c5c2c": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_9fd8d07a43cd4c06a2d448047ede846c",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): follows ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): follows\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "345a5984959c4e57b7e2715fa8eeef8f": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_99e6613c4187459396eea503453934cb",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): game (5) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): game (5)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "34c4ef0c4aa5454893c0f0fa35902fbd": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "38aaa492d75c48f38de60ea0cc5fa93f": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_63845b04ecbc40de8bcc017d754ac907",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): game ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): game\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "3bc228aa98454dc59a604c8f7ff6b2a0": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_65138d18c9c449d1aaaad387293c5ede",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): user (4) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): user (4)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "3d081c88cd2945fa9534de722669ada9": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_82f996185e8444ada5e18602e2f8e105",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): Ratings ▰▱▱▱▱▱▱ 0:00:06\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): Ratings\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:06\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "3ea99b2a6b4246d3abf628ca743f9f24": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_841ce4f5d391457e858c3c48185e259d",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'follows', 'topic') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'follows', 'topic') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "3f633be94c7d466ea40571e805a76948": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "3fc8b14d794a46118b328893bd216405": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_c7e222474ff445fe86e4e599848b2ae2",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): game (5) ▰▰▰▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): game (5)\u001b[0m \u001b[38;2;153;70;2m▰▰▰▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "404a19cadaca4b85a957cad231b73cbb": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "40da9dd52dd6443684b990f74b6cb876": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "46b88027e41a43578ebcc47513dd6911": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "4ab3c113235746cab5fde158756ab420": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "4b7f5f21b98b4c5d8475929bf1f01a65": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_404a19cadaca4b85a957cad231b73cbb",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): topic ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): topic\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "4e085418ce1b41e1bc24ad6acea92fc4": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_7b5dba3f4d50466eb2071cb13548ef1b",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): plays ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): plays\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "50f8ff3637ee4fc7af8c811cd5d177be": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "54801c3c74494fe8bf9e2a7fb64bde48": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_903622e283524c7f89635599920c2b14",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): game ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): game\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "575205f1a4e64c5d977e69d4939a5605": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_d20843bfa9064d56b37aaea011789a26",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'follows', 'user') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'follows', 'user') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "59405e2d0c164d5b965680cc9d9cd8f3": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_2a380fe111794c3a951cdafa4a2bf0b3",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): Users ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): Users\u001b[0m \u001b[38;2;252;253;252m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "5c310145af4f4c90b659dee771185ab6": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "5f5c119141a24cab907ceb2da27e0244": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_46b88027e41a43578ebcc47513dd6911",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): topic ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): topic\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "61d2a0426c324309ab51111933276e3d": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_77c208846c1e4503bc22a5b5504f89ee",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): Karate_N (34) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): Karate_N (34)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "61f3832c906445a3ab7e7ba9b41c0127": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "63845b04ecbc40de8bcc017d754ac907": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "65138d18c9c449d1aaaad387293c5ede": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "6582a9d3fe044d5380d8e918f3bc5a6d": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_40da9dd52dd6443684b990f74b6cb876",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): user (4) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): user (4)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "6744eb60dfa04a8598fca3b998ce3077": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_09d25097c75c4fa8a2c7376f1965afc5",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): user (4) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): user (4)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "712770e675424d7eb0c8efd6c34f2012": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "77b31c42e914410aaea93044f1390121": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_8349f1e6b1f34680bacd7de1a1937122",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): user ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): user\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "77c208846c1e4503bc22a5b5504f89ee": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "7a43c4b816da4a40b0eed167a85eef22": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_eb376d5cf782424aaccbce31f0d3ede5",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): game ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): game\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "7a4db2b18c634bef932fb9b1157d4af1": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_b5be8c1e4ab3415c9fffbb61aeb0fff3",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): follows ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): follows\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "7b5dba3f4d50466eb2071cb13548ef1b": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "80d19dc0d20842c3b5c7313c0ad23d24": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_0478c90ef8234f3a8987dbe9cd3030b2",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'follows', 'topic') (2) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'follows', 'topic') (2)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "80e69b3aa98b44e295efe3940c1146c2": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "8128e6d80fcb4a8ca0a72097bb8b6521": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "82f996185e8444ada5e18602e2f8e105": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "8349f1e6b1f34680bacd7de1a1937122": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "841ce4f5d391457e858c3c48185e259d": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "8444e147be8f44aba06ec1f8a880104e": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_80e69b3aa98b44e295efe3940c1146c2",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'follows', 'user') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'follows', 'user') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "848230df62434c77b5b18f9a43e2d14f": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "87d9c9de620847f48b4088e8577cd653": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "88e83ddc1ca1464291e1631b8fced847": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_a9c14a3f339445338119631c8e56ff68",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'plays', 'game') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'plays', 'game') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "8bf075c6f7834d3fa905b7ddc37cf128": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_b080f26fe35241fb9cca48e97bc9ef0c",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'plays', 'game') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'plays', 'game') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "903622e283524c7f89635599920c2b14": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "9403e71c2bbe46bd9e6d49d555264554": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_34c4ef0c4aa5454893c0f0fa35902fbd",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): game ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): game\u001b[0m \u001b[38;2;252;253;252m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "968020b1388e4883843575d9198af1cd": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_f1a08470110e4099af2a3d4cf4d0f956",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): topic (3) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): topic (3)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "96e57d98afce44cd8269204dd19ff6e0": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_da43ef4a8c6a41f9bda153a0cd14c2d7",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): topic (3) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): topic (3)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "97e7543f202749c197515a9c5c79adbe": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "987bf80aee4b4b97bfad1699f8384af8": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_4ab3c113235746cab5fde158756ab420",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'follows', 'user') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'follows', 'user') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "9968f928e28147f7a0956aff8412a608": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "99bbe81a24db49ff9352987fd97649cd": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_21e50aa61c3d4de19b5cc0bbe27d53c9",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): user (4) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): user (4)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "99e6613c4187459396eea503453934cb": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "9b2b3abbe2c04af0bc232c9b16bfd90d": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "9e1eb071f0b24cb6a8d206477b10b831": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "9fd8d07a43cd4c06a2d448047ede846c": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "a9c14a3f339445338119631c8e56ff68": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "a9edf4f85a4a4504b155608bb740178a": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "b080f26fe35241fb9cca48e97bc9ef0c": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "b5be8c1e4ab3415c9fffbb61aeb0fff3": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "bd8b6caa7d2d4df1a99b1870ecc0ae46": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_13d0f7da120b40b993ce3c0b257d5788",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): plays ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): plays\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "c5d064af7f4a49dca6716f98d052e951": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "c61e3997250d4f93a8e0494db674892d": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_97e7543f202749c197515a9c5c79adbe",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'follows', 'user') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'follows', 'user') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "c6cffa0a64434e56879ba2a8c9de018a": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_0083494093574c50952dd066502a708d",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): game (5) ▰▰▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): game (5)\u001b[0m \u001b[38;2;153;70;2m▰▰▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "c7e222474ff445fe86e4e599848b2ae2": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "cb8167f00277413eaaa2ad6e0e162fab": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_8128e6d80fcb4a8ca0a72097bb8b6521",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'follows', 'topic') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'follows', 'topic') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "d20843bfa9064d56b37aaea011789a26": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "d7d06973b2984eb19fa050409bf62222": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "da43ef4a8c6a41f9bda153a0cd14c2d7": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "dd2376f84c794b4989f385a5bb147bd8": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "e4b7b35461e848f5819b9f38d67ee652": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_9968f928e28147f7a0956aff8412a608",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): user ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): user\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "ea5e9803c5de4d2bbb48782069b9829b": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_3f633be94c7d466ea40571e805a76948",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): game (5) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): game (5)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "ea88ab86e9774ed78ea62daa6e338637": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_712770e675424d7eb0c8efd6c34f2012",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): follows ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): follows\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "eb376d5cf782424aaccbce31f0d3ede5": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "ec7b8b0b853f463fa079dda845891391": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_dd2376f84c794b4989f385a5bb147bd8",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'plays', 'game') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'plays', 'game') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "f01997b9b43d43368d632e26ba9732ad": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_14b29dc1f2b8454fa9acc1d79dcd4870",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): user ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): user\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "f0d4515c88a44775be59c4e1a0b3c60a": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_9e1eb071f0b24cb6a8d206477b10b831",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): plays ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): plays\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "f1a08470110e4099af2a3d4cf4d0f956": {
+ "model_module": "@jupyter-widgets/base",
+ "model_module_version": "1.2.0",
+ "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
+ }
+ },
+ "f9fdfe6ce44e4e1c8f513f82efca3e0d": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_9b2b3abbe2c04af0bc232c9b16bfd90d",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(DGL → ADB): ('user', 'follows', 'topic') (2) ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;151;196;35m(DGL → ADB): ('user', 'follows', 'topic') (2)\u001b[0m \u001b[38;2;153;70;2m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ },
+ "fd2db543279f4a13ab6376b9c23160e0": {
+ "model_module": "@jupyter-widgets/output",
+ "model_module_version": "1.0.0",
+ "model_name": "OutputModel",
+ "state": {
+ "_dom_classes": [],
+ "_model_module": "@jupyter-widgets/output",
+ "_model_module_version": "1.0.0",
+ "_model_name": "OutputModel",
+ "_view_count": null,
+ "_view_module": "@jupyter-widgets/output",
+ "_view_module_version": "1.0.0",
+ "_view_name": "OutputView",
+ "layout": "IPY_MODEL_5c310145af4f4c90b659dee771185ab6",
+ "msg_id": "",
+ "outputs": [
+ {
+ "data": {
+ "text/html": "(ADB → DGL): user ▰▱▱▱▱▱▱ 0:00:00\n
\n",
+ "text/plain": "\u001b[38;2;49;155;245m(ADB → DGL): user\u001b[0m \u001b[38;2;252;253;252m▰▱▱▱▱▱▱\u001b[0m \u001b[33m0:00:00\u001b[0m\n"
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ]
+ }
+ }
+ }
}
},
"nbformat": 4,
diff --git a/setup.cfg b/setup.cfg
index 475af62..a91261b 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -3,7 +3,7 @@ profile = black
[flake8]
max-line-length = 88
-extend-ignore = E203, E741, W503
+extend-ignore = E203, E741, W503, E731
exclude =.git .idea .*_cache dist venv
[mypy]
diff --git a/setup.py b/setup.py
index 037c9c1..0b56dea 100644
--- a/setup.py
+++ b/setup.py
@@ -11,24 +11,26 @@
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/arangoml/dgl-adapter",
- keywords=["arangodb", "dgl", "adapter"],
+ keywords=["arangodb", "dgl", "deep graph library", "adapter"],
packages=["adbdgl_adapter"],
include_package_data=True,
- python_requires=">=3.7",
+ python_requires=">=3.8",
license="Apache Software License",
install_requires=[
"requests>=2.27.1",
- "dgl>=0.6.1",
- "torch>=1.10.2",
- "python-arango>=7.4.1",
+ "rich>=12.5.1",
+ "pandas>=1.3.5",
+ "dgl~=1.0",
+ "torch>=1.12.0",
+ "python-arango~=7.6",
"setuptools>=45",
],
extras_require={
"dev": [
- "black",
- "flake8>=3.8.0",
- "isort>=5.0.0",
- "mypy>=0.790",
+ "black==23.3.0",
+ "flake8==6.0.0",
+ "isort==5.12.0",
+ "mypy==1.4.1",
"pytest>=6.0.0",
"pytest-cov>=2.0.0",
"coveralls>=3.3.1",
@@ -41,9 +43,10 @@
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
"Topic :: Utilities",
"Typing :: Typed",
],
diff --git a/tests/conftest.py b/tests/conftest.py
index f31c304..0c8acaf 100755
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -2,17 +2,19 @@
import os
import subprocess
from pathlib import Path
-from typing import Any
+from typing import Any, Callable, Dict
from arango import ArangoClient
from arango.database import StandardDatabase
-from dgl import DGLGraph, heterograph, remove_self_loop
+from dgl import DGLGraph, DGLHeteroGraph, heterograph, remove_self_loop
from dgl.data import KarateClubDataset, MiniGCDataset
-from torch import ones, rand, tensor, zeros
+from pandas import DataFrame
+from torch import Tensor, rand, tensor
-from adbdgl_adapter import ADBDGL_Adapter
-from adbdgl_adapter.typings import Json
+from adbdgl_adapter import ADBDGL_Adapter, ADBDGL_Controller
+from adbdgl_adapter.typings import DGLCanonicalEType, Json
+con: Json
db: StandardDatabase
adbdgl_adapter: ADBDGL_Adapter
PROJECT_DIR = Path(__file__).parent.parent
@@ -26,6 +28,7 @@ def pytest_addoption(parser: Any) -> None:
def pytest_configure(config: Any) -> None:
+ global con
con = {
"url": config.getoption("url"),
"username": config.getoption("username"),
@@ -48,37 +51,34 @@ def pytest_configure(config: Any) -> None:
global adbdgl_adapter
adbdgl_adapter = ADBDGL_Adapter(db, logging_lvl=logging.DEBUG)
- if db.has_graph("fraud-detection") is False:
- arango_restore(con, "examples/data/fraud_dump")
- db.create_graph(
- "fraud-detection",
- edge_definitions=[
- {
- "edge_collection": "accountHolder",
- "from_vertex_collections": ["customer"],
- "to_vertex_collections": ["account"],
- },
- {
- "edge_collection": "transaction",
- "from_vertex_collections": ["account"],
- "to_vertex_collections": ["account"],
- },
- ],
- )
+
+def pytest_exception_interact(node: Any, call: Any, report: Any) -> None:
+ try:
+ if report.failed:
+ params: Dict[str, Any] = node.callspec.params
+
+ graph_name = params.get("name")
+ adapter = params.get("adapter")
+ if graph_name and adapter:
+ db: StandardDatabase = adapter.db
+ db.delete_graph(graph_name, drop_collections=True, ignore_missing=True)
+ except AttributeError:
+ print(node)
+ print(dir(node))
+ print("Could not delete graph")
def arango_restore(con: Json, path_to_data: str) -> None:
- restore_prefix = "./assets/" if os.getenv("GITHUB_ACTIONS") else ""
+ restore_prefix = "./tools/" if os.getenv("GITHUB_ACTIONS") else ""
protocol = "http+ssl://" if "https://" in con["url"] else "tcp://"
url = protocol + con["url"].partition("://")[-1]
- # A small hack to work around empty passwords
- password = f"--server.password {con['password']}" if con["password"] else ""
subprocess.check_call(
- f'chmod -R 755 ./assets/arangorestore && {restore_prefix}arangorestore \
+ f'chmod -R 755 ./tools/arangorestore && {restore_prefix}arangorestore \
-c none --server.endpoint {url} --server.database {con["dbName"]} \
- --server.username {con["username"]} {password} \
- --input-directory "{PROJECT_DIR}/{path_to_data}"',
+ --server.username {con["username"]} \
+ --server.password "{con["password"]}" \
+ --input-directory "{PROJECT_DIR}/{path_to_data}"',
cwd=f"{PROJECT_DIR}/tests",
shell=True,
)
@@ -88,41 +88,90 @@ def get_karate_graph() -> DGLGraph:
return KarateClubDataset()[0]
-def get_lollipop_graph() -> DGLGraph:
- dgl_g = remove_self_loop(MiniGCDataset(8, 7, 8)[3][0])
- dgl_g.ndata["random_ndata"] = tensor(
- [[i, i, i] for i in range(0, dgl_g.num_nodes())]
- )
- dgl_g.edata["random_edata"] = rand(dgl_g.num_edges())
- return dgl_g
-
-
def get_hypercube_graph() -> DGLGraph:
dgl_g = remove_self_loop(MiniGCDataset(8, 8, 9)[4][0])
- dgl_g.ndata["random_ndata"] = rand(dgl_g.num_nodes())
- dgl_g.edata["random_edata"] = tensor(
+ dgl_g.ndata["node_features"] = rand(dgl_g.num_nodes())
+ dgl_g.edata["edge_features"] = tensor(
[[[i], [i], [i]] for i in range(0, dgl_g.num_edges())]
)
return dgl_g
-def get_clique_graph() -> DGLGraph:
- dgl_g = remove_self_loop(MiniGCDataset(8, 6, 7)[6][0])
- dgl_g.ndata["random_ndata"] = ones(dgl_g.num_nodes())
- dgl_g.edata["random_edata"] = zeros(dgl_g.num_edges())
+def get_fake_hetero_dataset() -> DGLHeteroGraph:
+ data_dict = {
+ ("v0", "e0", "v0"): (tensor([0, 1, 2, 3, 4, 5]), tensor([5, 4, 3, 2, 1, 0])),
+ ("v0", "e0", "v1"): (tensor([0, 1, 2, 3, 4, 5]), tensor([0, 5, 1, 4, 2, 3])),
+ ("v0", "e0", "v2"): (tensor([0, 1, 2, 3, 4, 5]), tensor([1, 1, 1, 5, 5, 5])),
+ ("v1", "e0", "v1"): (tensor([0, 1, 2, 3, 4, 5]), tensor([3, 3, 3, 3, 3, 3])),
+ ("v1", "e0", "v2"): (tensor([0, 1, 2, 3, 4, 5]), tensor([0, 1, 2, 3, 4, 5])),
+ ("v2", "e0", "v2"): (tensor([0, 1, 2, 3, 4, 5]), tensor([5, 4, 3, 2, 1, 0])),
+ }
+
+ dgl_g: DGLHeteroGraph = heterograph(data_dict)
+ dgl_g.nodes["v0"].data["features"] = rand(6)
+ dgl_g.nodes["v0"].data["label"] = tensor([1, 3, 2, 1, 3, 2])
+ dgl_g.nodes["v1"].data["features"] = rand(6, 1)
+ dgl_g.nodes["v2"].data["features"] = rand(6, 2)
+ dgl_g.edata["features"] = {("v0", "e0", "v0"): rand(6, 3)}
+
return dgl_g
-def get_social_graph() -> DGLGraph:
+def get_social_graph() -> DGLHeteroGraph:
dgl_g = heterograph(
{
("user", "follows", "user"): (tensor([0, 1]), tensor([1, 2])),
- ("user", "follows", "game"): (tensor([0, 1, 2]), tensor([0, 1, 2])),
- ("user", "plays", "game"): (tensor([3, 3]), tensor([1, 2])),
+ ("user", "follows", "topic"): (tensor([1, 1]), tensor([1, 2])),
+ ("user", "plays", "game"): (tensor([0, 3]), tensor([3, 4])),
}
)
- dgl_g.nodes["user"].data["age"] = tensor([21, 16, 38, 64])
- dgl_g.edges["plays"].data["hours_played"] = tensor([3, 5])
+ dgl_g.nodes["user"].data["features"] = tensor([21, 44, 16, 25])
+ dgl_g.nodes["user"].data["label"] = tensor([1, 2, 0, 1])
+ dgl_g.nodes["game"].data["features"] = tensor(
+ [[0, 0], [0, 1], [1, 0], [1, 1], [1, 1]]
+ )
+ dgl_g.edges[("user", "plays", "game")].data["features"] = tensor(
+ [[6, 1], [1000, 0]]
+ )
return dgl_g
+
+
+# For DGL to ArangoDB testing purposes
+def udf_users_features_tensor_to_df(t: Tensor, adb_df: DataFrame) -> DataFrame:
+ adb_df[["age", "gender"]] = t.tolist()
+ adb_df["gender"] = adb_df["gender"].map({0: "Male", 1: "Female"})
+ return adb_df
+
+
+# For ArangoDB to DGL testing purposes
+def udf_features_df_to_tensor(df: DataFrame) -> Tensor:
+ return tensor(df["features"].to_list())
+
+
+# For ArangoDB to DGL testing purposes
+def udf_key_df_to_tensor(key: str) -> Callable[[DataFrame], Tensor]:
+ def f(df: DataFrame) -> Tensor:
+ return tensor(df[key].to_list())
+
+ return f
+
+
+def label_tensor_to_2_column_dataframe(dgl_tensor: Tensor, df: DataFrame) -> DataFrame:
+ label_map = {0: "Class A", 1: "Class B", 2: "Class C"}
+
+ df["label_num"] = dgl_tensor.tolist()
+ df["label_str"] = df["label_num"].map(label_map)
+
+ return df
+
+
+class Custom_ADBDGL_Controller(ADBDGL_Controller):
+ def _prepare_dgl_node(self, dgl_node: Json, node_type: str) -> Json:
+ dgl_node["foo"] = "bar"
+ return dgl_node
+
+ def _prepare_dgl_edge(self, dgl_edge: Json, edge_type: DGLCanonicalEType) -> Json:
+ dgl_edge["bar"] = "foo"
+ return dgl_edge
diff --git a/tests/data/adb/imdb_dump/ENCRYPTION b/tests/data/adb/imdb_dump/ENCRYPTION
new file mode 100644
index 0000000..c86c3f3
--- /dev/null
+++ b/tests/data/adb/imdb_dump/ENCRYPTION
@@ -0,0 +1 @@
+none
\ No newline at end of file
diff --git a/tests/data/adb/imdb_dump/Movies.structure.json b/tests/data/adb/imdb_dump/Movies.structure.json
new file mode 100644
index 0000000..eb9d80c
--- /dev/null
+++ b/tests/data/adb/imdb_dump/Movies.structure.json
@@ -0,0 +1 @@
+{"allInSync":true,"indexes":[],"isReady":true,"parameters":{"cacheEnabled":false,"deleted":false,"distributeShardsLike":"_graphs","globallyUniqueId":"c2730595280/","id":"2730595280","isDisjoint":false,"isSmart":false,"isSmartChild":false,"isSystem":false,"keyOptions":{"allowUserKeys":true,"type":"traditional"},"minReplicationFactor":1,"name":"Movies","numberOfShards":1,"planId":"2730595280","replicationFactor":3,"schema":null,"shardKeys":["_key"],"shardingStrategy":"hash","shards":{"s2730595281":["PRMR-1vqwuhks","PRMR-bvgkeorm","PRMR-zpamyasv"]},"status":3,"type":2,"waitForSync":false,"writeConcern":1},"planVersion":10402}
\ No newline at end of file
diff --git a/tests/data/adb/imdb_dump/Movies_80662e1f485e79d07ef4973f6b1b9f88.data.json.gz b/tests/data/adb/imdb_dump/Movies_80662e1f485e79d07ef4973f6b1b9f88.data.json.gz
new file mode 100644
index 0000000..b838d29
Binary files /dev/null and b/tests/data/adb/imdb_dump/Movies_80662e1f485e79d07ef4973f6b1b9f88.data.json.gz differ
diff --git a/tests/data/adb/imdb_dump/Ratings.structure.json b/tests/data/adb/imdb_dump/Ratings.structure.json
new file mode 100644
index 0000000..8571f0d
--- /dev/null
+++ b/tests/data/adb/imdb_dump/Ratings.structure.json
@@ -0,0 +1 @@
+{"allInSync":true,"indexes":[],"isReady":true,"parameters":{"cacheEnabled":false,"deleted":false,"distributeShardsLike":"_graphs","globallyUniqueId":"c2728580616/","id":"2728580616","isDisjoint":false,"isSmart":false,"isSmartChild":false,"isSystem":false,"keyOptions":{"allowUserKeys":true,"type":"traditional"},"minReplicationFactor":1,"name":"Ratings","numberOfShards":1,"planId":"2728580616","replicationFactor":3,"schema":null,"shardKeys":["_key"],"shardingStrategy":"hash","shards":{"s2728580617":["PRMR-1vqwuhks","PRMR-bvgkeorm","PRMR-zpamyasv"]},"status":3,"type":3,"waitForSync":false,"writeConcern":1},"planVersion":10408}
\ No newline at end of file
diff --git a/tests/data/adb/imdb_dump/Ratings_e8dcd33ae274522f351c266f028eed7b.data.json.gz b/tests/data/adb/imdb_dump/Ratings_e8dcd33ae274522f351c266f028eed7b.data.json.gz
new file mode 100644
index 0000000..b604626
Binary files /dev/null and b/tests/data/adb/imdb_dump/Ratings_e8dcd33ae274522f351c266f028eed7b.data.json.gz differ
diff --git a/tests/data/adb/imdb_dump/Users.structure.json b/tests/data/adb/imdb_dump/Users.structure.json
new file mode 100644
index 0000000..e5420b3
--- /dev/null
+++ b/tests/data/adb/imdb_dump/Users.structure.json
@@ -0,0 +1 @@
+{"allInSync":true,"indexes":[],"isReady":true,"parameters":{"cacheEnabled":false,"deleted":false,"distributeShardsLike":"_graphs","globallyUniqueId":"c2728580582/","id":"2728580582","isDisjoint":false,"isSmart":false,"isSmartChild":false,"isSystem":false,"keyOptions":{"allowUserKeys":true,"type":"traditional"},"minReplicationFactor":1,"name":"Users","numberOfShards":1,"planId":"2728580582","replicationFactor":3,"schema":null,"shardKeys":["_key"],"shardingStrategy":"hash","shards":{"s2728580583":["PRMR-1vqwuhks","PRMR-bvgkeorm","PRMR-zpamyasv"]},"status":3,"type":2,"waitForSync":false,"writeConcern":1},"planVersion":10405}
\ No newline at end of file
diff --git a/tests/data/adb/imdb_dump/Users_f9aae5fda8d810a29f12d1e61b4ab25f.data.json.gz b/tests/data/adb/imdb_dump/Users_f9aae5fda8d810a29f12d1e61b4ab25f.data.json.gz
new file mode 100644
index 0000000..4eb3a4c
Binary files /dev/null and b/tests/data/adb/imdb_dump/Users_f9aae5fda8d810a29f12d1e61b4ab25f.data.json.gz differ
diff --git a/tests/data/adb/imdb_dump/dump.json b/tests/data/adb/imdb_dump/dump.json
new file mode 100644
index 0000000..b2a69d9
--- /dev/null
+++ b/tests/data/adb/imdb_dump/dump.json
@@ -0,0 +1 @@
+{"database":"TUTdit9ohpgz1ntnbetsjstwi","lastTickAtDumpStart":"2732644865","properties":{"id":"2728554641","name":"TUTdit9ohpgz1ntnbetsjstwi","isSystem":false,"sharding":"","replicationFactor":1,"writeConcern":1,"path":""}}
\ No newline at end of file
diff --git a/tests/test_adapter.py b/tests/test_adapter.py
index 84cbd9f..4d913e4 100644
--- a/tests/test_adapter.py
+++ b/tests/test_adapter.py
@@ -1,23 +1,39 @@
-from typing import Any, Dict, Set, Union
+from collections import defaultdict
+from typing import Any, Dict, List, Optional, Set, Union
import pytest
-from arango.database import StandardDatabase
-from arango.graph import Graph as ArangoGraph
-from dgl import DGLGraph
-from dgl.heterograph import DGLHeteroGraph
-from torch import Tensor
+from dgl import DGLGraph, DGLHeteroGraph
+from dgl.view import EdgeSpace, NodeSpace
+from pandas import DataFrame
+from torch import Tensor, cat, long, tensor
from adbdgl_adapter import ADBDGL_Adapter
-from adbdgl_adapter.typings import ArangoMetagraph
+from adbdgl_adapter.encoders import CategoricalEncoder, IdentityEncoder
+from adbdgl_adapter.exceptions import ADBMetagraphError, DGLMetagraphError
+from adbdgl_adapter.typings import (
+ ADBMap,
+ ADBMetagraph,
+ ADBMetagraphValues,
+ DGLCanonicalEType,
+ DGLMetagraph,
+ DGLMetagraphValues,
+)
+from adbdgl_adapter.utils import validate_adb_metagraph, validate_dgl_metagraph
from .conftest import (
+ Custom_ADBDGL_Controller,
adbdgl_adapter,
+ arango_restore,
+ con,
db,
- get_clique_graph,
+ get_fake_hetero_dataset,
get_hypercube_graph,
get_karate_graph,
- get_lollipop_graph,
get_social_graph,
+ label_tensor_to_2_column_dataframe,
+ udf_features_df_to_tensor,
+ udf_key_df_to_tensor,
+ udf_users_features_tensor_to_df,
)
@@ -28,210 +44,866 @@ class Bad_ADBDGL_Controller:
pass
with pytest.raises(TypeError):
- ADBDGL_Adapter(bad_db)
+ ADBDGL_Adapter(bad_db) # type: ignore
with pytest.raises(TypeError):
ADBDGL_Adapter(db, Bad_ADBDGL_Controller()) # type: ignore
@pytest.mark.parametrize(
- "adapter, name, metagraph",
- [
+ "bad_metagraph",
+ [ # empty metagraph
+ ({}),
+ # missing required parent key
+ ({"vertexCollections": {}}),
+ # empty sub-metagraph
+ ({"vertexCollections": {}, "edgeCollections": {}}),
+ # bad collection name
(
- adbdgl_adapter,
- "fraud-detection",
{
"vertexCollections": {
- "account": {"Balance", "rank"},
- "customer": {"rank"},
- "Class": {},
+ 1: {},
+ # other examples include:
+ # True: {},
+ # ('a'): {}
},
- "edgeCollections": {
- "transaction": {
- "transaction_amt",
- "sender_bank_id",
- "receiver_bank_id",
- },
- "accountHolder": {},
- "Relationship": {},
+ "edgeCollections": {},
+ }
+ ),
+ # bad collection metagraph
+ (
+ {
+ "vertexCollections": {
+ "vcol_a": None,
+ # other examples include:
+ # "vcol_a": 1,
+ # "vcol_a": 'foo',
},
- },
+ "edgeCollections": {},
+ }
+ ),
+ # bad collection metagraph 2
+ (
+ {
+ "vertexCollections": {
+ "vcol_a": {"a", "b", 3},
+ # other examples include:
+ # "vcol_a": 1,
+ # "vcol_a": 'foo',
+ },
+ "edgeCollections": {},
+ }
+ ),
+ # bad meta_key
+ (
+ {
+ "vertexCollections": {
+ "vcol_a": {
+ 1: {},
+ # other example include:
+ # True: {},
+ # ("x"): {},
+ }
+ },
+ "edgeCollections": {},
+ }
+ ),
+ # bad meta_val
+ (
+ {
+ "vertexCollections": {
+ "vcol_a": {
+ "x": True,
+ # other example include:
+ # 'x': ('a'),
+ # 'x': ['a'],
+ # 'x': 5
+ }
+ },
+ "edgeCollections": {},
+ }
+ ),
+ # bad meta_val encoder key
+ (
+ {
+ "vertexCollections": {"vcol_a": {"x": {1: IdentityEncoder()}}},
+ "edgeCollections": {},
+ }
+ ),
+ # bad meta_val encoder value
+ (
+ {
+ "vertexCollections": {
+ "vcol_a": {
+ "x": {
+ "Action": True,
+ # other examples include:
+ # 'Action': {}
+ # 'Action': (lambda : 1)()
+ }
+ }
+ },
+ "edgeCollections": {},
+ }
),
],
)
-def test_adb_to_dgl(
- adapter: ADBDGL_Adapter, name: str, metagraph: ArangoMetagraph
-) -> None:
- dgl_g = adapter.arangodb_to_dgl(name, metagraph)
- assert_dgl_data(db, dgl_g, metagraph)
+def test_validate_adb_metagraph(bad_metagraph: Dict[Any, Any]) -> None:
+ with pytest.raises(ADBMetagraphError):
+ validate_adb_metagraph(bad_metagraph)
+
+
+@pytest.mark.parametrize(
+ "bad_metagraph",
+ [
+ # bad node type
+ (
+ {
+ "nodeTypes": {
+ ("a", "b", "c"): {},
+ # other examples include:
+ # 1: {},
+ # True: {}
+ }
+ }
+ ),
+ # bad edge type
+ (
+ {
+ "edgeTypes": {
+ "b": {},
+ # other examples include:
+ # 1: {},
+ # True: {}
+ }
+ }
+ ),
+ # bad edge type 2
+ (
+ {
+ "edgeTypes": {
+ ("a", "b", 3): {},
+ # other examples include:
+ # 1: {},
+ # True: {}
+ }
+ }
+ ),
+ # bad data type metagraph
+ (
+ {
+ "nodeTypes": {
+ "ntype_a": None,
+ # other examples include:
+ # "ntype_a": 1,
+ # "ntype_a": 'foo',
+ }
+ }
+ ),
+ # bad data type metagraph 2
+ ({"nodeTypes": {"ntype_a": {"a", "b", 3}}}),
+ # bad meta_val
+ (
+ {
+ "nodeTypes": {
+ "ntype_a'": {
+ "x": True,
+ # other example include:
+ # 'x': ('a'),
+ # 'x': (lambda: 1)(),
+ }
+ }
+ }
+ ),
+ # bad meta_val list
+ (
+ {
+ "nodeTypes": {
+ "ntype_a'": {
+ "x": ["a", 3],
+ # other example include:
+ # 'x': ('a'),
+ # 'x': (lambda: 1)(),
+ }
+ }
+ }
+ ),
+ ],
+)
+def test_validate_dgl_metagraph(bad_metagraph: Dict[Any, Any]) -> None:
+ with pytest.raises(DGLMetagraphError):
+ validate_dgl_metagraph(bad_metagraph)
@pytest.mark.parametrize(
- "adapter, name, v_cols, e_cols",
+ "adapter, name, dgl_g, metagraph, \
+ explicit_metagraph, overwrite_graph, batch_size, adb_import_kwargs",
[
(
adbdgl_adapter,
- "fraud-detection",
- {"account", "Class", "customer"},
- {"accountHolder", "Relationship", "transaction"},
- )
+ "Karate_1",
+ get_karate_graph(),
+ {"nodeTypes": {"Karate_1_N": {"label": "node_label"}}},
+ False,
+ False,
+ 33,
+ {},
+ ),
+ (
+ adbdgl_adapter,
+ "Karate_2",
+ get_karate_graph(),
+ {"nodeTypes": {"Karate_2_N": {}}},
+ True,
+ False,
+ 1000,
+ {},
+ ),
+ (
+ adbdgl_adapter,
+ "Social_1",
+ get_social_graph(),
+ {
+ "nodeTypes": {
+ "user": {
+ "features": "user_age",
+ "label": label_tensor_to_2_column_dataframe,
+ },
+ "game": {"features": ["is_multiplayer", "is_free_to_play"]},
+ },
+ "edgeTypes": {
+ ("user", "plays", "game"): {
+ "features": ["hours_played", "is_satisfied_with_game"]
+ },
+ },
+ },
+ True,
+ False,
+ 1,
+ {},
+ ),
+ (
+ adbdgl_adapter,
+ "Social_2",
+ get_social_graph(),
+ {
+ "edgeTypes": {
+ ("user", "plays", "game"): {
+ "features": ["hours_played", "is_satisfied_with_game"]
+ },
+ },
+ },
+ True,
+ False,
+ 1000,
+ {},
+ ),
+ (
+ adbdgl_adapter,
+ "Social_3",
+ get_social_graph(),
+ {},
+ False,
+ False,
+ None,
+ {},
+ ),
+ (
+ adbdgl_adapter,
+ "FakeHeterogeneous_1",
+ get_fake_hetero_dataset(),
+ {
+ "nodeTypes": {
+ "v0": {"features": "adb_node_features", "label": "adb_node_label"}
+ },
+ "edgeTypes": {("v0", "e0", "v0"): {"features": "adb_edge_features"}},
+ },
+ True,
+ False,
+ None,
+ {},
+ ),
+ (
+ adbdgl_adapter,
+ "FakeHeterogeneous_2",
+ get_fake_hetero_dataset(),
+ {},
+ False,
+ False,
+ None,
+ {},
+ ),
+ (
+ adbdgl_adapter,
+ "FakeHeterogeneous_3",
+ get_fake_hetero_dataset(),
+ {
+ "nodeTypes": {"v0": {"features", "label"}},
+ "edgeTypes": {("v0", "e0", "v0"): {"features"}},
+ },
+ True,
+ True,
+ None,
+ {},
+ ),
],
)
-def test_adb_collections_to_dgl(
- adapter: ADBDGL_Adapter, name: str, v_cols: Set[str], e_cols: Set[str]
+def test_dgl_to_adb(
+ adapter: ADBDGL_Adapter,
+ name: str,
+ dgl_g: Union[DGLGraph, DGLHeteroGraph],
+ metagraph: DGLMetagraph,
+ explicit_metagraph: bool,
+ overwrite_graph: bool,
+ batch_size: Optional[int],
+ adb_import_kwargs: Any,
) -> None:
- dgl_g = adapter.arangodb_collections_to_dgl(
+ db.delete_graph(name, drop_collections=True, ignore_missing=True)
+ adapter.dgl_to_arangodb(
name,
- v_cols,
- e_cols,
- )
- assert_dgl_data(
- db,
dgl_g,
- metagraph={
- "vertexCollections": {col: set() for col in v_cols},
- "edgeCollections": {col: set() for col in e_cols},
- },
+ metagraph,
+ explicit_metagraph,
+ overwrite_graph,
+ batch_size,
+ **adb_import_kwargs
)
+ assert_dgl_to_adb(name, dgl_g, metagraph, explicit_metagraph)
+ db.delete_graph(name, drop_collections=True)
-@pytest.mark.parametrize(
- "adapter, name",
- [(adbdgl_adapter, "fraud-detection")],
-)
-def test_adb_graph_to_dgl(adapter: ADBDGL_Adapter, name: str) -> None:
- arango_graph = db.graph(name)
- v_cols = arango_graph.vertex_collections()
- e_cols = {col["edge_collection"] for col in arango_graph.edge_definitions()}
-
- dgl_g: DGLGraph = adapter.arangodb_graph_to_dgl(name)
- assert_dgl_data(
- db,
- dgl_g,
- metagraph={
- "vertexCollections": {col: set() for col in v_cols},
- "edgeCollections": {col: set() for col in e_cols},
- },
- )
+def test_dgl_to_adb_with_controller() -> None:
+ name = "Karate_3"
+ data = get_karate_graph()
+ db.delete_graph(name, drop_collections=True, ignore_missing=True)
+
+ ADBDGL_Adapter(db, Custom_ADBDGL_Controller()).dgl_to_arangodb(name, data)
+
+ for doc in db.collection(name + "_N"): # type: ignore
+ assert "foo" in doc
+ assert doc["foo"] == "bar"
+
+ for edge in db.collection(name + "_E"): # type: ignore
+ assert "bar" in edge
+ assert edge["bar"] == "foo"
+
+ db.delete_graph(name, drop_collections=True)
@pytest.mark.parametrize(
- "adapter, name, dgl_g, overwrite_graph, import_options",
+ "adapter, name, metagraph, dgl_g_old, batch_size",
[
(
adbdgl_adapter,
- "Clique",
- get_clique_graph(),
- False,
- {"batch_size": 3, "on_duplicate": "replace"},
+ "Karate",
+ {
+ "vertexCollections": {
+ "Karate_N": {"karate_label": "label"},
+ },
+ "edgeCollections": {
+ "Karate_E": {},
+ },
+ },
+ get_karate_graph(),
+ 1,
),
- (adbdgl_adapter, "Lollipop", get_lollipop_graph(), False, {"overwrite": True}),
(
adbdgl_adapter,
- "Hypercube",
- get_hypercube_graph(),
- False,
- {"batch_size": 1000, "on_duplicate": "replace"},
+ "Karate_2",
+ {
+ "vertexCollections": {
+ "Karate_2_N": {"karate_label": "label"},
+ },
+ "edgeCollections": {
+ "Karate_2_E": {},
+ },
+ },
+ get_karate_graph(),
+ 33,
),
(
adbdgl_adapter,
"Hypercube",
+ {
+ "vertexCollections": {
+ "Hypercube_N": {"node_features": "node_features"},
+ },
+ "edgeCollections": {
+ "Hypercube_E": {"edge_features": "edge_features"},
+ },
+ },
get_hypercube_graph(),
- False,
- {"overwrite": True},
+ 1000,
),
- (adbdgl_adapter, "Karate", get_karate_graph(), False, {"overwrite": True}),
(
adbdgl_adapter,
"Social",
+ {
+ "vertexCollections": {
+ "user": {"node_features": "features", "label": "label"},
+ "game": {"node_features": "features"},
+ "topic": {},
+ },
+ "edgeCollections": {
+ "plays": {"edge_features": "features"},
+ "follows": {},
+ },
+ },
get_social_graph(),
- True,
- {"on_duplicate": "replace"},
+ 1,
+ ),
+ (
+ adbdgl_adapter,
+ "Heterogeneous",
+ {
+ "vertexCollections": {
+ "v0": {"features": "features", "label": "label"},
+ "v1": {"features": "features"},
+ "v2": {"features": "features"},
+ },
+ "edgeCollections": {
+ "e0": {},
+ },
+ },
+ get_fake_hetero_dataset(),
+ 1000,
+ ),
+ (
+ adbdgl_adapter,
+ "HeterogeneousSimpleMetagraph",
+ {
+ "vertexCollections": {
+ "v0": {"features", "label"},
+ "v1": {"features"},
+ "v2": {"features"},
+ },
+ "edgeCollections": {
+ "e0": {},
+ },
+ },
+ get_fake_hetero_dataset(),
+ None,
+ ),
+ (
+ adbdgl_adapter,
+ "HeterogeneousOverComplicatedMetagraph",
+ {
+ "vertexCollections": {
+ "v0": {"features": {"features": None}, "label": {"label": None}},
+ "v1": {"features": "features"},
+ "v2": {"features": {"features": None}},
+ },
+ "edgeCollections": {
+ "e0": {},
+ },
+ },
+ get_fake_hetero_dataset(),
+ None,
+ ),
+ (
+ adbdgl_adapter,
+ "HeterogeneousUserDefinedFunctions",
+ {
+ "vertexCollections": {
+ "v0": {
+ "features": (lambda df: tensor(df["features"].to_list())),
+ "label": (lambda df: tensor(df["label"].to_list())),
+ },
+ "v1": {"features": udf_features_df_to_tensor},
+ "v2": {"features": udf_key_df_to_tensor("features")},
+ },
+ "edgeCollections": {
+ "e0": {},
+ },
+ },
+ get_fake_hetero_dataset(),
+ None,
),
],
)
-def test_dgl_to_adb(
+def test_adb_to_dgl(
adapter: ADBDGL_Adapter,
name: str,
- dgl_g: Union[DGLGraph, DGLHeteroGraph],
- overwrite_graph: bool,
- import_options: Any,
+ metagraph: ADBMetagraph,
+ dgl_g_old: Optional[Union[DGLGraph, DGLHeteroGraph]],
+ batch_size: Optional[None],
+) -> None:
+ if dgl_g_old:
+ db.delete_graph(name, drop_collections=True, ignore_missing=True)
+ adapter.dgl_to_arangodb(name, dgl_g_old)
+
+ dgl_g_new = adapter.arangodb_to_dgl(name, metagraph, batch_size=batch_size)
+ assert_adb_to_dgl(dgl_g_new, metagraph)
+
+ if dgl_g_old:
+ db.delete_graph(name, drop_collections=True)
+
+
+def test_adb_partial_to_dgl() -> None:
+ dgl_g = get_social_graph()
+
+ name = "Social"
+ db.delete_graph(name, drop_collections=True, ignore_missing=True)
+ adbdgl_adapter.dgl_to_arangodb(name, dgl_g)
+
+ metagraph: ADBMetagraph
+
+ # Case 1: Partial edge collection import turns the graph homogeneous
+ metagraph = {
+ "vertexCollections": {
+ "user": {"features": "features", "label": "label"},
+ },
+ "edgeCollections": {
+ "follows": {},
+ },
+ }
+
+ dgl_g_new = adbdgl_adapter.arangodb_to_dgl(
+ "HeterogeneousTurnedHomogeneous", metagraph
+ )
+
+ assert dgl_g_new.is_homogeneous
+ assert (
+ dgl_g.ndata["features"]["user"].tolist() == dgl_g_new.ndata["features"].tolist()
+ )
+ assert dgl_g.ndata["label"]["user"].tolist() == dgl_g_new.ndata["label"].tolist()
+
+ # Grab the nodes from the Heterogeneous graph
+ from_nodes, to_nodes = dgl_g.edges(etype=("user", "follows", "user"))
+ # Grab the same nodes from the Homogeneous graph
+ from_nodes_new, to_nodes_new = dgl_g_new.edges(etype=None)
+
+ assert from_nodes.tolist() == from_nodes_new.tolist()
+ assert to_nodes.tolist() == to_nodes_new.tolist()
+
+ # Case 2: Partial edge collection import keeps the graph heterogeneous
+ metagraph = {
+ "vertexCollections": {
+ "user": {"features": "features", "label": "label"},
+ "game": {"features": "features"},
+ },
+ "edgeCollections": {"follows": {}, "plays": {"features": "features"}},
+ }
+
+ dgl_g_new = adbdgl_adapter.arangodb_to_dgl(
+ "HeterogeneousWithOneLessNodeType", metagraph
+ )
+
+ assert type(dgl_g_new) is DGLHeteroGraph
+ assert set(dgl_g_new.ntypes) == {"user", "game"}
+ for n_type in dgl_g_new.ntypes:
+ for k, v in dgl_g_new.nodes[n_type].data.items():
+ assert v.tolist() == dgl_g.nodes[n_type].data[k].tolist()
+
+ for e_type in dgl_g_new.canonical_etypes:
+ for k, v in dgl_g_new.edges[e_type].data.items():
+ assert v.tolist() == dgl_g.edges[e_type].data[k].tolist()
+
+ db.delete_graph(name, drop_collections=True)
+
+
+@pytest.mark.parametrize(
+ "adapter, name, v_cols, e_cols, dgl_g_old",
+ [
+ (
+ adbdgl_adapter,
+ "SocialGraph",
+ {"user", "game"},
+ {"plays", "follows"},
+ get_social_graph(),
+ )
+ ],
+)
+def test_adb_collections_to_dgl(
+ adapter: ADBDGL_Adapter,
+ name: str,
+ v_cols: Set[str],
+ e_cols: Set[str],
+ dgl_g_old: Union[DGLGraph, DGLHeteroGraph],
) -> None:
- adb_g = adapter.dgl_to_arangodb(name, dgl_g, overwrite_graph, **import_options)
- assert_arangodb_data(name, dgl_g, adb_g)
+ if dgl_g_old:
+ db.delete_graph(name, drop_collections=True, ignore_missing=True)
+ adapter.dgl_to_arangodb(name, dgl_g_old)
+
+ dgl_g_new = adapter.arangodb_collections_to_dgl(
+ name,
+ v_cols,
+ e_cols,
+ )
+
+ assert_adb_to_dgl(
+ dgl_g_new,
+ metagraph={
+ "vertexCollections": {col: {} for col in v_cols},
+ "edgeCollections": {col: {} for col in e_cols},
+ },
+ )
+
+ if dgl_g_old:
+ db.delete_graph(name, drop_collections=True)
+
+
+@pytest.mark.parametrize(
+ "adapter, name, dgl_g_old",
+ [
+ (adbdgl_adapter, "Heterogeneous", get_fake_hetero_dataset()),
+ ],
+)
+def test_adb_graph_to_dgl(
+ adapter: ADBDGL_Adapter, name: str, dgl_g_old: Union[DGLGraph, DGLHeteroGraph]
+) -> None:
+ if dgl_g_old:
+ db.delete_graph(name, drop_collections=True, ignore_missing=True)
+ adapter.dgl_to_arangodb(name, dgl_g_old)
+
+ dgl_g_new = adapter.arangodb_graph_to_dgl(name)
+
+ graph = db.graph(name)
+ v_cols: Set[str] = graph.vertex_collections() # type: ignore
+ edge_definitions: List[Dict[str, Any]] = graph.edge_definitions() # type: ignore
+ e_cols: Set[str] = {c["edge_collection"] for c in edge_definitions}
+
+ assert_adb_to_dgl(
+ dgl_g_new,
+ metagraph={
+ "vertexCollections": {col: {} for col in v_cols},
+ "edgeCollections": {col: {} for col in e_cols},
+ },
+ )
+
+ if dgl_g_old:
+ db.delete_graph(name, drop_collections=True)
-def assert_dgl_data(
- db: StandardDatabase, dgl_g: DGLGraph, metagraph: ArangoMetagraph
+def test_full_cycle_imdb() -> None:
+ name = "imdb"
+ db.delete_graph(name, drop_collections=True, ignore_missing=True)
+ arango_restore(con, "tests/data/adb/imdb_dump")
+ db.create_graph(
+ name,
+ edge_definitions=[
+ {
+ "edge_collection": "Ratings",
+ "from_vertex_collections": ["Users"],
+ "to_vertex_collections": ["Movies"],
+ },
+ ],
+ )
+
+ adb_to_dgl_metagraph: ADBMetagraph = {
+ "vertexCollections": {
+ "Movies": {
+ "label": "Comedy",
+ "features": {
+ "Action": IdentityEncoder(dtype=long),
+ "Drama": IdentityEncoder(dtype=long),
+ # etc....
+ },
+ },
+ "Users": {
+ "features": {
+ "Age": IdentityEncoder(dtype=long),
+ "Gender": CategoricalEncoder(),
+ }
+ },
+ },
+ "edgeCollections": {"Ratings": {"weight": "Rating"}},
+ }
+
+ dgl_g = adbdgl_adapter.arangodb_to_dgl(name, adb_to_dgl_metagraph)
+ assert_adb_to_dgl(dgl_g, adb_to_dgl_metagraph)
+
+ dgl_to_adb_metagraph: DGLMetagraph = {
+ "nodeTypes": {
+ "Movies": {
+ "label": "comedy",
+ "features": ["action", "drama"],
+ },
+ "Users": {"features": udf_users_features_tensor_to_df},
+ },
+ "edgeTypes": {("Users", "Ratings", "Movies"): {"weight": "rating"}},
+ }
+ adbdgl_adapter.dgl_to_arangodb(name, dgl_g, dgl_to_adb_metagraph, overwrite=True)
+ assert_dgl_to_adb(name, dgl_g, dgl_to_adb_metagraph)
+
+ db.delete_graph(name, drop_collections=True)
+
+
+def assert_adb_to_dgl(
+ dgl_g: Union[DGLGraph, DGLHeteroGraph], metagraph: ADBMetagraph
) -> None:
- has_one_ntype = len(metagraph["vertexCollections"]) == 1
- has_one_etype = len(metagraph["edgeCollections"]) == 1
-
- for col, atribs in metagraph["vertexCollections"].items():
- num_nodes = dgl_g.num_nodes(col)
- assert num_nodes == db.collection(col).count()
-
- for atrib in atribs:
- assert atrib in dgl_g.ndata
- if has_one_ntype:
- assert len(dgl_g.ndata[atrib]) == num_nodes
- else:
- assert col in dgl_g.ndata[atrib]
- assert len(dgl_g.ndata[atrib][col]) == num_nodes
-
- for col, atribs in metagraph["edgeCollections"].items():
- num_edges = dgl_g.num_edges(col)
- assert num_edges == db.collection(col).count()
-
- canon_etype = dgl_g.to_canonical_etype(col)
- for atrib in atribs:
- assert atrib in dgl_g.edata
- if has_one_etype:
- assert len(dgl_g.edata[atrib]) == num_edges
- else:
- assert canon_etype in dgl_g.edata[atrib]
- assert len(dgl_g.edata[atrib][canon_etype]) == num_edges
-
-
-def assert_arangodb_data(
+ has_one_ntype = len(dgl_g.ntypes) == 1
+ has_one_etype = len(dgl_g.canonical_etypes) == 1
+
+ # Maps ArangoDB Vertex _keys to DGL Node ids
+ adb_map: ADBMap = defaultdict(dict)
+
+ for v_col, meta in metagraph["vertexCollections"].items():
+ n_key = None if has_one_ntype else v_col
+ collection = db.collection(v_col)
+ assert collection.count() == dgl_g.num_nodes(n_key)
+
+ df = DataFrame(collection.all())
+ adb_map[v_col] = {adb_id: dgl_id for dgl_id, adb_id in enumerate(df["_key"])}
+
+ assert_adb_to_dgl_meta(meta, df, dgl_g.nodes[n_key].data)
+
+ et_df: DataFrame
+ v_cols: List[str] = list(metagraph["vertexCollections"].keys())
+ for e_col, meta in metagraph["edgeCollections"].items():
+ collection = db.collection(e_col)
+ assert collection.count() <= dgl_g.num_edges(None)
+
+ df = DataFrame(collection.all())
+ df[["from_col", "from_key"]] = df["_from"].str.split(pat="/", n=1, expand=True)
+ df[["to_col", "to_key"]] = df["_to"].str.split(pat="/", n=1, expand=True)
+
+ for (from_col, to_col), count in (
+ df[["from_col", "to_col"]].value_counts().items()
+ ):
+ edge_type = (from_col, e_col, to_col)
+ if from_col not in v_cols or to_col not in v_cols:
+ continue
+
+ e_key = None if has_one_etype else edge_type
+ assert count == dgl_g.num_edges(e_key)
+
+ et_df = df[(df["from_col"] == from_col) & (df["to_col"] == to_col)]
+ from_nodes = et_df["from_key"].map(adb_map[from_col]).tolist()
+ to_nodes = et_df["to_key"].map(adb_map[to_col]).tolist()
+
+ assert from_nodes == dgl_g.edges(etype=e_key)[0].tolist()
+ assert to_nodes == dgl_g.edges(etype=e_key)[1].tolist()
+
+ assert_adb_to_dgl_meta(meta, et_df, dgl_g.edges[e_key].data)
+
+
+def assert_adb_to_dgl_meta(
+ meta: Union[Set[str], Dict[str, ADBMetagraphValues]],
+ df: DataFrame,
+ dgl_data: Union[NodeSpace, EdgeSpace],
+) -> None:
+ valid_meta: Dict[str, ADBMetagraphValues]
+ valid_meta = meta if type(meta) is dict else {m: m for m in meta}
+
+ for k, v in valid_meta.items():
+ assert k in dgl_data
+ assert type(dgl_data[k]) is Tensor
+
+ t = dgl_data[k].tolist()
+ if type(v) is str:
+ data = df[v].tolist()
+ assert len(data) == len(t)
+ assert data == t
+
+ if type(v) is dict:
+ data = []
+ for attr, encoder in v.items():
+ if encoder is None:
+ data.append(tensor(df[attr].to_list()))
+ if callable(encoder):
+ data.append(encoder(df[attr]))
+
+ cat_data = cat(data, dim=-1).tolist()
+ assert len(cat_data) == len(t)
+ assert cat_data == t
+
+ if callable(v):
+ data = v(df).tolist()
+ assert len(data) == len(t)
+ assert data == t
+
+
+def assert_dgl_to_adb(
name: str,
dgl_g: Union[DGLGraph, DGLHeteroGraph],
- adb_g: ArangoGraph,
+ metagraph: DGLMetagraph,
+ explicit_metagraph: bool = False,
) -> None:
- is_default_type = dgl_g.canonical_etypes == adbdgl_adapter.DEFAULT_CANONICAL_ETYPE
-
- node: Tensor
- for ntype in dgl_g.ntypes:
- adb_v_col = f"{name}_N" if is_default_type else ntype
- attributes = dgl_g.node_attr_schemes(ntype).keys()
- col = adb_g.vertex_collection(adb_v_col)
-
- for node in dgl_g.nodes(ntype):
- vertex = col.get(str(node.item()))
- assert vertex
- for atrib in attributes:
- assert atrib in vertex
-
- from_node: Tensor
- to_node: Tensor
- for c_etype in dgl_g.canonical_etypes:
- dgl_from_col, dgl_e_col, dgl_to_col = c_etype
- attributes = dgl_g.edge_attr_schemes(c_etype).keys()
-
- adb_e_col = f"{name}_E" if is_default_type else dgl_e_col
- adb_from_col = f"{name}_N" if is_default_type else dgl_from_col
- adb_to_col = f"{name}_N" if is_default_type else dgl_to_col
-
- col = adb_g.edge_collection(adb_e_col)
-
- from_nodes, to_nodes = dgl_g.edges(etype=c_etype)
- for from_node, to_node in zip(from_nodes, to_nodes):
- edge = col.find(
- {
- "_from": f"{adb_from_col}/{str(from_node.item())}",
- "_to": f"{adb_to_col}/{str(to_node.item())}",
- }
- ).next()
- assert edge
- for atrib in attributes:
- assert atrib in edge
+ has_one_ntype = len(dgl_g.ntypes) == 1
+ has_one_etype = len(dgl_g.canonical_etypes) == 1
+ has_default_canonical_etypes = dgl_g.canonical_etypes == [("_N", "_E", "_N")]
+
+ node_types: List[str]
+ edge_types: List[DGLCanonicalEType]
+ explicit_metagraph = metagraph != {} and explicit_metagraph
+ if explicit_metagraph:
+ node_types = metagraph.get("nodeTypes", {}).keys() # type: ignore
+ edge_types = metagraph.get("edgeTypes", {}).keys() # type: ignore
+
+ elif has_default_canonical_etypes:
+ n_type = name + "_N"
+ node_types = [n_type]
+ edge_types = [(n_type, name + "_E", n_type)]
+
+ else:
+ node_types = dgl_g.ntypes
+ edge_types = dgl_g.canonical_etypes
+
+ n_meta = metagraph.get("nodeTypes", {})
+ for n_type in node_types:
+ n_key = None if has_one_ntype else n_type
+ collection = db.collection(n_type)
+ assert collection.count() == dgl_g.num_nodes(n_key)
+
+ df = DataFrame(collection.all())
+ meta = n_meta.get(n_type, {})
+ assert_dgl_to_adb_meta(df, meta, dgl_g.nodes[n_key].data, explicit_metagraph)
+
+ e_meta = metagraph.get("edgeTypes", {})
+ for e_type in edge_types:
+ e_key = None if has_one_etype else e_type
+ from_col, e_col, to_col = e_type
+ collection = db.collection(e_col)
+
+ df = DataFrame(collection.all())
+ df[["from_col", "from_key"]] = df["_from"].str.split(pat="/", n=1, expand=True)
+ df[["to_col", "to_key"]] = df["_to"].str.split(pat="/", n=1, expand=True)
+
+ et_df = df[(df["from_col"] == from_col) & (df["to_col"] == to_col)]
+ assert len(et_df) == dgl_g.num_edges(e_key)
+
+ from_nodes = dgl_g.edges(etype=e_key)[0].tolist()
+ to_nodes = dgl_g.edges(etype=e_key)[1].tolist()
+
+ assert from_nodes == et_df["from_key"].astype(int).tolist()
+ assert to_nodes == et_df["to_key"].astype(int).tolist()
+
+ meta = e_meta.get(e_type, {})
+ assert_dgl_to_adb_meta(et_df, meta, dgl_g.edges[e_key].data, explicit_metagraph)
+
+
+def assert_dgl_to_adb_meta(
+ df: DataFrame,
+ meta: Union[Set[str], Dict[Any, DGLMetagraphValues]],
+ dgl_data: Union[NodeSpace, EdgeSpace],
+ explicit_metagraph: bool,
+) -> None:
+ valid_meta: Dict[Any, DGLMetagraphValues]
+ valid_meta = meta if type(meta) is dict else {m: m for m in meta}
+
+ if explicit_metagraph:
+ dgl_keys = set(valid_meta.keys())
+ else:
+ dgl_keys = dgl_data.keys()
+
+ for k in dgl_keys:
+ data = dgl_data[k]
+ meta_val = valid_meta.get(k, str(k))
+
+ assert len(data) == len(df)
+
+ if type(data) is Tensor:
+ if type(meta_val) is str:
+ assert meta_val in df
+ assert df[meta_val].tolist() == data.tolist()
+
+ if type(meta_val) is list:
+ assert all([e in df for e in meta_val])
+ assert df[meta_val].values.tolist() == data.tolist()
+
+ if callable(meta_val):
+ udf_df = meta_val(data, DataFrame(index=range(len(data))))
+ assert all([column in df for column in udf_df.columns])
+ for column in udf_df.columns:
+ assert df[column].tolist() == udf_df[column].tolist()
diff --git a/tests/assets/arangorestore b/tests/tools/arangorestore
similarity index 100%
rename from tests/assets/arangorestore
rename to tests/tools/arangorestore