Skip to content

Commit 7a6733b

Browse files
committed
chore: rerun tutorial notebooks
1 parent 88214ad commit 7a6733b

7 files changed

Lines changed: 22 additions & 151 deletions

File tree

docs/tutorials/notebooks/advanced_training.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
},
8080
{
8181
"cell_type": "code",
82-
"execution_count": 2,
82+
"execution_count": null,
8383
"id": "ca8e3e4d",
8484
"metadata": {},
8585
"outputs": [],
@@ -90,11 +90,7 @@
9090
"# These tutorials use small synthetic datasets and short training runs, which\n",
9191
"# surfaces a few non-actionable framework messages. Quieten them so the output\n",
9292
"# stays focused on the tutorial; none of them affect correctness.\n",
93-
"warnings.filterwarnings(\"ignore\", message=\".*n_quantiles.*\")\n",
94-
"warnings.filterwarnings(\"ignore\", message=\".*does not have many workers.*\")\n",
95-
"warnings.filterwarnings(\"ignore\", message=\".*have no logger configured.*\")\n",
96-
"warnings.filterwarnings(\"ignore\", message=\".*lr_patience.*\")\n",
97-
"warnings.filterwarnings(\"ignore\", message=\".*Checkpoint directory.*\")\n",
93+
"warnings.filterwarnings(\"ignore\")\n",
9894
"logging.getLogger(\"lightning.pytorch\").setLevel(logging.ERROR)"
9995
]
10096
},
@@ -2078,7 +2074,7 @@
20782074
],
20792075
"metadata": {
20802076
"kernelspec": {
2081-
"display_name": ".venv",
2077+
"display_name": "Python 3",
20822078
"language": "python",
20832079
"name": "python3"
20842080
},

docs/tutorials/notebooks/experimental.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
},
125125
{
126126
"cell_type": "code",
127-
"execution_count": 2,
127+
"execution_count": null,
128128
"id": "8c6c18d4",
129129
"metadata": {},
130130
"outputs": [],
@@ -135,11 +135,7 @@
135135
"# These tutorials use small synthetic datasets and short training runs, which\n",
136136
"# surfaces a few non-actionable framework messages. Quieten them so the output\n",
137137
"# stays focused on the tutorial; none of them affect correctness.\n",
138-
"warnings.filterwarnings(\"ignore\", message=\".*n_quantiles.*\")\n",
139-
"warnings.filterwarnings(\"ignore\", message=\".*does not have many workers.*\")\n",
140-
"warnings.filterwarnings(\"ignore\", message=\".*have no logger configured.*\")\n",
141-
"warnings.filterwarnings(\"ignore\", message=\".*lr_patience.*\")\n",
142-
"warnings.filterwarnings(\"ignore\", message=\".*Checkpoint directory.*\")\n",
138+
"warnings.filterwarnings(\"ignore\")\n",
143139
"logging.getLogger(\"lightning.pytorch\").setLevel(logging.ERROR)"
144140
]
145141
},
@@ -668,7 +664,7 @@
668664
],
669665
"metadata": {
670666
"kernelspec": {
671-
"display_name": ".venv",
667+
"display_name": "Python 3",
672668
"language": "python",
673669
"name": "python3"
674670
},

docs/tutorials/notebooks/hpo.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
},
108108
{
109109
"cell_type": "code",
110-
"execution_count": 2,
110+
"execution_count": null,
111111
"id": "6408eb44",
112112
"metadata": {},
113113
"outputs": [],
@@ -118,11 +118,7 @@
118118
"# These tutorials use small synthetic datasets and short training runs, which\n",
119119
"# surfaces a few non-actionable framework messages. Quieten them so the output\n",
120120
"# stays focused on the tutorial; none of them affect correctness.\n",
121-
"warnings.filterwarnings(\"ignore\", message=\".*n_quantiles.*\")\n",
122-
"warnings.filterwarnings(\"ignore\", message=\".*does not have many workers.*\")\n",
123-
"warnings.filterwarnings(\"ignore\", message=\".*have no logger configured.*\")\n",
124-
"warnings.filterwarnings(\"ignore\", message=\".*lr_patience.*\")\n",
125-
"warnings.filterwarnings(\"ignore\", message=\".*Checkpoint directory.*\")\n",
121+
"warnings.filterwarnings(\"ignore\")\n",
126122
"logging.getLogger(\"lightning.pytorch\").setLevel(logging.ERROR)"
127123
]
128124
},
@@ -4196,7 +4192,7 @@
41964192
],
41974193
"metadata": {
41984194
"kernelspec": {
4199-
"display_name": ".venv",
4195+
"display_name": "Python 3",
42004196
"language": "python",
42014197
"name": "python3"
42024198
},

docs/tutorials/notebooks/imbalance_classification.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
},
7575
{
7676
"cell_type": "code",
77-
"execution_count": 2,
77+
"execution_count": null,
7878
"id": "30074ad7",
7979
"metadata": {},
8080
"outputs": [],
@@ -85,11 +85,7 @@
8585
"# These tutorials use small synthetic datasets and short training runs, which\n",
8686
"# surfaces a few non-actionable framework messages. Quieten them so the output\n",
8787
"# stays focused on the tutorial; none of them affect correctness.\n",
88-
"warnings.filterwarnings(\"ignore\", message=\".*n_quantiles.*\")\n",
89-
"warnings.filterwarnings(\"ignore\", message=\".*does not have many workers.*\")\n",
90-
"warnings.filterwarnings(\"ignore\", message=\".*have no logger configured.*\")\n",
91-
"warnings.filterwarnings(\"ignore\", message=\".*lr_patience.*\")\n",
92-
"warnings.filterwarnings(\"ignore\", message=\".*Checkpoint directory.*\")\n",
88+
"warnings.filterwarnings(\"ignore\")\n",
9389
"logging.getLogger(\"lightning.pytorch\").setLevel(logging.ERROR)"
9490
]
9591
},
@@ -1586,7 +1582,7 @@
15861582
],
15871583
"metadata": {
15881584
"kernelspec": {
1589-
"display_name": ".venv",
1585+
"display_name": "Python 3",
15901586
"language": "python",
15911587
"name": "python3"
15921588
},

docs/tutorials/notebooks/observability.ipynb

Lines changed: 4 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
},
7272
{
7373
"cell_type": "code",
74-
"execution_count": 1,
74+
"execution_count": null,
7575
"id": "6605b9f5",
7676
"metadata": {},
7777
"outputs": [],
@@ -82,27 +82,8 @@
8282
"# These tutorials use small synthetic datasets and short training runs, which\n",
8383
"# surfaces a few non-actionable framework messages. Quieten them so the output\n",
8484
"# stays focused on the tutorial; none of them affect correctness.\n",
85-
"warnings.filterwarnings(\"ignore\", message=\".*n_quantiles.*\")\n",
86-
"warnings.filterwarnings(\"ignore\", message=\".*does not have many workers.*\")\n",
87-
"warnings.filterwarnings(\"ignore\", message=\".*have no logger configured.*\")\n",
88-
"warnings.filterwarnings(\"ignore\", message=\".*lr_patience.*\")\n",
89-
"warnings.filterwarnings(\"ignore\", message=\".*Checkpoint directory.*\")\n",
90-
"warnings.filterwarnings(\"ignore\", message=\".*logging interval.*\")\n",
91-
"warnings.filterwarnings(\"ignore\", message=\".*IProgress not found.*\")\n",
92-
"\n",
93-
"# Lightning prints a device banner and a parameter-count table on every fit.\n",
94-
"# They are useful in isolation but drown out the observability messages this\n",
95-
"# tutorial is about, so raise these loggers to ERROR. DeepTab's own events are\n",
96-
"# emitted separately and are unaffected.\n",
97-
"for _name in (\n",
98-
" \"lightning\",\n",
99-
" \"lightning.pytorch\",\n",
100-
" \"lightning.pytorch.callbacks.model_summary\",\n",
101-
" \"lightning.pytorch.utilities.rank_zero\",\n",
102-
" \"lightning.pytorch.accelerators\",\n",
103-
" \"pytorch_lightning\",\n",
104-
"):\n",
105-
" logging.getLogger(_name).setLevel(logging.ERROR)"
85+
"warnings.filterwarnings(\"ignore\")\n",
86+
"logging.getLogger(\"lightning.pytorch\").setLevel(logging.ERROR)\n"
10687
]
10788
},
10889
{
@@ -1127,92 +1108,6 @@
11271108
"Your sink received the full event stream with its structured payloads, ready to forward to whatever backend you use. Because no `ObservabilityConfig` was attached, DeepTab created no run directory of its own: your code is in full control."
11281109
]
11291110
},
1130-
{
1131-
"cell_type": "markdown",
1132-
"id": "c9833541",
1133-
"metadata": {},
1134-
"source": [
1135-
"## 8. Side-by-side: what each configuration leaves on disk\n",
1136-
"\n",
1137-
"The trees below are the canonical shapes you can expect. Timestamps and ids vary per run; the structure does not.\n",
1138-
"\n",
1139-
"**No observability** — only the best-weights checkpoint:\n",
1140-
"\n",
1141-
"```text\n",
1142-
"01_no_observability/\n",
1143-
" checkpoints/\n",
1144-
" best_model.ckpt\n",
1145-
"```\n",
1146-
"\n",
1147-
"**Minimal `ObservabilityConfig`** — self-describing run directory:\n",
1148-
"\n",
1149-
"```text\n",
1150-
"02_minimal/\n",
1151-
" runs/demo/<timestamp>_<run_id>/\n",
1152-
" config.yaml # full estimator configuration\n",
1153-
" summary.json # final metrics\n",
1154-
" artifacts/ # reserved for run artifacts\n",
1155-
" checkpoints/\n",
1156-
" best_model.ckpt\n",
1157-
"```\n",
1158-
"\n",
1159-
"**`structured_logging=True, log_to_file=True`** — adds the event log:\n",
1160-
"\n",
1161-
"```text\n",
1162-
"04_with_file/\n",
1163-
" runs/demo/<timestamp>_<run_id>/\n",
1164-
" config.yaml\n",
1165-
" lifecycle.jsonl # one JSON event per line\n",
1166-
" summary.json\n",
1167-
" artifacts/\n",
1168-
" checkpoints/\n",
1169-
" best_model.ckpt\n",
1170-
"```\n",
1171-
"\n",
1172-
"**`experiment_trackers=[\"tensorboard\"]`** — adds a TensorBoard tree:\n",
1173-
"\n",
1174-
"```text\n",
1175-
"06_tensorboard/\n",
1176-
" runs/demo/<timestamp>_<run_id>/\n",
1177-
" config.yaml\n",
1178-
" summary.json\n",
1179-
" artifacts/\n",
1180-
" checkpoints/best_model.ckpt\n",
1181-
" tensorboard/demo/<timestamp>_<run_id>/\n",
1182-
" events.out.tfevents...\n",
1183-
" hparams.yaml\n",
1184-
"```\n",
1185-
"\n",
1186-
"**`experiment_trackers=[\"mlflow\"]`** — adds a local MLflow store:\n",
1187-
"\n",
1188-
"```text\n",
1189-
"07_mlflow/\n",
1190-
" runs/demo/<timestamp>_<run_id>/\n",
1191-
" config.yaml\n",
1192-
" summary.json\n",
1193-
" artifacts/\n",
1194-
" checkpoints/best_model.ckpt\n",
1195-
" mlflow/\n",
1196-
" backend/mlflow.db # run metadata (SQLite)\n",
1197-
" artifacts/<mlflow_run_id>/artifacts/\n",
1198-
" config.yaml\n",
1199-
" summary.json\n",
1200-
" best_model/... # logged model checkpoint\n",
1201-
" checkpoints/best_model.ckpt\n",
1202-
"```\n",
1203-
"\n",
1204-
"**`logger=...` + a tracker** — your Lightning logger sits beside DeepTab's trees:\n",
1205-
"\n",
1206-
"```text\n",
1207-
"08_byo_logger/\n",
1208-
" csv/mlp/version_0/\n",
1209-
" hparams.yaml\n",
1210-
" metrics.csv\n",
1211-
" runs/demo/<timestamp>_<run_id>/...\n",
1212-
" tensorboard/demo/<timestamp>_<run_id>/...\n",
1213-
"```"
1214-
]
1215-
},
12161111
{
12171112
"cell_type": "markdown",
12181113
"id": "92b61374",
@@ -1263,7 +1158,7 @@
12631158
],
12641159
"metadata": {
12651160
"kernelspec": {
1266-
"display_name": ".venv",
1161+
"display_name": "Python 3",
12671162
"language": "python",
12681163
"name": "python3"
12691164
},

docs/tutorials/notebooks/skewed_regression.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
},
7474
{
7575
"cell_type": "code",
76-
"execution_count": 2,
76+
"execution_count": null,
7777
"id": "72490779",
7878
"metadata": {},
7979
"outputs": [],
@@ -84,11 +84,7 @@
8484
"# These tutorials use small synthetic datasets and short training runs, which\n",
8585
"# surfaces a few non-actionable framework messages. Quieten them so the output\n",
8686
"# stays focused on the tutorial; none of them affect correctness.\n",
87-
"warnings.filterwarnings(\"ignore\", message=\".*n_quantiles.*\")\n",
88-
"warnings.filterwarnings(\"ignore\", message=\".*does not have many workers.*\")\n",
89-
"warnings.filterwarnings(\"ignore\", message=\".*have no logger configured.*\")\n",
90-
"warnings.filterwarnings(\"ignore\", message=\".*lr_patience.*\")\n",
91-
"warnings.filterwarnings(\"ignore\", message=\".*Checkpoint directory.*\")\n",
87+
"warnings.filterwarnings(\"ignore\")\n",
9288
"logging.getLogger(\"lightning.pytorch\").setLevel(logging.ERROR)"
9389
]
9490
},
@@ -1992,7 +1988,7 @@
19921988
],
19931989
"metadata": {
19941990
"kernelspec": {
1995-
"display_name": ".venv",
1991+
"display_name": "Python 3",
19961992
"language": "python",
19971993
"name": "python3"
19981994
},

docs/tutorials/notebooks/uncertainty_quantification.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
},
6464
{
6565
"cell_type": "code",
66-
"execution_count": 2,
66+
"execution_count": null,
6767
"id": "0d5afac0",
6868
"metadata": {},
6969
"outputs": [],
@@ -74,11 +74,7 @@
7474
"# These tutorials use small synthetic datasets and short training runs, which\n",
7575
"# surfaces a few non-actionable framework messages. Quieten them so the output\n",
7676
"# stays focused on the tutorial; none of them affect correctness.\n",
77-
"warnings.filterwarnings(\"ignore\", message=\".*n_quantiles.*\")\n",
78-
"warnings.filterwarnings(\"ignore\", message=\".*does not have many workers.*\")\n",
79-
"warnings.filterwarnings(\"ignore\", message=\".*have no logger configured.*\")\n",
80-
"warnings.filterwarnings(\"ignore\", message=\".*lr_patience.*\")\n",
81-
"warnings.filterwarnings(\"ignore\", message=\".*Checkpoint directory.*\")\n",
77+
"warnings.filterwarnings(\"ignore\")\n",
8278
"logging.getLogger(\"lightning.pytorch\").setLevel(logging.ERROR)"
8379
]
8480
},
@@ -1846,7 +1842,7 @@
18461842
],
18471843
"metadata": {
18481844
"kernelspec": {
1849-
"display_name": ".venv",
1845+
"display_name": "Python 3",
18501846
"language": "python",
18511847
"name": "python3"
18521848
},

0 commit comments

Comments
 (0)