Skip to content

Commit 6102033

Browse files
fix: update webui
1 parent 59205a2 commit 6102033

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

graphgen/engine.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,9 @@ def func_wrapper(row_or_batch: Dict[str, Any]) -> Dict[str, Any]:
289289
f"Unsupported node type {node.type} for node {node.id}"
290290
)
291291

292-
def execute(self, initial_ds: ray.data.Dataset, output_dir: str):
292+
def execute(
293+
self, initial_ds: ray.data.Dataset, output_dir: str
294+
) -> Dict[str, ray.data.Dataset]:
293295
sorted_nodes = self._topo_sort(self.config.nodes)
294296

295297
for node in sorted_nodes:
@@ -314,3 +316,5 @@ def execute(self, initial_ds: ray.data.Dataset, output_dir: str):
314316

315317
# ray will lazy read the dataset
316318
self.datasets[node.id] = ray.data.read_json(node_output_path)
319+
320+
return self.datasets

webui/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import gc
12
import json
23
import os
34
import sys
4-
import gc
55
import tempfile
66
from importlib.resources import files
77

@@ -188,7 +188,7 @@ def run_graphgen(params: WebuiParams, progress=gr.Progress()):
188188
ds = ray.data.from_items([])
189189

190190
# Execute pipeline
191-
results = engine.execute(ds)
191+
results = engine.execute(ds, output_dir=working_dir)
192192

193193
# 5. Process Output
194194
# Extract the result from the 'generate' node

0 commit comments

Comments
 (0)