Skip to content

Commit baba52b

Browse files
author
Vincent Moens
authored
[CI] Fix GPU benchmark upload (#2508)
1 parent ae77208 commit baba52b

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

.github/workflows/benchmarks.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,6 @@ jobs:
7777
image: nvidia/cuda:12.3.0-base-ubuntu22.04
7878
options: --gpus all
7979
steps:
80-
- name: Set GITHUB_BRANCH environment variable
81-
run: |
82-
if [ "${{ github.event_name }}" == "push" ]; then
83-
export GITHUB_BRANCH=${{ github.event.branch }}
84-
elif [ "${{ github.event_name }}" == "pull_request" ]; then
85-
export GITHUB_BRANCH=${{ github.event.pull_request.head.ref }}
86-
else
87-
echo "Unsupported event type"
88-
exit 1
89-
fi
90-
echo "GITHUB_BRANCH=$GITHUB_BRANCH" >> $GITHUB_ENV
9180
- name: Who triggered this?
9281
run: |
9382
echo "Action triggered by ${{ github.event.pull_request.html_url }}"
@@ -133,7 +122,6 @@ jobs:
133122
python3.10 -m pip install cmake ninja pytest pytest-benchmark mujoco dm_control "gym[accept-rom-license,atari]"
134123
python3.10 -m pip install git+https://github.com/pytorch/tensordict
135124
python3.10 setup.py develop
136-
# python3.10 -m pip install git+https://github.com/pytorch/rl@$GITHUB_BRANCH
137125
138126
# test import
139127
python3 -c """import torch
@@ -147,6 +135,8 @@ jobs:
147135
- name: Store benchmark results
148136
uses: benchmark-action/github-action-benchmark@v1
149137
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}
138+
env:
139+
GIT_WORK_TREE: /__w/rl/rl
150140
with:
151141
name: GPU Benchmark Results
152142
tool: 'pytest'

.github/workflows/benchmarks_pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ jobs:
149149
$RUN_BENCHMARK ${{ env.CONTENDER_JSON }}
150150
- name: Publish results
151151
uses: apbard/pytest-benchmark-commenter@v3
152+
env:
153+
GIT_WORK_TREE: /__w/rl/rl
152154
with:
153155
token: ${{ secrets.GITHUB_TOKEN }}
154156
benchmark-file: ${{ env.CONTENDER_JSON }}

0 commit comments

Comments
 (0)