mirror of
				https://github.com/deepset-ai/haystack.git
				synced 2025-11-03 19:29:32 +00:00 
			
		
		
		
	ci: remove python_cache internal action (#4429)
This commit is contained in:
		
							parent
							
								
									26e0fbb4f8
								
							
						
					
					
						commit
						0f605118d9
					
				
							
								
								
									
										51
									
								
								.github/actions/python_cache/action.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										51
									
								
								.github/actions/python_cache/action.yml
									
									
									
									
										vendored
									
									
								
							@ -1,51 +0,0 @@
 | 
				
			|||||||
name: Python Cache
 | 
					 | 
				
			||||||
description: Caches a full installation of Haystack dependencies
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
inputs:
 | 
					 | 
				
			||||||
  prefix:
 | 
					 | 
				
			||||||
    description: 'prefix for the cache (to distinguish OS)'
 | 
					 | 
				
			||||||
    required: true
 | 
					 | 
				
			||||||
    default: 'linux'
 | 
					 | 
				
			||||||
  pythonVersion:
 | 
					 | 
				
			||||||
    description: 'Python version to use'
 | 
					 | 
				
			||||||
    required: true
 | 
					 | 
				
			||||||
    default: "3.8"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
runs:
 | 
					 | 
				
			||||||
  using: "composite"
 | 
					 | 
				
			||||||
  steps:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - name: Get date
 | 
					 | 
				
			||||||
    shell: bash
 | 
					 | 
				
			||||||
    run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - name: Checkout
 | 
					 | 
				
			||||||
    uses: actions/checkout@v3
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      repository: ${{ github.event.pull_request.head.repo.full_name }}
 | 
					 | 
				
			||||||
      ref: ${{ github.head_ref }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - name: Setup Python
 | 
					 | 
				
			||||||
    uses: actions/setup-python@v4
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      python-version: ${{ inputs.pythonVersion }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - name: Cache Python path
 | 
					 | 
				
			||||||
    id: cache-python-env
 | 
					 | 
				
			||||||
    uses: actions/cache@v3
 | 
					 | 
				
			||||||
    with:
 | 
					 | 
				
			||||||
      path: ${{ env.pythonLocation }}
 | 
					 | 
				
			||||||
      # The cache will be rebuild every day and at every change of the dependency files
 | 
					 | 
				
			||||||
      key: ${{ inputs.prefix }}-py${{ inputs.pythonVersion }}-${{ env.date }}-${{ hashFiles('**/pyproject.toml') }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  - name: Install dependencies
 | 
					 | 
				
			||||||
    # NOTE: this action runs only on cache miss to refresh the dependencies and make sure the next Haystack install will be faster.
 | 
					 | 
				
			||||||
    # Do not rely on this step to install Haystack itself!
 | 
					 | 
				
			||||||
    # The cache can last way longer than a specific action's run, so older Haystack version could be carried over and the tests will run
 | 
					 | 
				
			||||||
    # against the cached code instead of the new changes.
 | 
					 | 
				
			||||||
    if: steps.cache-python-env.outputs.cache-hit != 'true'
 | 
					 | 
				
			||||||
    shell: bash
 | 
					 | 
				
			||||||
    run: |
 | 
					 | 
				
			||||||
      python -m pip install --upgrade pip
 | 
					 | 
				
			||||||
      pip install .[all,alfalfa]
 | 
					 | 
				
			||||||
      pip install rest_api/
 | 
					 | 
				
			||||||
							
								
								
									
										7
									
								
								.github/workflows/e2e.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.github/workflows/e2e.yml
									
									
									
									
										vendored
									
									
								
							@ -4,6 +4,8 @@ name: end-to-end
 | 
				
			|||||||
on:
 | 
					on:
 | 
				
			||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  PYTHON_VERSION: "3.8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  e2e:
 | 
					  e2e:
 | 
				
			||||||
@ -19,8 +21,9 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v3
 | 
					    - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Setup Python
 | 
					    - uses: actions/setup-python@v4
 | 
				
			||||||
      uses: ./.github/actions/python_cache/
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Cache HF models
 | 
					    - name: Cache HF models
 | 
				
			||||||
      id: cache-hf-models
 | 
					      id: cache-hf-models
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										6
									
								
								.github/workflows/examples-tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/examples-tests.yml
									
									
									
									
										vendored
									
									
								
							@ -16,6 +16,7 @@ on:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
env:
 | 
					env:
 | 
				
			||||||
  SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
 | 
					  SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
 | 
				
			||||||
 | 
					  PYTHON_VERSION: "3.8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  tests:
 | 
					  tests:
 | 
				
			||||||
@ -33,8 +34,9 @@ jobs:
 | 
				
			|||||||
      steps:
 | 
					      steps:
 | 
				
			||||||
        - uses: actions/checkout@v3
 | 
					        - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        - name: Setup Python
 | 
					        - uses: actions/setup-python@v4
 | 
				
			||||||
          uses: ./.github/actions/python_cache/
 | 
					          with:
 | 
				
			||||||
 | 
					            python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        - name: Install Haystack
 | 
					        - name: Install Haystack
 | 
				
			||||||
          run: pip install .[all]
 | 
					          run: pip install .[all]
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										19
									
								
								.github/workflows/linting.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/linting.yml
									
									
									
									
										vendored
									
									
								
							@ -7,6 +7,9 @@ on:
 | 
				
			|||||||
      - "**.py"
 | 
					      - "**.py"
 | 
				
			||||||
      - "**/pyproject.toml"
 | 
					      - "**/pyproject.toml"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  PYTHON_VERSION: "3.8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  mypy:
 | 
					  mypy:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
@ -28,8 +31,12 @@ jobs:
 | 
				
			|||||||
            test/**
 | 
					            test/**
 | 
				
			||||||
            rest_api/test/**
 | 
					            rest_api/test/**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Install Haystack
 | 
				
			||||||
 | 
					        run: pip install ".[all]"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Mypy
 | 
					      - name: Mypy
 | 
				
			||||||
        if: steps.files.outputs.any_changed == 'true'
 | 
					        if: steps.files.outputs.any_changed == 'true'
 | 
				
			||||||
@ -57,8 +64,12 @@ jobs:
 | 
				
			|||||||
            test/**
 | 
					            test/**
 | 
				
			||||||
            rest_api/test/**
 | 
					            rest_api/test/**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Install Haystack
 | 
				
			||||||
 | 
					        run: pip install ".[all]"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Pylint
 | 
					      - name: Pylint
 | 
				
			||||||
        if: steps.files.outputs.any_changed == 'true'
 | 
					        if: steps.files.outputs.any_changed == 'true'
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										13
									
								
								.github/workflows/minor_version_release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/minor_version_release.yml
									
									
									
									
										vendored
									
									
								
							@ -3,6 +3,9 @@ name: Minor Version Release
 | 
				
			|||||||
on:
 | 
					on:
 | 
				
			||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  PYTHON_VERSION: "3.8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  sync:
 | 
					  sync:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
@ -10,9 +13,6 @@ jobs:
 | 
				
			|||||||
      - name: Checkout this repo
 | 
					      - name: Checkout this repo
 | 
				
			||||||
        uses: actions/checkout@v3
 | 
					        uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Define all versions
 | 
					      - name: Define all versions
 | 
				
			||||||
        id: versions
 | 
					        id: versions
 | 
				
			||||||
        shell: bash
 | 
					        shell: bash
 | 
				
			||||||
@ -42,6 +42,13 @@ jobs:
 | 
				
			|||||||
          git push -u origin bump-version
 | 
					          git push -u origin bump-version
 | 
				
			||||||
          gh pr create -B main -H bump-version --title 'Bump unstable version' --body 'Part of the release process' --label 'ignore-for-release-notes'
 | 
					          gh pr create -B main -H bump-version --title 'Bump unstable version' --body 'Part of the release process' --label 'ignore-for-release-notes'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Install release_docs.py dependencies
 | 
				
			||||||
 | 
					        run: pip install requests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # Note that patch versions all sync to the one readme minor version
 | 
					      # Note that patch versions all sync to the one readme minor version
 | 
				
			||||||
      # e.g. Haystack 1.9.1 and 1.9.2 both map to Readme 1.9
 | 
					      # e.g. Haystack 1.9.1 and 1.9.2 both map to Readme 1.9
 | 
				
			||||||
      - name: Release Readme version
 | 
					      - name: Release Readme version
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										8
									
								
								.github/workflows/openapi_sync.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/openapi_sync.yml
									
									
									
									
										vendored
									
									
								
							@ -7,14 +7,18 @@ on:
 | 
				
			|||||||
      # release branches have the form v1.9.x
 | 
					      # release branches have the form v1.9.x
 | 
				
			||||||
      - "v[0-9].*[0-9].x"
 | 
					      - "v[0-9].*[0-9].x"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  PYTHON_VERSION: "3.8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  run:
 | 
					  run:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install dependencies
 | 
					      - name: Install dependencies
 | 
				
			||||||
        run: sudo apt update && sudo apt-get install libsndfile1 ffmpeg
 | 
					        run: sudo apt update && sudo apt-get install libsndfile1 ffmpeg
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										11
									
								
								.github/workflows/rest_api_tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/rest_api_tests.yml
									
									
									
									
										vendored
									
									
								
							@ -17,6 +17,9 @@ on:
 | 
				
			|||||||
      - "rest_api/**.py"
 | 
					      - "rest_api/**.py"
 | 
				
			||||||
      - "rest_api/pyproject.toml"
 | 
					      - "rest_api/pyproject.toml"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  PYTHON_VERSION: "3.8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  black:
 | 
					  black:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
@ -24,6 +27,8 @@ jobs:
 | 
				
			|||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - uses: actions/setup-python@v4
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Black
 | 
					      - name: Install Black
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -73,12 +78,14 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install REST API
 | 
					      - name: Install REST API
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          pip install -U "./rest_api[dev]"
 | 
					          pip install -U "./rest_api[dev]"
 | 
				
			||||||
 | 
					          pip install ".[dev]"
 | 
				
			||||||
          pip install .
 | 
					          pip install .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										144
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										144
									
								
								.github/workflows/tests.yml
									
									
									
									
										vendored
									
									
								
							@ -32,6 +32,7 @@ env:
 | 
				
			|||||||
    --ignore=test/nodes/test_summarizer.py
 | 
					    --ignore=test/nodes/test_summarizer.py
 | 
				
			||||||
  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
 | 
					  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
 | 
				
			||||||
  COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
 | 
					  COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
 | 
				
			||||||
 | 
					  PYTHON_VERSION: "3.8"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -42,6 +43,8 @@ jobs:
 | 
				
			|||||||
    - uses: actions/checkout@v3
 | 
					    - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - uses: actions/setup-python@v4
 | 
					    - uses: actions/setup-python@v4
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install Black
 | 
					    - name: Install Black
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
@ -99,11 +102,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install .[all,alfalfa]
 | 
					        run: pip install .[all]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run
 | 
					      - name: Run
 | 
				
			||||||
        run: pytest -m "unit" test/${{ matrix.topic }}
 | 
					        run: pytest -m "unit" test/${{ matrix.topic }}
 | 
				
			||||||
@ -134,11 +138,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .[docstores]
 | 
					        run: pip install .[dev,docstores]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -162,11 +167,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .[sql]
 | 
					        run: pip install .[dev,sql]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -198,11 +204,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .[docstores]
 | 
					        run: pip install .[dev,docstores]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -226,11 +233,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .
 | 
					        run: pip install .[dev]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -254,11 +262,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .
 | 
					        run: pip install .[faiss,dev]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -292,11 +301,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .[docstores]
 | 
					        run: pip install .[dev,docstores]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -320,11 +330,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v3
 | 
					    - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Setup Python
 | 
					    - uses: actions/setup-python@v4
 | 
				
			||||||
      uses: ./.github/actions/python_cache/
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install Haystack
 | 
					    - name: Install Haystack
 | 
				
			||||||
      run: pip install .[pinecone]
 | 
					      run: pip install .[dev,pinecone]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Run tests
 | 
					    - name: Run tests
 | 
				
			||||||
      env:
 | 
					      env:
 | 
				
			||||||
@ -351,8 +362,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v3
 | 
					    - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Setup Python
 | 
					    - uses: actions/setup-python@v4
 | 
				
			||||||
      uses: ./.github/actions/python_cache/
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Install Haystack
 | 
				
			||||||
 | 
					      run: pip install .[all]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Setup Milvus
 | 
					    - name: Setup Milvus
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
@ -362,7 +377,7 @@ jobs:
 | 
				
			|||||||
        sudo docker-compose ps
 | 
					        sudo docker-compose ps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install Haystack
 | 
					    - name: Install Haystack
 | 
				
			||||||
      run: pip install .[milvus]
 | 
					      run: pip install .[dev,milvus]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Run tests
 | 
					    - name: Run tests
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
@ -386,11 +401,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .
 | 
					        run: pip install .[dev]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -414,11 +430,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .
 | 
					        run: pip install .[dev]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -442,11 +459,12 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v3
 | 
					      - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Setup Python
 | 
					      - uses: actions/setup-python@v4
 | 
				
			||||||
        uses: ./.github/actions/python_cache/
 | 
					        with:
 | 
				
			||||||
 | 
					          python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Haystack
 | 
					      - name: Install Haystack
 | 
				
			||||||
        run: pip install -U .
 | 
					        run: pip install .[dev]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run tests
 | 
					      - name: Run tests
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -480,8 +498,9 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v3
 | 
					    - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Setup Python
 | 
					    - uses: actions/setup-python@v4
 | 
				
			||||||
      uses: ./.github/actions/python_cache/
 | 
					      with:
 | 
				
			||||||
 | 
					        python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # TODO evaluate if tests that need these libraries are really unit tests
 | 
					    # TODO evaluate if tests that need these libraries are really unit tests
 | 
				
			||||||
    - name: Install audio libraries
 | 
					    - name: Install audio libraries
 | 
				
			||||||
@ -490,7 +509,7 @@ jobs:
 | 
				
			|||||||
        sudo apt-get install ffmpeg
 | 
					        sudo apt-get install ffmpeg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install Haystack
 | 
					    - name: Install Haystack
 | 
				
			||||||
      run: pip install .[audio]
 | 
					      run: pip install .[all]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Run tests
 | 
					    - name: Run tests
 | 
				
			||||||
      env:
 | 
					      env:
 | 
				
			||||||
@ -523,15 +542,14 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v3
 | 
					    - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Setup Python
 | 
					    - uses: actions/setup-python@v4
 | 
				
			||||||
      uses: ./.github/actions/python_cache/
 | 
					 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        prefix: windows
 | 
					        python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # - name: Install sndfile (audio support) # https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-1.1.0-win64.zip
 | 
					    # - name: Install sndfile (audio support) # https://github.com/libsndfile/libsndfile/releases/download/1.1.0/libsndfile-1.1.0-win64.zip
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install Haystack
 | 
					    - name: Install Haystack
 | 
				
			||||||
      run: pip install .
 | 
					      run: pip install .[all]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Run tests
 | 
					    - name: Run tests
 | 
				
			||||||
      env:
 | 
					      env:
 | 
				
			||||||
@ -566,22 +584,9 @@ jobs:
 | 
				
			|||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - uses: actions/checkout@v3
 | 
					    - uses: actions/checkout@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Setup Python
 | 
					    - uses: actions/setup-python@v4
 | 
				
			||||||
      uses: ./.github/actions/python_cache/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Cache HF models
 | 
					 | 
				
			||||||
      id: cache-hf-models
 | 
					 | 
				
			||||||
      uses: actions/cache@v3
 | 
					 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        path: ~/.cache/huggingface/transformers/
 | 
					        python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
        key: hf-models
 | 
					 | 
				
			||||||
      env:
 | 
					 | 
				
			||||||
        SEGMENT_DOWNLOAD_TIMEOUT_MINS: 15
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    - name: Download models
 | 
					 | 
				
			||||||
      if: steps.cache-hf-models.outputs.cache-hit != 'true'
 | 
					 | 
				
			||||||
      run: |
 | 
					 | 
				
			||||||
         python -c "from transformers import AutoModel;[AutoModel.from_pretrained(model_name) for model_name in ['vblagoje/bart_lfqa','yjernite/bart_eli5', 'vblagoje/dpr-ctx_encoder-single-lfqa-wiki', 'vblagoje/dpr-question_encoder-single-lfqa-wiki', 'facebook/dpr-question_encoder-single-nq-base', 'facebook/dpr-ctx_encoder-single-nq-base', 'elastic/distilbert-base-cased-finetuned-conll03-english', 'deepset/bert-medium-squad2-distilled']]"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Run Elasticsearch
 | 
					    - name: Run Elasticsearch
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
@ -618,7 +623,21 @@ jobs:
 | 
				
			|||||||
        sudo apt-get install libsndfile1 ffmpeg
 | 
					        sudo apt-get install libsndfile1 ffmpeg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install Haystack
 | 
					    - name: Install Haystack
 | 
				
			||||||
      run: pip install .
 | 
					      run: pip install .[all]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Cache HF models
 | 
				
			||||||
 | 
					      id: cache-hf-models
 | 
				
			||||||
 | 
					      uses: actions/cache@v3
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        path: ~/.cache/huggingface/transformers/
 | 
				
			||||||
 | 
					        key: hf-models
 | 
				
			||||||
 | 
					      env:
 | 
				
			||||||
 | 
					        SEGMENT_DOWNLOAD_TIMEOUT_MINS: 15
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Download models
 | 
				
			||||||
 | 
					      if: steps.cache-hf-models.outputs.cache-hit != 'true'
 | 
				
			||||||
 | 
					      run: |
 | 
				
			||||||
 | 
					         python -c "from transformers import AutoModel;[AutoModel.from_pretrained(model_name) for model_name in ['vblagoje/bart_lfqa','yjernite/bart_eli5', 'vblagoje/dpr-ctx_encoder-single-lfqa-wiki', 'vblagoje/dpr-question_encoder-single-lfqa-wiki', 'facebook/dpr-question_encoder-single-nq-base', 'facebook/dpr-ctx_encoder-single-nq-base', 'elastic/distilbert-base-cased-finetuned-conll03-english', 'deepset/bert-medium-squad2-distilled']]"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Run tests
 | 
					    - name: Run tests
 | 
				
			||||||
      env:
 | 
					      env:
 | 
				
			||||||
@ -671,13 +690,12 @@ jobs:
 | 
				
			|||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        echo "C:\Program Files\Tesseract-OCR\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
 | 
					        echo "C:\Program Files\Tesseract-OCR\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Setup Python
 | 
					    - uses: actions/setup-python@v4
 | 
				
			||||||
      uses: ./.github/actions/python_cache/
 | 
					 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        prefix: windows
 | 
					        python-version: ${{ env.PYTHON_VERSION }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install Haystack
 | 
					    - name: Install Haystack
 | 
				
			||||||
      run: pip install .
 | 
					      run: pip install .[all]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Run tests
 | 
					    - name: Run tests
 | 
				
			||||||
      env:
 | 
					      env:
 | 
				
			||||||
 | 
				
			|||||||
@ -183,8 +183,8 @@ onnx-gpu = [
 | 
				
			|||||||
  "onnxruntime_tools",
 | 
					  "onnxruntime_tools",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
ray = [
 | 
					ray = [
 | 
				
			||||||
  "ray>=1.9.1,<2; platform_system != 'Windows'",
 | 
					  "ray[serve]>=1.9.1,<2; platform_system != 'Windows'",
 | 
				
			||||||
  "ray>=1.9.1,<2,!=1.12.0; platform_system == 'Windows'",  # Avoid 1.12.0 due to https://github.com/ray-project/ray/issues/24169 (fails on windows)
 | 
					  "ray[serve]>=1.9.1,<2,!=1.12.0; platform_system == 'Windows'",  # Avoid 1.12.0 due to https://github.com/ray-project/ray/issues/24169 (fails on windows)
 | 
				
			||||||
  "aiorwlock>=1.3.0,<2",
 | 
					  "aiorwlock>=1.3.0,<2",
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
colab = [
 | 
					colab = [
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user