From 19a720ee56cc4a40adecc7f8e57d86f78d367669 Mon Sep 17 00:00:00 2001 From: tellet-q Date: Thu, 18 Apr 2024 11:38:27 +0200 Subject: [PATCH] Fix action --- .../actions/run-engine-benchmark/action.yaml | 70 +++++++++---------- .../manual-all-engines-benchmark.yaml | 9 ++- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/.github/workflows/actions/run-engine-benchmark/action.yaml b/.github/workflows/actions/run-engine-benchmark/action.yaml index 870666a9..8339aa33 100644 --- a/.github/workflows/actions/run-engine-benchmark/action.yaml +++ b/.github/workflows/actions/run-engine-benchmark/action.yaml @@ -1,40 +1,34 @@ name: Run Engine Benchmark +description: "Run benchmark with specified params" +inputs: + engine: + description: "engine (i.e qdrant-default)" + required: true + dataset: + description: "dataset (i.e random-100)" + required: true + compose_file: + description: "path to docker compose" + required: true -jobs: - runBenchmarkWithParams: - inputs: - engine: ${{ github.event.inputs.engine }} - dataset: ${{ github.event.inputs.dataset }} - compose_file: ${{ github.event.inputs.compose_file }} - if: > - !( - startsWith(github.event.head_commit.modified, 'tests/') || - startsWith(github.event.head_commit.modified, 'scripts/') || - startsWith(github.event.head_commit.modified, 'monitoring/') || - contains(github.event.head_commit.modified, '.dockerignore') || - contains(github.event.head_commit.modified, '.gitignore') || - contains(github.event.head_commit.modified, '.pre-commit-config.yaml') || - contains(github.event.head_commit.modified, 'Dockerfile') || - contains(github.event.head_commit.modified, 'LICENSE') || - contains(github.event.head_commit.modified, 'README.md') - contains(github.event.head_commit.modified, 'run_all_engines.sh') - contains(github.event.head_commit.modified, 'sync_results.sh') - ) - timeout-minutes: 60 - runs-on: ubuntu-latest - steps: - - name: Install poetry - run: pip install poetry - - uses: actions/setup-python@v5 - with: - python-version: "3.10" - cache: "poetry" - - name: Install deps - run: poetry install - - uses: hoverkraft-tech/compose-action@v2.0.0 - with: - compose-file: "${{ inputs.compose_file }}" - - name: Execution - run: | - source $(poetry env info -p)/bin/activate - poetry run python3 run.py --engines "${{ inputs.engine }}" --datasets "${{ inputs.dataset }}" \ No newline at end of file +runs: + using: "composite" + steps: + - name: Install poetry + shell: bash + run: pip install poetry + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "poetry" + - name: Install deps + shell: bash + run: poetry install + - uses: hoverkraft-tech/compose-action@v2.0.0 + with: + compose-file: "${{ inputs.compose_file }}" + - name: Execution + shell: bash + run: | + source $(poetry env info -p)/bin/activate + poetry run python3 run.py --engines "${{ inputs.engine }}" --datasets "${{ inputs.dataset }}" \ No newline at end of file diff --git a/.github/workflows/manual-all-engines-benchmark.yaml b/.github/workflows/manual-all-engines-benchmark.yaml index 92f5004a..4fbf278b 100644 --- a/.github/workflows/manual-all-engines-benchmark.yaml +++ b/.github/workflows/manual-all-engines-benchmark.yaml @@ -10,6 +10,7 @@ jobs: elasticsearchBenchmark: name: benchmark - elasticsearch-default - random-100 - against elasticsearch-single-node-ci runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 - uses: ./.github/workflows/actions/run-engine-benchmark @@ -21,9 +22,10 @@ jobs: milvusBenchmark: name: benchmark - milvus-default - random-100 - against milvus-single-node runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 - - uses: ./.github/workflows/actions/run-engine-benchmark.yml + - uses: ./.github/workflows/actions/run-engine-benchmark with: engine: "milvus-default" dataset: "random-100" @@ -32,6 +34,7 @@ jobs: opensearchBenchmark: name: benchmark - opensearch-default - glove-25-angular - against opensearch-single-node-ci runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 - uses: ./.github/workflows/actions/run-engine-benchmark @@ -43,6 +46,7 @@ jobs: pgvectorBenchmark: name: benchmark - pgvector-default - random-100 - against pgvector-single-node runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 - uses: ./.github/workflows/actions/run-engine-benchmark @@ -54,6 +58,7 @@ jobs: qdrantBenchmark: name: benchmark - qdrant-default - random-100 - against qdrant-single-node runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 - uses: ./.github/workflows/actions/run-engine-benchmark @@ -65,6 +70,7 @@ jobs: redisBenchmark: name: benchmark - redis-default - random-100 - against redis-single-node runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 - uses: ./.github/workflows/actions/run-engine-benchmark @@ -76,6 +82,7 @@ jobs: weaviateBenchmark: name: benchmark - weaviate-default - random-100 - against weaviate-single-node runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v3 - uses: ./.github/workflows/actions/run-engine-benchmark