Skip to content

Commit

Permalink
[CI] Fix GPU benchmark upload (#2508)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens authored Oct 21, 2024
1 parent ae77208 commit baba52b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,6 @@ jobs:
image: nvidia/cuda:12.3.0-base-ubuntu22.04
options: --gpus all
steps:
- name: Set GITHUB_BRANCH environment variable
run: |
if [ "${{ github.event_name }}" == "push" ]; then
export GITHUB_BRANCH=${{ github.event.branch }}
elif [ "${{ github.event_name }}" == "pull_request" ]; then
export GITHUB_BRANCH=${{ github.event.pull_request.head.ref }}
else
echo "Unsupported event type"
exit 1
fi
echo "GITHUB_BRANCH=$GITHUB_BRANCH" >> $GITHUB_ENV
- name: Who triggered this?
run: |
echo "Action triggered by ${{ github.event.pull_request.html_url }}"
Expand Down Expand Up @@ -133,7 +122,6 @@ jobs:
python3.10 -m pip install cmake ninja pytest pytest-benchmark mujoco dm_control "gym[accept-rom-license,atari]"
python3.10 -m pip install git+https://github.com/pytorch/tensordict
python3.10 setup.py develop
# python3.10 -m pip install git+https://github.com/pytorch/rl@$GITHUB_BRANCH
# test import
python3 -c """import torch
Expand All @@ -147,6 +135,8 @@ jobs:
- name: Store benchmark results
uses: benchmark-action/github-action-benchmark@v1
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}
env:
GIT_WORK_TREE: /__w/rl/rl
with:
name: GPU Benchmark Results
tool: 'pytest'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/benchmarks_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ jobs:
$RUN_BENCHMARK ${{ env.CONTENDER_JSON }}
- name: Publish results
uses: apbard/pytest-benchmark-commenter@v3
env:
GIT_WORK_TREE: /__w/rl/rl
with:
token: ${{ secrets.GITHUB_TOKEN }}
benchmark-file: ${{ env.CONTENDER_JSON }}
Expand Down

1 comment on commit baba52b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'CPU Benchmark Results'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: baba52b Previous: ae77208 Ratio
benchmarks/test_replaybuffer_benchmark.py::test_rb_populate[TensorDictReplayBuffer-ListStorage-RandomSampler-400] 31.010628685821406 iter/sec (stddev: 0.19581398892903226) 206.0293500344291 iter/sec (stddev: 0.001149841773426029) 6.64

This comment was automatically generated by workflow using github-action-benchmark.

CC: @vmoens

Please sign in to comment.