Spaces:
Running
Running
Merge remote-tracking branch 'origin/main' into darabos-ga
Browse files
lynxkite-app/web/tests/examples.spec.ts
CHANGED
@@ -7,6 +7,11 @@ test("LynxKite Graph Analytics example", async ({ page }) => {
|
|
7 |
await ws.expectErrorFree(process.env.CI ? 2000 : 1000);
|
8 |
});
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
test("Pytorch example", async ({ page }) => {
|
11 |
const ws = await Workspace.open(page, "PyTorch demo");
|
12 |
await ws.expectErrorFree();
|
|
|
7 |
await ws.expectErrorFree(process.env.CI ? 2000 : 1000);
|
8 |
});
|
9 |
|
10 |
+
test("Bio example", async ({ page }) => {
|
11 |
+
const ws = await Workspace.open(page, "Bio demo");
|
12 |
+
expect(await ws.isErrorFree()).toBeTruthy();
|
13 |
+
});
|
14 |
+
|
15 |
test("Pytorch example", async ({ page }) => {
|
16 |
const ws = await Workspace.open(page, "PyTorch demo");
|
17 |
await ws.expectErrorFree();
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/lynxkite_ops.py
CHANGED
@@ -87,17 +87,22 @@ class Bundle:
|
|
87 |
if df.index.name != "id":
|
88 |
df = df.set_index("id")
|
89 |
graph.add_nodes_from(df.to_dict("index").items())
|
90 |
-
edges
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
101 |
return graph
|
102 |
|
103 |
def copy(self):
|
|
|
87 |
if df.index.name != "id":
|
88 |
df = df.set_index("id")
|
89 |
graph.add_nodes_from(df.to_dict("index").items())
|
90 |
+
if "edges" in self.dfs:
|
91 |
+
edges = self.dfs["edges"]
|
92 |
+
graph.add_edges_from(
|
93 |
+
[
|
94 |
+
(
|
95 |
+
e["source"],
|
96 |
+
e["target"],
|
97 |
+
{
|
98 |
+
k: e[k]
|
99 |
+
for k in edges.columns
|
100 |
+
if k not in ["source", "target"]
|
101 |
+
},
|
102 |
+
)
|
103 |
+
for e in edges.to_records()
|
104 |
+
]
|
105 |
+
)
|
106 |
return graph
|
107 |
|
108 |
def copy(self):
|