-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CI #60
Merged
Merged
Fix CI #60
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
356b708
Test CI
VibhuJawa 51b0077
Test CI
VibhuJawa 34b59a1
Test CI
VibhuJawa 22a956a
Test CI
VibhuJawa 7fa16c2
Test CI
VibhuJawa c457442
Test CI
VibhuJawa f196d84
Test CI
VibhuJawa e74ffbf
Test CI
VibhuJawa 8d938fa
Test CI
VibhuJawa 50c4b97
CI working locally
VibhuJawa f7f0530
Style fixes
VibhuJawa f6b8b91
Style fixes
VibhuJawa 21e04ea
Fix spelling
VibhuJawa 52db76c
Fix permission denied issue for test_gpu.sh
VibhuJawa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: GPU CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- "pull-request/[0-9]+" | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
pr-builder: | ||
needs: | ||
- python-gpu-tests | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.06 | ||
|
||
python-gpu-tests: | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.06 | ||
with: | ||
build_type: pull-request | ||
node_type: "gpu-v100-latest-1" | ||
arch: "amd64" | ||
container_image: "rapidsai/base:24.06-cuda12.2-py3.11" | ||
run_script: "ci/test_gpu.sh" | ||
|
||
# benchmark: | ||
# runs-on: linux-amd64-gpu-p100-latest-1 | ||
# container: | ||
# image: rapidsai/base:24.06-cuda12.2-py3.11 | ||
# env: | ||
# NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} | ||
# options: --shm-size=1G -ulimit memlock=-1 --ulimit stack=67108864 | ||
|
||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# fetch-depth: 50 # this is to make sure we obtain the target base commit | ||
|
||
# - name: Setup Environment | ||
# shell: bash | ||
# run: | | ||
# git config --global --add safe.directory /__w/crossfit/crossfit | ||
|
||
# echo "BASE_SHA=$(git ls-remote -q | grep refs/heads/main$ | awk '{print $1}' | xargs git rev-parse --short)" >> ${GITHUB_ENV} | ||
# echo "PR_COMMENT=$(mktemp)" >> ${GITHUB_ENV} | ||
|
||
# - name: Setup Environment (PR) | ||
# if: ${{ github.event_name == 'pull_request' }} | ||
# shell: bash | ||
# run: | | ||
# echo "HEAD_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut cut -c1-8)" >> ${GITHUB_ENV} | ||
|
||
# - name: Setup Environment (Push) | ||
# if: ${{ github.event_name == 'push' }} | ||
# shell: bash | ||
# run: | | ||
# echo "HEAD_SHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> ${GITHUB_ENV} | ||
|
||
# - name: Run benchmarks | ||
# shell: bash | ||
# run: | | ||
# RUN_BENCHMARK="py.test -m benchmark tests/" | ||
|
||
# git checkout ${{ env.BASE_SHA }} | ||
# $RUN_BENCHMARK --benchmark-save=main | ||
|
||
# git checkout ${{ env.HEAD_SHA }} | ||
# $RUN_BENCHMARK --benchmark-save=${{ env.HEAD_SHA }} | ||
|
||
# - name: Compare results | ||
# run: | | ||
|
||
# py.test-benchmark compare > cmp_results | ||
|
||
# echo 'Benchmark comparison for [`${{ env.BASE_SHA }}`](${{ github.event.repository.html_url }}/commit/${{ env.BASE_SHA }}) (main) vs [`${{ env.HEAD_SHA }}`](${{ github.event.repository.html_url }}/commit/${{ env.HEAD_SHA }}) (PR)' >> pr_comment | ||
# echo '```' >> pr_comment | ||
# cat cmp_results >> pr_comment | ||
# echo '```' >> pr_comment | ||
# cat pr_comment > ${{ env.PR_COMMENT }} | ||
|
||
# - name: 'Comment PR' | ||
# if: github.ref != 'refs/heads/main' | ||
# uses: actions/github-script@v6 | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# script: | | ||
# const pullRequests = await github.rest.pulls.list({ | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# state: 'open', | ||
# }) | ||
|
||
# const filtered = pullRequests.data.filter(x => x.head.sha.startsWith('${{ env.HEAD_SHA }}')) | ||
|
||
# github.rest.issues.createComment({ | ||
# issue_number: filtered[0].number, | ||
# owner: context.repo.owner, | ||
# repo: context.repo.repo, | ||
# body: require('fs').readFileSync('${{ env.PR_COMMENT }}').toString() | ||
# }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
# Enabling strict error handling | ||
set -Eeuo pipefail | ||
|
||
echo "Checking CUDA version in the conda environment..." | ||
|
||
# Extract CUDA version from conda list output | ||
CUDA_VERSION=$(conda list | grep 'cuda-version' | awk '{print $2}') | ||
|
||
# Check if CUDA version was found | ||
if [ -z "$CUDA_VERSION" ]; then | ||
echo "CUDA version not found in the conda environment." | ||
exit 1 # Exit with a non-zero status indicating failure | ||
else | ||
echo "CUDA version found: $CUDA_VERSION" | ||
fi | ||
|
||
echo "Installing pytorch,transformers and pytest to the environment for crossfit tests..." | ||
mamba install \ | ||
cuda-version=$CUDA_VERSION \ | ||
conda-forge::pytorch \ | ||
conda-forge::transformers \ | ||
conda-forge::pytest \ | ||
-c conda-forge \ | ||
--override-channels \ | ||
--yes | ||
|
||
# Have to install sentence-transformers from pip | ||
# because conda-forge leads to a torch vision conflict | ||
# which leads to it being installed on CPUs | ||
pip3 install sentence-transformers sentencepiece | ||
|
||
# Install the crossfit package in editable mode with test dependencies | ||
pip3 install -e '.[test]' | ||
# Running tests | ||
echo "Running tests..." | ||
pytest tests | ||
# Capture the exit code of pytest | ||
EXITCODE=$? | ||
|
||
# Echo the exit code | ||
echo "Crossfit test script exiting with value: ${EXITCODE}" | ||
|
||
# Exit with the same code as pytest | ||
exit ${EXITCODE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure if this is the right fix. CC: @rjzamora
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this looks correct to me. My understanding is that all "real" index objects inherit from
Index
now.I suppose dask-cudf uses BaseIndex, but that dispatch was added a long time ago (and BaseIndex is probably unnecessary).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a ton for confirming this .