Skip to content

Commit cbd7db6

Browse files
committed
fix: nbdev-clean notebook metadata for CI compliance
1 parent 575d687 commit cbd7db6

15 files changed

Lines changed: 342 additions & 342 deletions

File tree

nbs/analysis/benchmark.ipynb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"cells": [
33
{
44
"cell_type": "raw",
5+
"id": "frontmatter",
56
"metadata": {},
67
"source": [
78
"---\ntitle: \"Benchmark\"\ndescription: \"Unified benchmarking API for PyTorch models\"\nskip_showdoc: true\n---"
8-
],
9-
"id": "frontmatter"
9+
]
1010
},
1111
{
1212
"cell_type": "code",
@@ -125,17 +125,20 @@
125125
},
126126
{
127127
"cell_type": "code",
128+
"execution_count": null,
129+
"id": "show_doc_0",
128130
"metadata": {},
131+
"outputs": [],
129132
"source": [
130133
"show_doc(BenchmarkResult)"
131-
],
132-
"id": "show_doc_0",
133-
"outputs": [],
134-
"execution_count": null
134+
]
135135
},
136136
{
137137
"cell_type": "code",
138+
"execution_count": null,
139+
"id": "test_basic",
138140
"metadata": {},
141+
"outputs": [],
139142
"source": [
140143
"#| hide\n",
141144
"from fastcore.test import *\n",
@@ -147,10 +150,7 @@
147150
"assert isinstance(_r, BenchmarkResult)\n",
148151
"assert \"size_num_params\" in _r\n",
149152
"assert _r[\"size_num_params\"] > 0"
150-
],
151-
"id": "test_basic",
152-
"outputs": [],
153-
"execution_count": null
153+
]
154154
},
155155
{
156156
"cell_type": "markdown",
@@ -179,4 +179,4 @@
179179
},
180180
"nbformat": 4,
181181
"nbformat_minor": 5
182-
}
182+
}

nbs/analysis/profiling.ipynb

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"cells": [
33
{
44
"cell_type": "raw",
5+
"id": "frontmatter",
56
"metadata": {},
67
"source": [
78
"---\ntitle: \"Profiling\"\ndescription: \"Per-layer profiling for deep analysis of model performance\"\nskip_showdoc: true\n---"
8-
],
9-
"id": "frontmatter"
9+
]
1010
},
1111
{
1212
"cell_type": "code",
@@ -20,13 +20,13 @@
2020
},
2121
{
2222
"cell_type": "code",
23+
"execution_count": null,
24+
"id": "setup_showdoc",
2325
"metadata": {},
26+
"outputs": [],
2427
"source": [
2528
"#| include: false\nfrom nbdev.showdoc import *"
26-
],
27-
"id": "setup_showdoc",
28-
"outputs": [],
29-
"execution_count": null
29+
]
3030
},
3131
{
3232
"cell_type": "code",
@@ -438,61 +438,61 @@
438438
},
439439
{
440440
"cell_type": "code",
441+
"execution_count": null,
442+
"id": "show_doc_0",
441443
"metadata": {},
444+
"outputs": [],
442445
"source": [
443446
"show_doc(LayerProfiler)"
444-
],
445-
"id": "show_doc_0",
446-
"outputs": [],
447-
"execution_count": null
447+
]
448448
},
449449
{
450450
"cell_type": "code",
451+
"execution_count": null,
452+
"id": "show_doc_1",
451453
"metadata": {},
454+
"outputs": [],
452455
"source": [
453456
"show_doc(LayerProfiler.profile)"
454-
],
455-
"id": "show_doc_1",
456-
"outputs": [],
457-
"execution_count": null
457+
]
458458
},
459459
{
460460
"cell_type": "code",
461+
"execution_count": null,
462+
"id": "show_doc_2",
461463
"metadata": {},
464+
"outputs": [],
462465
"source": [
463466
"show_doc(LayerProfiler.top)"
464-
],
465-
"id": "show_doc_2",
466-
"outputs": [],
467-
"execution_count": null
467+
]
468468
},
469469
{
470470
"cell_type": "code",
471+
"execution_count": null,
472+
"id": "show_doc_3",
471473
"metadata": {},
474+
"outputs": [],
472475
"source": [
473476
"show_doc(LayerProfiler.summary)"
474-
],
475-
"id": "show_doc_3",
476-
"outputs": [],
477-
"execution_count": null
477+
]
478478
},
479479
{
480480
"cell_type": "code",
481+
"execution_count": null,
482+
"id": "test_basic",
481483
"metadata": {},
484+
"outputs": [],
482485
"source": [
483486
"#| hide\nfrom fastcore.test import *\n\nimport torch, torch.nn as nn\n_m = nn.Sequential(nn.Linear(10, 20), nn.ReLU(), nn.Linear(20, 5))\n_x = torch.randn(1, 10)\n_lp = LayerProfiler(_m, _x)\n_results = _lp.profile(metrics=[\"size\"])\nassert len(_results) > 0\nassert all(\"params\" in r for r in _results)"
484-
],
485-
"id": "test_basic",
486-
"outputs": [],
487-
"execution_count": null
487+
]
488488
},
489489
{
490490
"cell_type": "markdown",
491+
"id": "see_also",
491492
"metadata": {},
492493
"source": [
493494
"---\n\n## See Also\n\n- [Benchmark](benchmark.html) — Unified benchmarking API\n- [Speed](../metrics/speed.html) — Latency measurement\n- [Profiling Tutorial](../tutorials/profiling.html) — Step-by-step profiling guide"
494-
],
495-
"id": "see_also"
495+
]
496496
}
497497
],
498498
"metadata": {
@@ -504,4 +504,4 @@
504504
},
505505
"nbformat": 4,
506506
"nbformat_minor": 5
507-
}
507+
}

0 commit comments

Comments
 (0)