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

fix nbs execution #65

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 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
pip install -r requirements-dev.txt

- name: Check deps
shell: bash -l {0}
Expand Down Expand Up @@ -76,7 +80,7 @@ jobs:
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-dev.txt

- 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
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
Loading