Update bugout token #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Use cases benchmarks | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: 'write' | |
on: | |
pull_request: | |
branches: | |
- "main" | |
types: | |
- "labeled" | |
push: | |
branches: | |
- "release/**" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
start-ec2: | |
name: Start benchmarks ec2 | |
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.label.name == 'run-benchmarks') | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
if: vars.BENCHMARKS_USE_CASES_RUNNERS_TYPE == 'self-hosted-ec2' | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ secrets.BENCHMARKS_REPO }} | |
path: "benchmarks" | |
ref: "main" | |
token: ${{ secrets.BENCHMARK_REPO_TOKEN }} | |
- uses: aws-actions/configure-aws-credentials@v1-node16 | |
if: vars.BENCHMARKS_USE_CASES_RUNNERS_TYPE == 'self-hosted-ec2' | |
with: | |
role-to-assume: ${{ secrets.BENCHMARKS_AWS_ROLE_ARN }} | |
aws-region: us-east-1 | |
- name: start ec2 | |
if: vars.BENCHMARKS_USE_CASES_RUNNERS_TYPE == 'self-hosted-ec2' | |
working-directory: benchmarks/scripts | |
shell: bash | |
run: | | |
pip install -q boto3 | |
python3 ec2.py start -t linux_gpu_a10 | |
benchmark: | |
name: Run Benchmarks | |
needs: start-ec2 | |
runs-on: linux_gpu_a10 | |
timeout-minutes: 720 | |
steps: | |
- name: pull deeplake | |
uses: actions/checkout@v3 | |
with: | |
path: "deeplake" | |
- name: pull benchmarks | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ secrets.BENCHMARKS_REPO }} | |
path: "benchmarks" | |
ref: "main" | |
token: ${{ secrets.BENCHMARK_REPO_TOKEN }} | |
- name: pull reports | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ secrets.BENCHMARK_REPORT }} | |
path: "reports" | |
ref: "main" | |
token: ${{ secrets.BENCHMARK_REPO_TOKEN }} | |
- name: run benchmarks | |
continue-on-error: true | |
shell: bash | |
working-directory: ./benchmarks | |
env: | |
DEEPLAKE_PATH: '../deeplake' | |
REPORTS_PATH: '../reports' | |
BENCHMARKS_THRESHOLD: ${{ vars.BENCHMARKS_THRESHOLD }} | |
BENCHMARKS_DEEPLAKE_TOKEN: ${{ secrets.BENCHMARKS_DEEPLAKE_TOKEN }} | |
BENCHMARKS_TRAIN_T5_DATASET: ${{ secrets.BENCHMARKS_TRAIN_T5_DATASET }} | |
BENCHMARKS_TRAIN_NANO_DATASET: ${{ secrets.BENCHMARKS_TRAIN_NANO_DATASET }} | |
DEEPLAKE_USER: ${{ secrets.BENCHMARKS_DEEPLAKE_USERNAME }} | |
DEEPLAKE_PASS: ${{ secrets.BENCHMARKS_DEEPLAKE_PASSWORD }} | |
BENCHMARK_TYPE: 'use-cases' | |
URL: ${{ secrets.SLACK_URL }} | |
PR_NUMBER: ${{ github.event.number }} | |
run: | | |
bash use-cases.sh | |
- name: comment pr | |
continue-on-error: false | |
if: github.event_name == 'pull_request' | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
filePath: ./benchmarks/report.md | |
comment_tag: 'report' | |
- name: complete | |
continue-on-error: true | |
shell: bash | |
env: | |
BENCHMARK_TYPE: 'use-cases' | |
URL: ${{ secrets.SLACK_URL }} | |
PR_NUMBER: ${{ github.event.number }} | |
working-directory: ./benchmarks | |
run: | | |
bash scripts/complete_benchmark.sh | |
if [ "${{ vars.BENCHMARKS_USE_CASES_RUNNERS_TYPE }}" == 'self-hosted-ec2' ] | |
then | |
echo bash "$(pwd)/scripts/self_stop_ec2.sh" | at now +2 minutes | |
fi | |
- name: stop ec2 | |
if: vars.BENCHMARKS_USE_CASES_RUNNERS_TYPE == 'self-hosted-ec2' && cancelled() | |
working-directory: ./benchmarks | |
shell: bash | |
run: | | |
echo bash "$(pwd)/scripts/self_stop_ec2.sh" | at now +2 minutes |