Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.

Commit c44b87a

Browse files
committed
Merge branch 'main' into pyproject
2 parents 4bc57a1 + 7e3565d commit c44b87a

File tree

52 files changed

+550
-515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+550
-515
lines changed

.github/workflows/ci_checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ concurrency:
1515
jobs:
1616

1717
check-schema:
18-
uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.5.0
18+
uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.7.1

.github/workflows/ci_docs.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,13 @@ jobs:
9999

100100
- name: Make Documentation
101101
working-directory: ./_docs
102-
run: |
103-
# First run the same pipeline as Read-The-Docs
104-
make html --debug SPHINXOPTS="-W --keep-going" -b linkcheck
102+
run: make html --debug SPHINXOPTS="-W --keep-going"
103+
104+
- name: Check External Links (Optional)
105+
working-directory: ./_docs
106+
run: make --jobs $(nproc) linkcheck
107+
# ToDO: comment on PR if any link failed
108+
continue-on-error: true
105109

106110
- name: Upload built docs
107111
uses: actions/upload-artifact@v3

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,9 @@ dmypy.json
129129
.pyre/
130130

131131
.idea/
132+
133+
# data artifacts
134+
logs/
135+
lightning_logs/
136+
cifar-10-batches-py
137+
*.tar.gz

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
args: [--in-place, --wrap-summaries=115, --wrap-descriptions=120]
3737

3838
- repo: https://github.com/PyCQA/isort
39-
rev: 5.11.4
39+
rev: 5.12.0
4040
hooks:
4141
- id: isort
4242

_requirements/default.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
setuptools==65.*
1+
setuptools==67.4.0
22
matplotlib>=3.0.0, <3.4.0
3-
ipython[notebook]>=8.0.0, <8.9.0
3+
ipython[notebook]>=8.0.0, <8.12.0
44
torch>=1.8.1, <1.14.0
5-
pytorch-lightning>=1.4, <1.9
5+
pytorch-lightning>=1.4, <2.0.0
66
torchmetrics>=0.7, <0.12
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
title: "Tutorial 1: Introduction to PyTorch"
22
author: Phillip Lippe
33
created: 2021-08-27
4-
updated: 2021-11-29
4+
updated: 2023-03-14
55
license: CC BY-SA
66
description: |
77
This tutorial will give a short introduction to PyTorch basics, and get you setup for writing your own neural networks.
88
This notebook is part of a lecture series on Deep Learning at the University of Amsterdam.
99
The full list of tutorials can be found at https://uvadlc-notebooks.rtfd.io.
1010
requirements:
1111
- matplotlib
12+
- lightning>=2.0.0rc0
1213
accelerator:
1314
- CPU
1415
- GPU

course_UvA-DL/01-introduction-to-pytorch/Introduction_to_PyTorch.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@
2525
import time
2626

2727
import matplotlib.pyplot as plt
28+
29+
# %matplotlib inline
30+
import matplotlib_inline.backend_inline
2831
import numpy as np
2932
import torch
3033
import torch.nn as nn
3134
import torch.utils.data as data
32-
33-
# %matplotlib inline
34-
from IPython.display import set_matplotlib_formats
3535
from matplotlib.colors import to_rgba
3636
from torch import Tensor
3737
from tqdm.notebook import tqdm # Progress bar
3838

39-
set_matplotlib_formats("svg", "pdf")
39+
matplotlib_inline.backend_inline.set_matplotlib_formats("svg", "pdf") # For export
4040

4141
# %% [markdown]
4242
# ## The Basics of PyTorch
@@ -185,7 +185,7 @@
185185
print("X2 (after)", x2)
186186

187187
# %% [markdown]
188-
# In-place operations are usually marked with a underscore postfix (e.g. "add_" instead of "add").
188+
# In-place operations are usually marked with a underscore postfix (for example `torch.add_` instead of `torch.add`).
189189
#
190190
# Another common operation aims at changing the shape of a tensor.
191191
# A tensor of size (2,3) can be re-organized to any other shape with the same number of elements (e.g. a tensor of size (6), or (3,2), ...).
@@ -455,7 +455,7 @@
455455

456456
# Additionally, some operations on a GPU are implemented stochastic for efficiency
457457
# We want to ensure that all operations are deterministic on GPU (if used) for reproducibility
458-
torch.backends.cudnn.determinstic = True
458+
torch.backends.cudnn.deterministic = True
459459
torch.backends.cudnn.benchmark = False
460460

461461
# %% [markdown]

course_UvA-DL/02-activation-functions/.meta.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: "Tutorial 2: Activation Functions"
22
author: Phillip Lippe
33
created: 2021-08-27
4-
updated: 2021-08-27
4+
updated: 2023-03-14
55
license: CC BY-SA
66
description: |
77
In this tutorial, we will take a closer look at (popular) activation functions and investigate their effect on optimization properties in neural networks.
@@ -14,6 +14,7 @@ requirements:
1414
- torchvision
1515
- matplotlib
1616
- seaborn
17+
- lightning>=2.0.0rc0
1718
accelerator:
1819
- CPU
1920
- GPU

course_UvA-DL/02-activation-functions/Activation_Functions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
from urllib.error import HTTPError
1212

1313
import matplotlib.pyplot as plt
14+
15+
# %matplotlib inline
16+
import matplotlib_inline.backend_inline
1417
import numpy as np
1518
import seaborn as sns
1619
import torch
@@ -19,14 +22,11 @@
1922
import torch.optim as optim
2023
import torch.utils.data as data
2124
import torchvision
22-
23-
# %matplotlib inline
24-
from IPython.display import set_matplotlib_formats
2525
from torchvision import transforms
2626
from torchvision.datasets import FashionMNIST
2727
from tqdm.notebook import tqdm
2828

29-
set_matplotlib_formats("svg", "pdf") # For export
29+
matplotlib_inline.backend_inline.set_matplotlib_formats("svg", "pdf") # For export
3030
sns.set()
3131

3232
# %% [markdown]
@@ -64,7 +64,7 @@ def set_seed(seed):
6464

6565
# Additionally, some operations on a GPU are implemented stochastic for efficiency
6666
# We want to ensure that all operations are deterministic on GPU (if used) for reproducibility
67-
torch.backends.cudnn.determinstic = True
67+
torch.backends.cudnn.deterministic = True
6868
torch.backends.cudnn.benchmark = False
6969

7070
# Fetching the device that will be used throughout this notebook

course_UvA-DL/03-initialization-and-optimization/.meta.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: "Tutorial 3: Initialization and Optimization"
22
author: Phillip Lippe
33
created: 2021-08-27
4-
updated: 2021-11-29
4+
updated: 2023-03-14
55
license: CC BY-SA
66
tags:
77
- Image
@@ -18,6 +18,7 @@ requirements:
1818
- torchvision
1919
- matplotlib
2020
- seaborn
21+
- lightning>=2.0.0rc0
2122
accelerator:
2223
- CPU
2324
- GPU

0 commit comments

Comments
 (0)