Skip to content
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

Install CUDA as part of setup steps #26

Closed
wants to merge 11 commits into from
33 changes: 29 additions & 4 deletions .github/workflows/run-tests-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
fetch-depth: 0
submodules: 'recursive'


- name: Setup | uv
uses: astral-sh/setup-uv@v5
with:
Expand All @@ -31,11 +30,37 @@ jobs:
- name: Setup | Dependencies
run: uv sync --frozen --extra gpu --no-group docs

- name: Setup | Verify CUDA installation
run: |
nvcc --version && \
echo "Installed CUDA version is: ${{ steps.cuda-toolkit.outputs.cuda }}" && \
echo "CUDA installation path is: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}" || \
echo "CUDA not found"

- name: Setup | Install CUDA
id: cuda-toolkit
uses: Jimver/cuda-toolkit@v0.2.21
with:
cuda: '12.4.0'

- name: Setup | Verify CUDA installation
run: |
nvcc --version && \
echo "Installed CUDA version is: ${{ steps.cuda-toolkit.outputs.cuda }}" && \
echo "CUDA installation path is: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}" || \
echo "CUDA not found"

- name: Check PyTorch and CUDA version
run: python -c "import torch; print('Torch:', torch.__version__); print('CUDA available:', torch.cuda.is_available()); print('CUDA version:', torch.version.cuda)"

- name: Check GPU-s
run: nvidia-smi || echo "no GPU-s found"

- name: Run tests -> end_to_end -> sequential
run: uv run pytest tests/end_to_end/test_tabular_sequential.py
run: uv run pytest --log-cli-level=INFO tests/end_to_end/test_tabular_sequential.py

- name: Run tests -> end_to_end -> sequential context
run: uv run pytest tests/end_to_end/test_tabular_sequential_context.py
run: uv run pytest --log-cli-level=INFO tests/end_to_end/test_tabular_sequential_context.py

- name: Run tests -> end_to_end all except sequential
run: uv run pytest --ignore=tests/end_to_end/test_tabular_sequential.py --ignore=tests/end_to_end/test_tabular_sequential_context.py tests/end_to_end/
run: uv run pytest --log-cli-level=INFO --ignore=tests/end_to_end/test_tabular_sequential.py --ignore=tests/end_to_end/test_tabular_sequential_context.py tests/end_to_end/
12 changes: 6 additions & 6 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
uses: ./.github/workflows/pre-commit-check.yml
secrets: inherit
run-tests-cpu:
if: |
github.event_name == 'push' ||
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
uses: ./.github/workflows/run-tests-cpu.yaml
secrets: inherit
#run-tests-cpu:
# if: |
# github.event_name == 'push' ||
# (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
# uses: ./.github/workflows/run-tests-cpu.yaml
# secrets: inherit
run-tests-gpu:
if: |
github.ref == 'refs/heads/main' ||
Expand Down
Loading