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

ci: rebuild all notebooks in key req. | assistant changed ++ make default res. #348

Merged
merged 34 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
13c1eef
ci: rebuild all notebooks in key req. & assistant changed
Borda Jul 25, 2024
1c422a4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2024
a723636
update req.
Borda Jul 25, 2024
8d45c2a
Merge branch 'ci/req-update' of https://github.com/PyTorchLightning/l…
Borda Jul 25, 2024
59c3daa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2024
6c17549
os.getcwd()
Borda Jul 25, 2024
e0f127f
Merge branch 'ci/req-update' of https://github.com/PyTorchLightning/l…
Borda Jul 25, 2024
ac2feb6
all notebooks
Borda Jul 25, 2024
552b92c
all notebooks
Borda Jul 25, 2024
37a55f2
realpath
Borda Jul 25, 2024
19ca1a5
Apply suggestions from code review
Borda Jul 25, 2024
30dd7a2
freeze
Borda Jul 25, 2024
00b3cdc
lit
Borda Jul 25, 2024
46aec00
import
Borda Jul 25, 2024
9df6b2e
push nvcc
Borda Jul 25, 2024
be4baf8
use
Borda Jul 25, 2024
2da490f
cuda 12.1
Borda Jul 25, 2024
ef56035
use
Borda Jul 25, 2024
b99ea33
maxParallel: "10"
Borda Jul 25, 2024
21e6b1d
audio
Borda Jul 25, 2024
e0072b4
use
Borda Jul 25, 2024
7b1a95f
torch
Borda Jul 25, 2024
48e8e82
pin
Borda Jul 25, 2024
eb7fe85
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2024
edae5f0
base
Borda Jul 25, 2024
54558de
Merge branch 'ci/req-update' of https://github.com/PyTorchLightning/l…
Borda Jul 25, 2024
5704880
aggreg base
Borda Jul 25, 2024
ec9c3fc
REQ
Borda Jul 25, 2024
a5d6853
dosker
Borda Jul 25, 2024
789356e
typo
Borda Jul 25, 2024
48fd073
assert
Borda Jul 25, 2024
4a52ef3
value_range
Borda Jul 25, 2024
5ddbd7c
torch-geometric
Borda Jul 25, 2024
4cdb54a
binaries
Borda Jul 26, 2024
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
16 changes: 14 additions & 2 deletions .actions/assistant.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
from pip._internal.operations import freeze
from wcmatch import glob

_PATH_HERE = os.path.dirname(__file__)
_PATH_HERE = os.path.realpath(os.path.dirname(__file__))
Borda marked this conversation as resolved.
Show resolved Hide resolved
_PATH_ROOT = os.path.dirname(_PATH_HERE)
PATH_SCRIPT_RENDER = os.path.join(_PATH_HERE, "_ipynb-render.sh")
PATH_SCRIPT_TEST = os.path.join(_PATH_HERE, "_ipynb-validate.sh")
PATH_DEV_SCRIPT = os.path.join(".actions", "assistant.py")
PATH_DEV_REQUIREMENTS = os.path.join("_requirements", "devel.txt")
# https://askubuntu.com/questions/909918/how-to-show-unzip-progress
UNZIP_PROGRESS_BAR = ' | awk \'BEGIN {ORS=" "} {if(NR%10==0)print "."}\''
REPO_NAME = "lightning-tutorials"
Expand Down Expand Up @@ -558,14 +560,24 @@ def group_folders(
--fpath_actual_dirs "['../dirs-main.txt', '../dirs-publication.txt']"

"""
dirs = []
# replace here notation with path, so later it does not fall to ignore
if root_path == ".":
root_path = os.getcwd()
# loading the generated changes with git diff
with open(fpath_gitdiff) as fopen:
changed = [ln.strip() for ln in fopen.readlines()]
# in case of ay key component changed, later rebuild all notebooks
rebuild_all = any(
p_key in p_changed for p_key in (PATH_DEV_SCRIPT, PATH_DEV_REQUIREMENTS) for p_changed in changed
)
dirs_changed = [os.path.dirname(ln) for ln in changed]
if rebuild_all:
dirs_changed += [p for p in os.listdir(_PATH_ROOT) if os.path.isdir(p) and p[0] not in (".", "_")]
# append a path to root in case you call this from other path then root
if root_path:
dirs_changed = [os.path.join(root_path, d) for d in dirs_changed]
# append all subfolders in case of parent requirements has been changed all related notebooks shall be updated
dirs = []
for dir in dirs_changed:
# in case that the diff item comes from removed folder
if not os.path.isdir(dir):
Expand Down
2 changes: 1 addition & 1 deletion .azure/ipynb-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
pip --version
# todo: export requirements for notebooks to file and execute
# todo: adjust torch ecosystem versions
pip install -r requirements.txt -r _requirements/data.txt
pip install -r requirements.txt
displayName: "Install dependencies"
timeoutInMinutes: "15"

Expand Down
2 changes: 1 addition & 1 deletion .azure/ipynb-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- bash: |
set -e
pip --version
pip install -r requirements.txt -r _requirements/data.txt
pip install -r requirements.txt
pip list
displayName: "Install dependencies"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The addition has to formed as new folder:
accelerator:
- CPU
```
- requirements listed in `requirements.txt` in the particular folder (in case you need some other packaged then listed the parent folder)
- _\[optional\]_ requirements listed in `requirements.txt` in the particular folder (in case you need some other packaged then listed the parent folder)

## Using datasets

Expand Down
2 changes: 0 additions & 2 deletions _requirements/data.txt

This file was deleted.

3 changes: 3 additions & 0 deletions _requirements/devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ papermill>=2.3.4, <2.5.0 # rendering
matplotlib
# all is based on PyTorch
torch

# fixed version to be able to call it as `python -m kaggle`
https://github.com/Borda/kaggle-api/archive/refs/heads/setup/python-m.zip
Empty file.
2 changes: 0 additions & 2 deletions course_UvA-DL/02-activation-functions/requirements.txt

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions course_UvA-DL/04-inception-resnet-densenet/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
torchvision
seaborn
tabulate
tensorboard

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
torchvision
matplotlib
tensorboard
2 changes: 0 additions & 2 deletions course_UvA-DL/08-deep-autoencoders/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
torchvision
seaborn
tensorboard
2 changes: 0 additions & 2 deletions course_UvA-DL/09-normalizing-flows/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
torchvision
seaborn
tabulate

This file was deleted.

2 changes: 0 additions & 2 deletions course_UvA-DL/11-vision-transformer/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
torchvision
seaborn
tensorboard
2 changes: 0 additions & 2 deletions course_UvA-DL/12-meta-learning/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
torchvision
seaborn
tensorboard
scipy
2 changes: 0 additions & 2 deletions course_UvA-DL/13-contrastive-learning/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
torchvision
seaborn
tensorboard
2 changes: 2 additions & 0 deletions course_UvA-DL/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ numpy <2.0 # needed for older Torch
torch >=1.8.1,<2.1.0
pytorch-lightning >=2.0,<2.1.0
torchmetrics >=1.0,<1.3
torchvision
matplotlib
seaborn
Loading