Skip to content

Commit

Permalink
Fix/tutorials execution ci (#66)
Browse files Browse the repository at this point in the history
* fix nbs execution

* update asset link

* update asset link to gh raw

* update descriptors matching

* update?

* Update requirements.txt

* Update build.yml

* debug print

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update build.yml

* Update build.yml

* Update requirements.txt

* unhardcode versiob

---------

Co-authored-by: João Gustavo A. Amorim <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 26, 2023
1 parent 6388a80 commit 91486e9
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 37 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,26 @@ jobs:
matrix:
os: ['Ubuntu']
python-version: ['3.8', '3.10']
pytorch-version: ['2.0.0']
pytorch-version: ['2.0.1']

steps:
- uses: actions/checkout@v3

- name: Setup conda dependencies
uses: conda-incubator/setup-miniconda@v2
- name: Setup environment
uses: actions/setup-python@v4
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}

- name: Install pytorch
shell: bash
run: pip install torch==${{ matrix.pytorch-version }} torchvision --index-url https://download.pytorch.org/whl/cpu


- name: Install dependencies
shell: bash -l {0}
run: |
conda install pytorch=${{ matrix.pytorch-version }} torchvision cpuonly -c pytorch
make setup
pip install -r requirements.txt --upgrade
pip install -r requirements-dev.txt --upgrade
- name: Check deps
shell: bash -l {0}
Expand Down Expand Up @@ -75,8 +79,8 @@ jobs:
shell: bash -l {0}
run: |
conda install pytorch=${{ matrix.pytorch-version }} torchvision cpuonly -c pytorch
pip install -r requirements.txt
pip install -r requirements-dev.txt;
pip install -r requirements.txt --upgrade
pip install -r requirements-dev.txt --upgrade
- uses: quarto-dev/quarto-actions/setup@v2

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SOURCEDIR = nbs

DSTDIR = _nbs
.PHONY: purge generate execute sphinx build setup check-deps

purge:
Expand All @@ -8,11 +8,11 @@ purge:

generate:
@echo "\n\nGenerating all tutorials notebooks to '$(SOURCEDIR)'...\n"
jupyter nbconvert $(SOURCEDIR)/**.ipynb --to notebook --output-dir $(SOURCEDIR)
jupyter nbconvert $(SOURCEDIR)/**.ipynb --to notebook --output-dir $(DSTDIR)

execute:
@echo "\n\nExecuting all tutorials notebooks under '$(SOURCEDIR)'...\n"
jupyter nbconvert $(SOURCEDIR)/**.ipynb --execute --inplace
@echo "\n\nExecuting all tutorials notebooks under '$(DSTDIR)'...\n"
jupyter nbconvert $(DSTDIR)/**.ipynb --execute --inplace

build: purge generate render

Expand Down
2 changes: 1 addition & 1 deletion nbs/color_yuv420_to_rgb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
" return filename\n",
"\n",
"\n",
"url = \"http://trace.eas.asu.edu/yuv/foreman/foreman_qcif.7z\"\n",
"url = \"https://github.com/kornia/data/raw/main/foreman_qcif.7z\"\n",
"download_image(url)"
]
},
Expand Down
49 changes: 27 additions & 22 deletions nbs/descriptors_matching.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
jupyter
nbconvert
pre-commit
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ipywidgets
jupyterlab_widgets
kornia
kornia-rs
kornia_moons
kornia_moons>=0.2.9
matplotlib
opencv-python
py7zr
Expand Down

0 comments on commit 91486e9

Please sign in to comment.