Skip to content

Commit

Permalink
Merge pull request #7 from kornia/install-right-torch
Browse files Browse the repository at this point in the history
- add torch version checker
- Manually install accelerate
  • Loading branch information
johnnv1 authored Jan 26, 2024
2 parents c964b1a + 93631a7 commit ea367dd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/actions/env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,20 @@ runs:
shell: bash
run: pip install torch==${{ inputs.pytorch-version }} --index-url https://download.pytorch.org/whl/cpu

- if: ${{ contains(fromJson('["1.9.1"]'), inputs.pytorch-version) }}
name: Install accelerate for old torchs
shell: bash
run: pip install accelerate==0.20.3

- name: Install Kornia dev
shell: bash
run: pip install .[dev,x]

- name: Check dependencies and kornia version
- name: Check torch version
shell: bash
run: pip show torch | grep ${{ inputs.pytorch-version }} || false

- name: Print dependencies and kornia version
shell: bash
run: |
python -c "import torch;print('Pytorch version: ', torch.__version__)"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/self-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
path: subdir
- uses: ./subdir/.github/actions/env/
with:
pytorch-version: '1.9.1'
python-version: '3.8'
ref: main

coverage:
Expand Down

0 comments on commit ea367dd

Please sign in to comment.