Skip to content

Commit e6767fc

Browse files
nickchomeyZanSara
andauthored
bugfix for TranslationWrapperPipeline (#3290)
* bugfix for TranslationWrapperPipeline * Update standard_pipelines.py * Update haystack/pipelines/standard_pipelines.py Co-authored-by: Sara Zan <[email protected]>
1 parent ad8fbe5 commit e6767fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

haystack/pipelines/standard_pipelines.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,10 @@ def __init__(
596596
if isinstance(pipeline, QuestionAnswerGenerationPipeline):
597597
setattr(output_translator, "run", output_translator.run_batch)
598598

599-
graph = pipeline.pipeline.graph
599+
if hasattr(pipeline, "pipeline"):
600+
graph = pipeline.pipeline.graph
601+
else:
602+
graph = pipeline.graph # type: ignore
600603
previous_node_name = ["InputTranslator"]
601604
# Traverse in BFS
602605
for node in graph.nodes:

0 commit comments

Comments
 (0)