-
Notifications
You must be signed in to change notification settings - Fork 28
60 lines (57 loc) · 1.69 KB
/
perftest.yml
File metadata and controls
60 lines (57 loc) · 1.69 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
# This workflow runs the SimpleStorage performance test
name: Performance Test
on:
push:
branches:
- main
- v0.*
pull_request:
branches:
- main
- v0.*
jobs:
perftest:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install -e .
- name: Start Ray cluster
run: |
# Get the host IP
HOST_IP=$(hostname -I | awk '{print $1}')
echo "Host IP: $HOST_IP"
# Start Ray with node resource
ray start --head --resources="{\"node:$HOST_IP\":1}"
ray status
- name: Run SimpleStorage performance test
run: |
# Get the host IP
HOST_IP=$(hostname -I | awk '{print $1}')
echo "Host IP: $HOST_IP"
# Run the perftest with small batch size for quick test
cd scripts/performance_test
python perftest.py \
--backend_config=../../transfer_queue/config.yaml \
--device=cpu \
--global_batch_size=128 \
--field_num=4 \
--seq_len=1024 \
--head_node_ip=$HOST_IP \
--output_csv=results.csv
- name: Stop Ray cluster
run: |
ray stop
if: always()