Repository navigation
98 lines (88 loc) · 3.35 KB
/
Copy pathrandom-benchmark.yml
File metadata and controls
98 lines (88 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: "Run the randomized benchmark"
run-name: "Randomized benchmark: ${{ inputs.systems }} on ${{ inputs.machines }}"
# A group of the randomized benchmark (see random/README.md): new random
# queries, generated by a language model, and a new random dataset, the same
# for every system and machine of the group. The runner generates and
# validates the queries, translates them for the systems that need it, and
# launches the machines; every machine generates the dataset, runs the
# queries, validates the results against ClickHouse and sends its result to
# the sink. Collect the results with the "Report the randomized benchmark"
# workflow.
on:
workflow_dispatch:
inputs:
systems:
description: "Systems to compare (directory names, space-separated)"
required: true
machines:
description: "EC2 instance types (space-separated)"
default: "c6a.4xlarge"
rows:
description: "Rows in the generated dataset"
default: "1000000000"
queries:
description: "Number of queries"
default: "100"
parallel:
description: "Concurrent queries"
default: "4"
repeats:
description: "Runs of every query"
default: "3"
query_timeout:
description: "Time limit for one query, seconds"
default: "600"
llm:
description: "Model provider for the queries and translations: anthropic or openai"
default: "anthropic"
model:
description: "Model (empty: the default of the provider, see random/llm.py)"
default: ""
branch:
description: "Branch the machines clone (empty: the branch this workflow was dispatched from)"
default: ""
permissions:
id-token: write # To assume the federated IAM role.
contents: read
jobs:
launch:
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install anthropic openai
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::264113785604:role/ClickBenchLauncher
aws-region: us-east-1
role-session-name: clickbench-random-${{ github.run_id }}
- shell: bash
env:
SYSTEMS: ${{ inputs.systems }}
MACHINES: ${{ inputs.machines }}
RANDOM_ROWS: ${{ inputs.rows }}
RANDOM_QUERIES: ${{ inputs.queries }}
RANDOM_PARALLEL_QUERIES: ${{ inputs.parallel }}
RANDOM_REPEATS: ${{ inputs.repeats }}
RANDOM_QUERY_TIMEOUT: ${{ inputs.query_timeout }}
RANDOM_LLM_BACKEND: ${{ inputs.llm }}
RANDOM_LLM_MODEL: ${{ inputs.model }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OUT: ${{ github.workspace }}/random-group
repo: ${{ github.repository }}
branch: ${{ inputs.branch || github.ref_name }}
run: ./random/launch.sh
# The queries, the translations and the logs of the generation; the
# results come later from the machines.
- uses: actions/upload-artifact@v4
if: always()
with:
name: random-group
path: |
random-group/queries.json
random-group/translated/
random-group/generate.log