mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-19 22:02:06 +00:00
117 lines
4.0 KiB
YAML
117 lines
4.0 KiB
YAML
name: Nightly load test
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 * * 1-5'
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/load_test.yaml"
|
|
branches:
|
|
- 'main'
|
|
|
|
env:
|
|
AWS_DEFAULT_REGION: us-east-1
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_ACCESS_KEY }}
|
|
LOAD_TEST_ISSUE: 2235
|
|
|
|
jobs:
|
|
load-tests:
|
|
permissions:
|
|
issues: write
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
runs-on:
|
|
group: aws-g6-12xlarge-plus-priv
|
|
env:
|
|
DOCKER_VOLUME: /cache
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install awscli
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y awscli
|
|
|
|
- name: Install poetry
|
|
run: |
|
|
curl -sSL https://install.python-poetry.org | python3 -
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
poetry --version
|
|
|
|
- name: Install texlive minimal
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended dvipng cm-super
|
|
|
|
- name: Install Go 1.21
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.21
|
|
|
|
- name: Install Python 3.11
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- name: Download artifacts from previous runs
|
|
uses: actions/github-script@v6
|
|
continue-on-error: true
|
|
env:
|
|
WORKFLOW_FILENAME: load_test.yaml
|
|
ARTIFACT_NAME: benchmark_results_csv
|
|
ARTIFACT_FILENAME: benchmark_results_csv.zip
|
|
UNZIP_DIR: /tmp/artifacts
|
|
with:
|
|
script: |
|
|
const script = require('./load_tests/download_artifact.js')
|
|
await script({github, context, core})
|
|
|
|
- name: Run load test
|
|
run: |
|
|
export PATH="/home/runner/.local/bin:$PATH"
|
|
cd load_tests
|
|
make build-k6
|
|
make load-test
|
|
shell: bash
|
|
|
|
- name: Archive test results artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: benchmark_results
|
|
path: |
|
|
load_tests/output/*
|
|
|
|
- name: Upload to S3
|
|
run: |
|
|
aws s3 cp load_tests/output/ s3://text-generation-inference-ci/${{ github.sha }} --recursive
|
|
|
|
- uses: actions/github-script@v6
|
|
if: github.event_name == 'pull_request'
|
|
with:
|
|
script: |
|
|
let content=require('fs').readFileSync('load_tests/output/benchmark_avg_delta.md', 'utf-8');
|
|
github.rest.issues.createComment({
|
|
issue_number: process.env.LOAD_TEST_ISSUE,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
body: '🚀 Load test results are in for commit [${{ github.sha }}](https://github.com/huggingface/text-generation-inference/commit/${{ github.sha }})\n\n'+
|
|
'## Variable length prompts\n'+
|
|
'<p float="left">\n'+
|
|
'<img src="http://text-generation-inference-ci.s3-website-us-east-1.amazonaws.com/${{github.sha}}/sharegpt_conversations_constant_arrival_rate.png" width=200>\n' +
|
|
'<img src="http://text-generation-inference-ci.s3-website-us-east-1.amazonaws.com/${{github.sha}}/sharegpt_conversations_constant_vus.png" width=200>\n' +
|
|
'</p>\n\n' +
|
|
'## Constant length prompts\n'+
|
|
'<p float="left">\n'+
|
|
'<img src="http://text-generation-inference-ci.s3-website-us-east-1.amazonaws.com/${{github.sha}}/constant_tokens_constant_vus.png" width=200>\n' +
|
|
'<img src="http://text-generation-inference-ci.s3-website-us-east-1.amazonaws.com/${{github.sha}}/constant_tokens_constant_arrival_rate.png" width=200>\n'+
|
|
'</p>\n\n' +
|
|
'## Delta to last release\n\n'+
|
|
content
|
|
})
|