From 009c89fc53f230aa50a9f6cb7449e16c23a5c503 Mon Sep 17 00:00:00 2001 From: Sara Zan Date: Wed, 2 Feb 2022 16:08:34 +0100 Subject: [PATCH] Revert "Make the docstring bot work only on master" (#2114) * Revert "Make the docstring bot work only on master (#2078)" This reverts commit 649d07405770cd59696d0120107a3b2f0aafe7c2. * Add latest docstring and tutorial changes Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../update_docsstrings_tutorials.yml | 4 ++-- docs/_src/tutorials/tutorials/12.md | 2 +- docs/_src/tutorials/tutorials/7.md | 21 ------------------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/update_docsstrings_tutorials.yml b/.github/workflows/update_docsstrings_tutorials.yml index 0b45219ee..362bd36be 100644 --- a/.github/workflows/update_docsstrings_tutorials.yml +++ b/.github/workflows/update_docsstrings_tutorials.yml @@ -3,10 +3,10 @@ name: Update Docstrings and Tutorials # Controls when the action will run. Triggers the workflow on push # events but only for the master branch on: - workflow_dispatch: push: - branches: + branches-ignore: - master + - benchmarks jobs: # This workflow contains a single job called "build" diff --git a/docs/_src/tutorials/tutorials/12.md b/docs/_src/tutorials/tutorials/12.md index 996ff8867..ad1919ec7 100644 --- a/docs/_src/tutorials/tutorials/12.md +++ b/docs/_src/tutorials/tutorials/12.md @@ -32,7 +32,7 @@ Make sure you enable the GPU runtime to experience decent speed in this tutorial # Install the latest master of Haystack !pip install --upgrade pip -!pip install git+https://github.com/deepset-ai/haystack.git#egg=farm-haystack[colab] +!pip install git+https://github.com/deepset-ai/haystack.git#egg=farm-haystack[colab,faiss] ``` diff --git a/docs/_src/tutorials/tutorials/7.md b/docs/_src/tutorials/tutorials/7.md index f49d87160..36b426a4b 100644 --- a/docs/_src/tutorials/tutorials/7.md +++ b/docs/_src/tutorials/tutorials/7.md @@ -170,27 +170,6 @@ These are used to condition the generator as it generates the answer. What it should return then are novel text spans that form and answer to your question! -```python -# Now generate an answer for each question -for question in QUESTIONS: - # Retrieve related documents from retriever - retriever_results = retriever.retrieve( - query=question - ) - - # Now generate answer from question and retrieved documents - predicted_result = generator.predict( - query=question, - documents=retriever_results, - top_k=1 - ) - - # Print you answer - answers = predicted_result["answers"] - print(f'Generated answer is \'{answers[0].answer}\' for the question = \'{question}\'') -``` - - ```python # Or alternatively use the Pipeline class from haystack.pipelines import GenerativeQAPipeline