Skip to content

Commit 67cc619

Browse files
adding best batches and updated automatic link recommendation ui logic (small bug fixes)
1 parent 170b4d3 commit 67cc619

6 files changed

Lines changed: 611545 additions & 65 deletions

initial_thoughts/automatic_led/best_batches/240_best_updated_link_graph_edges_1.csv

Lines changed: 122307 additions & 0 deletions
Large diffs are not rendered by default.

initial_thoughts/automatic_led/best_batches/240_best_updated_link_graph_edges_2.csv

Lines changed: 122307 additions & 0 deletions
Large diffs are not rendered by default.

initial_thoughts/automatic_led/best_batches/240_best_updated_link_graph_edges_3.csv

Lines changed: 122307 additions & 0 deletions
Large diffs are not rendered by default.

initial_thoughts/automatic_led/best_batches/240_best_updated_link_graph_edges_4.csv

Lines changed: 122307 additions & 0 deletions
Large diffs are not rendered by default.

initial_thoughts/automatic_led/best_batches/240_best_updated_link_graph_edges_5.csv

Lines changed: 122307 additions & 0 deletions
Large diffs are not rendered by default.

notebooks/automatic_link_recommendation_ui.ipynb

Lines changed: 10 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,77 +2,22 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": null,
66
"metadata": {
7-
"colab": {
8-
"base_uri": "https://localhost:8080/"
9-
},
10-
"id": "TYL7OLjWanv_",
11-
"outputId": "8e8b2e7e-37e1-4ece-a219-b34cdb6bcc79"
7+
"id": "TYL7OLjWanv_"
128
},
13-
"outputs": [
14-
{
15-
"name": "stdout",
16-
"output_type": "stream",
17-
"text": [
18-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m63.1/63.1 kB\u001b[0m \u001b[31m2.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
19-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m363.4/363.4 MB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
20-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.8/13.8 MB\u001b[0m \u001b[31m27.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
21-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m24.6/24.6 MB\u001b[0m \u001b[31m32.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
22-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m883.7/883.7 kB\u001b[0m \u001b[31m20.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
23-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m664.8/664.8 MB\u001b[0m \u001b[31m2.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
24-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m211.5/211.5 MB\u001b[0m \u001b[31m5.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
25-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.3/56.3 MB\u001b[0m \u001b[31m12.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
26-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m127.9/127.9 MB\u001b[0m \u001b[31m7.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
27-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m207.5/207.5 MB\u001b[0m \u001b[31m6.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
28-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.1/21.1 MB\u001b[0m \u001b[31m81.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
29-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.1/1.1 MB\u001b[0m \u001b[31m62.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
30-
"\u001b[?25h"
31-
]
32-
}
33-
],
9+
"outputs": [],
3410
"source": [
3511
"!pip install -q torch torch-geometric pandas duckdb pyarrow networkx gradio -q"
3612
]
3713
},
3814
{
3915
"cell_type": "code",
40-
"execution_count": 4,
16+
"execution_count": null,
4117
"metadata": {
42-
"colab": {
43-
"base_uri": "https://localhost:8080/",
44-
"height": 669
45-
},
46-
"id": "cAanZXMGaSGF",
47-
"outputId": "7e27d6cc-6554-47ce-e675-4e40a365c9e7"
18+
"id": "cAanZXMGaSGF"
4819
},
49-
"outputs": [
50-
{
51-
"name": "stdout",
52-
"output_type": "stream",
53-
"text": [
54-
"Mounted at /content/drive\n",
55-
"It looks like you are running Gradio on a hosted a Jupyter notebook. For the Gradio app to work, sharing must be enabled. Automatically setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n",
56-
"\n",
57-
"Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n",
58-
"* Running on public URL: https://b69dd71c31c2a5f22c.gradio.live\n",
59-
"\n",
60-
"This share link expires in 1 week. For free permanent hosting and GPU upgrades, run `gradio deploy` from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)\n"
61-
]
62-
},
63-
{
64-
"data": {
65-
"text/html": [
66-
"<div><iframe src=\"https://b69dd71c31c2a5f22c.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
67-
],
68-
"text/plain": [
69-
"<IPython.core.display.HTML object>"
70-
]
71-
},
72-
"metadata": {},
73-
"output_type": "display_data"
74-
}
75-
],
20+
"outputs": [],
7621
"source": [
7722
"import gradio as gr\n",
7823
"import pandas as pd\n",
@@ -93,7 +38,7 @@
9338
"# Add the project root to the Python path\n",
9439
"project_root = \"/content/drive/My Drive/WebKnoGraph\"\n",
9540
"if project_root not in sys.path:\n",
96-
" sys.sys.path.insert(0, project_root)\n",
41+
" sys.path.insert(0, project_root) # Corrected: removed extra 'sys.'\n",
9742
"\n",
9843
"# --- Import Real Classes from WebKnoGraph Project ---\n",
9944
"try:\n",
@@ -156,9 +101,9 @@
156101
" )\n",
157102
" self.node_mapping_path = os.path.join(base_path, \"model_metadata.json\")\n",
158103
" self.edge_index_path = os.path.join(base_path, \"edge_index.pt\")\n",
159-
" self.link_graph_edges_path = os.path.join(\n",
104+
" self.edge_csv_path = os.path.join(\n",
160105
" base_path, \"link_graph_edges.csv\"\n",
161-
" ) # Dummy path\n",
106+
" ) # Corrected dummy path\n",
162107
"\n",
163108
" # Dummy ILogger for fallback scenario\n",
164109
" class ILogger:\n",
@@ -529,7 +474,7 @@
529474
" results = []\n",
530475
" successful_recommendations_count = 0\n",
531476
"\n",
532-
" # --- Generate Original Graph Edges CSV by loading from config.link_graph_edges_path ---\n",
477+
" # --- Generate Original Graph Edges CSV by loading from config.edge_csv_path ---\n",
533478
" try:\n",
534479
" df_original_edges = pd.read_csv(\n",
535480
" config.edge_csv_path\n",

0 commit comments

Comments
 (0)