diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 28832d5229b..5d5654fb6b9 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -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 }}" @@ -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 @@ -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' diff --git a/.github/workflows/benchmarks_pr.yml b/.github/workflows/benchmarks_pr.yml index dfd8850a6f7..b301539c710 100644 --- a/.github/workflows/benchmarks_pr.yml +++ b/.github/workflows/benchmarks_pr.yml @@ -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 }}