Closed TuanaCelik closed 1 year ago
Note: When trying to load this pipeline from YAML I get the following error:
The node None is not in the graph.
I checked the pipeline by looking at pipeline.graph.nodes
which turns up empty:
pipeline.load_from_yaml(Path("./pipeline/summarizer_pipeline.yaml"), pipeline_name='query')
print(f"Loaded pipeline nodes: {pipeline.graph.nodes}")
Result:
Loaded pipeline nodes: []
We looked at this with @ZanSara and it seems like this might be resolved with her PR that's coming up
@TuanaCelik i am interested in using a single-node pipeline defined in yaml through the REST API. i dumped my pipeline to yaml and got a similar result as you show above except i had no type: Pipeline
. is sending Document
s in through the API possible?
Addressed by the Pipeline refactoring (https://github.com/deepset-ai/haystack/pull/4284), so closing this thread.
I can imagine a use-case where for example you want to create a single node pipeline with just a Summarizer.
The problem I see here is that the Summarizer expects a list of Documents. Which makes creating a pipeline less intuitive as a pipeline expects 'File' or 'Query' as input.
The code below currently works:
But given the Summarizer actually expects a list of documents, the second line there is a bit un-intuitive.
I saved the above pipeline to a YAML file which resulted in the following:
A simple work-around might be to have a pipeline that converts Query to Document?
Basically what I'm trying to achieve is a demo which allows people to paste a piece of text, press play and be given a summary. This works by just calling '.predict()' but doesn't work great if you want to go down the 'pipelines' route.