@@ -21,52 +21,47 @@ jobs:
21
21
TORCHBENCH_USERBENCHMARK_SCRIBE_GRAPHQL_ACCESS_TOKEN : ${{ secrets.TORCHBENCH_USERBENCHMARK_SCRIBE_GRAPHQL_ACCESS_TOKEN }}
22
22
AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
23
23
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24
- SETUP_SCRIPT : " /workspace/setup_instance.sh"
25
24
steps :
26
25
- name : Checkout TorchBench
27
26
uses : actions/checkout@v3
28
- with :
29
- path : benchmark
30
- - name : Clone and setup conda env
27
+ - name : Install Conda
31
28
run : |
32
- CONDA_ENV=${BASE_CONDA_ENV} . "${SETUP_SCRIPT}"
33
- conda create --name "${CONDA_ENV}" --clone "${BASE_CONDA_ENV}"
29
+ bash ./.ci/torchbench/install-conda.sh
34
30
- name : Install TorchBench
35
31
run : |
36
- set -x
37
- . "${SETUP_SCRIPT}"
38
- pushd benchmark
39
- python install.py
32
+ bash ./.ci/torchbench/install.sh
40
33
- name : Run user benchmark
41
34
run : |
42
35
set -x
43
- . "${SETUP_SCRIPT}"
36
+ . ${HOME}/miniconda3/etc/profile.d/conda.sh
37
+ conda activate "${CONDA_ENV}"
38
+
44
39
# remove old results
45
40
if [ -d benchmark-output ]; then rm -Rf benchmark-output; fi
46
- pushd benchmark
41
+
47
42
if [ -d .userbenchmark ]; then rm -Rf .userbenchmark; fi
48
43
MANUAL_WORKFLOW="${{ github.event.inputs.userbenchmark_name }}"
49
44
if [ -z "${MANUAL_WORKFLOW}" ]; then
50
45
# Figure out what userbenchmarks we should run, and run it
51
46
python ./.github/scripts/userbenchmark/schedule-benchmarks.py --platform ${PLATFORM_NAME}
52
47
if [ -d ./.userbenchmark ]; then
53
- cp -r ./.userbenchmark ../ benchmark-output
48
+ cp -r ./.userbenchmark benchmark-output
54
49
else
55
- mkdir ../ benchmark-output
50
+ mkdir benchmark-output
56
51
fi
57
52
else
58
53
python run_benchmark.py "${{ github.event.inputs.userbenchmark_name }}" ${{ github.event.inputs.userbenchmark_options }}
59
- cp -r ./.userbenchmark/"${{ github.event.inputs.userbenchmark_name }}" ../benchmark-output
54
+ cp -r ./.userbenchmark/"${{ github.event.inputs.userbenchmark_name }}" benchmark-output
55
+ ls -las benchmark-output
56
+ pwd
60
57
fi
61
58
- name : Upload artifact
62
59
uses : actions/upload-artifact@v4
63
60
with :
64
61
name : TorchBench result
65
- path : benchmark-output/
62
+ path : benchmark-output
66
63
- name : Upload result jsons to Scribe and S3
67
64
run : |
68
- . "${SETUP_SCRIPT}"
69
- pushd benchmark
70
65
RESULTS=($(find ${PWD}/../benchmark-output -name "metrics-*.json" -maxdepth 2 | sort -r))
71
66
echo "Uploading result jsons: ${RESULTS}"
72
67
for r in ${RESULTS[@]}; do
76
71
- name : Clean up Conda env
77
72
if : always()
78
73
run : |
79
- . "${SETUP_SCRIPT}"
80
- conda deactivate && conda deactivate
74
+ . ${HOME}/miniconda3/etc/profile.d/conda.sh
81
75
conda remove -n "${CONDA_ENV}" --all
0 commit comments