Makes all vertices be considered for output retrieval
This commit is contained in:
parent
603dba8a4a
commit
230982161e
1 changed files with 4 additions and 1 deletions
|
|
@ -162,14 +162,16 @@ class Graph:
|
||||||
if vertex is None:
|
if vertex is None:
|
||||||
raise ValueError(f"Vertex {vertex_id} not found")
|
raise ValueError(f"Vertex {vertex_id} not found")
|
||||||
vertex.update_raw_params({"session_id": session_id})
|
vertex.update_raw_params({"session_id": session_id})
|
||||||
|
# Process the graph
|
||||||
try:
|
try:
|
||||||
await self.process()
|
await self.process()
|
||||||
self.increment_run_count()
|
self.increment_run_count()
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.exception(exc)
|
logger.exception(exc)
|
||||||
raise ValueError(f"Error running graph: {exc}") from exc
|
raise ValueError(f"Error running graph: {exc}") from exc
|
||||||
|
# Get the outputs
|
||||||
vertex_outputs = []
|
vertex_outputs = []
|
||||||
for vertex_id in self._is_output_vertices:
|
for vertex_id in self.vertices:
|
||||||
vertex = self.get_vertex(vertex_id)
|
vertex = self.get_vertex(vertex_id)
|
||||||
if vertex is None:
|
if vertex is None:
|
||||||
raise ValueError(f"Vertex {vertex_id} not found")
|
raise ValueError(f"Vertex {vertex_id} not found")
|
||||||
|
|
@ -178,6 +180,7 @@ class Graph:
|
||||||
await vertex.consume_async_generator()
|
await vertex.consume_async_generator()
|
||||||
if not outputs or (vertex.display_name in outputs or vertex.id in outputs):
|
if not outputs or (vertex.display_name in outputs or vertex.id in outputs):
|
||||||
vertex_outputs.append(vertex.result)
|
vertex_outputs.append(vertex.result)
|
||||||
|
|
||||||
return vertex_outputs
|
return vertex_outputs
|
||||||
|
|
||||||
async def run(
|
async def run(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue