Skip to content

Commit 646a667

Browse files
authored
Add optional venv to upload-benchmark-results (#7083)
Helion fails with https://github.com/pytorch/helion/actions/runs/17417766895/job/49449905513?pr=544
1 parent e58a6f1 commit 646a667

File tree

1 file changed

+20
-0
lines changed
  • .github/actions/upload-benchmark-results

1 file changed

+20
-0
lines changed

.github/actions/upload-benchmark-results/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ inputs:
1010
default: 'v3'
1111
github-token:
1212
default: ''
13+
venv:
14+
description: 'Path to virtual environment to activate'
15+
required: false
16+
default: ''
1317

1418
runs:
1519
using: composite
@@ -18,6 +22,10 @@ runs:
1822
shell: bash
1923
run: |
2024
set -eux
25+
26+
if [[ -n "${{ inputs.venv }}" ]]; then
27+
source "${{ inputs.venv }}"
28+
fi
2129
python3 -mpip install boto3==1.35.33 psutil==7.0.0 pynvml==12.0.0
2230
2331
DEVICE_NAME=""
@@ -74,6 +82,10 @@ runs:
7482
run: |
7583
set -eux
7684
85+
if [[ -n "${{ inputs.venv }}" ]]; then
86+
source "${{ inputs.venv }}"
87+
fi
88+
7789
python3 "${GITHUB_ACTION_PATH}/../../scripts/benchmarks/gather_metadata.py" \
7890
--schema-version "${SCHEMA_VERSION}" \
7991
--repo "${REPO}" \
@@ -90,6 +102,10 @@ runs:
90102
run: |
91103
set -eux
92104
105+
if [[ -n "${{ inputs.venv }}" ]]; then
106+
source "${{ inputs.venv }}"
107+
fi
108+
93109
python3 "${GITHUB_ACTION_PATH}/../../scripts/benchmarks/gather_runners_info.py"
94110
95111
- name: Gather the dependencies information
@@ -113,6 +129,10 @@ runs:
113129
run: |
114130
set -eux
115131
132+
if [[ -n "${{ inputs.venv }}" ]]; then
133+
source "${{ inputs.venv }}"
134+
fi
135+
116136
if [[ ! -d "${BENCHMARK_RESULTS_DIR}" ]]; then
117137
echo "${BENCHMARK_RESULTS_DIR} does not exist, skipping"
118138
# We don't want the job to fail if the directory doesn't exist

0 commit comments

Comments
 (0)