Skip to content

Commit a0ddf5e

Browse files
committed
fix(notebooks): MCMC note cells as markdown; drop nb08 animations
- nb03/nb04/nb05/nb06: converted the H14 'NOTE FOR DEMO USERS' cells from code cells holding a bare triple-quoted string (Jupyter echoed the string as Out[...] in two different formats depending on the viewer) to markdown blockquotes. Same content, no output clutter. - nb08: removed the BFGS and DE-on-Eggholder inline jshtml animations. matplotlib was hitting its animation.embed_limit on both (the warning reported sizes of 52 MB and 84 MB); the static objective-trace and contour-path plots in the same cells are what made the notebook useful anyway. nb08 is now 4.8 MB (was 165 MB with animations). - .gitignore: add '**/.ipynb_checkpoints/' so checkpoint dirs can't be accidentally staged. Re-executed all 5 affected notebooks; zero error cells, no leaked paths, no embedded animation HTML.
1 parent 720c500 commit a0ddf5e

6 files changed

Lines changed: 275 additions & 464 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ packages/
412412
.venv/
413413
venv/
414414

415+
# Jupyter checkpoint snapshots
416+
**/.ipynb_checkpoints/
417+
415418
# Local History for Visual Studio Code
416419
.history/
417420

notebooks/03_mcmc_basics.ipynb

Lines changed: 53 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@
109109
"id": "046fb0a3",
110110
"metadata": {
111111
"execution": {
112-
"iopub.execute_input": "2026-04-23T21:32:19.608974Z",
113-
"iopub.status.busy": "2026-04-23T21:32:19.608974Z",
114-
"iopub.status.idle": "2026-04-23T21:32:20.766682Z",
115-
"shell.execute_reply": "2026-04-23T21:32:20.766682Z"
112+
"iopub.execute_input": "2026-04-23T21:45:12.810987Z",
113+
"iopub.status.busy": "2026-04-23T21:45:12.810987Z",
114+
"iopub.status.idle": "2026-04-23T21:45:13.814855Z",
115+
"shell.execute_reply": "2026-04-23T21:45:13.814855Z"
116116
}
117117
},
118118
"outputs": [
@@ -149,8 +149,8 @@
149149
]
150150
},
151151
{
152-
"cell_type": "code",
153-
"execution_count": 2,
152+
"cell_type": "markdown",
153+
"execution_count": null,
154154
"id": "8f4b903e",
155155
"metadata": {
156156
"execution": {
@@ -160,25 +160,9 @@
160160
"shell.execute_reply": "2026-04-23T21:32:20.774600Z"
161161
}
162162
},
163-
"outputs": [
164-
{
165-
"data": {
166-
"text/plain": [
167-
"\" NOTE FOR DEMO USERS:\\nWhen calling Numerics MCMC samplers from Python via pythonnet, the samplers'\\ninternal parallel chains (Parallel.For) contend for Python's Global Interpreter\\nLock (GIL). This makes parallel execution slower than sequential. This is\\nwhy we set sampler.ParallelizeChains = False for every example. It defaults\\nto True, which works well in C#, but it slows the sampler down in Python.\""
168-
]
169-
},
170-
"execution_count": 2,
171-
"metadata": {},
172-
"output_type": "execute_result"
173-
}
174-
],
163+
"outputs": [],
175164
"source": [
176-
"''' NOTE FOR DEMO USERS:\n",
177-
"When calling Numerics MCMC samplers from Python via pythonnet, the samplers'\n",
178-
"internal parallel chains (Parallel.For) contend for Python's Global Interpreter\n",
179-
"Lock (GIL). This makes parallel execution slower than sequential. This is\n",
180-
"why we set sampler.ParallelizeChains = False for every example. It defaults\n",
181-
"to True, which works well in C#, but it slows the sampler down in Python.'''"
165+
"> **Note for demo users.** When calling Numerics MCMC samplers from Python via pythonnet, the samplers' internal parallel chains (`Parallel.For`) contend for Python's Global Interpreter Lock (GIL). This makes parallel execution slower than sequential. That's why every example below sets `sampler.ParallelizeChains = False`. It defaults to `True`, which works well in C# but slows the sampler down when driven from Python."
182166
]
183167
},
184168
{
@@ -197,14 +181,14 @@
197181
},
198182
{
199183
"cell_type": "code",
200-
"execution_count": 3,
184+
"execution_count": 2,
201185
"id": "04138f5a",
202186
"metadata": {
203187
"execution": {
204-
"iopub.execute_input": "2026-04-23T21:32:20.774600Z",
205-
"iopub.status.busy": "2026-04-23T21:32:20.774600Z",
206-
"iopub.status.idle": "2026-04-23T21:32:20.907085Z",
207-
"shell.execute_reply": "2026-04-23T21:32:20.907085Z"
188+
"iopub.execute_input": "2026-04-23T21:45:13.817861Z",
189+
"iopub.status.busy": "2026-04-23T21:45:13.816862Z",
190+
"iopub.status.idle": "2026-04-23T21:45:13.941544Z",
191+
"shell.execute_reply": "2026-04-23T21:45:13.940732Z"
208192
}
209193
},
210194
"outputs": [
@@ -271,14 +255,14 @@
271255
},
272256
{
273257
"cell_type": "code",
274-
"execution_count": 4,
258+
"execution_count": 3,
275259
"id": "68d30485",
276260
"metadata": {
277261
"execution": {
278-
"iopub.execute_input": "2026-04-23T21:32:20.907085Z",
279-
"iopub.status.busy": "2026-04-23T21:32:20.907085Z",
280-
"iopub.status.idle": "2026-04-23T21:32:20.915658Z",
281-
"shell.execute_reply": "2026-04-23T21:32:20.915658Z"
262+
"iopub.execute_input": "2026-04-23T21:45:13.943605Z",
263+
"iopub.status.busy": "2026-04-23T21:45:13.943605Z",
264+
"iopub.status.idle": "2026-04-23T21:45:13.951140Z",
265+
"shell.execute_reply": "2026-04-23T21:45:13.951140Z"
282266
}
283267
},
284268
"outputs": [
@@ -332,14 +316,14 @@
332316
},
333317
{
334318
"cell_type": "code",
335-
"execution_count": 5,
319+
"execution_count": 4,
336320
"id": "e8aca3ab",
337321
"metadata": {
338322
"execution": {
339-
"iopub.execute_input": "2026-04-23T21:32:20.915658Z",
340-
"iopub.status.busy": "2026-04-23T21:32:20.915658Z",
341-
"iopub.status.idle": "2026-04-23T21:32:20.922556Z",
342-
"shell.execute_reply": "2026-04-23T21:32:20.922556Z"
323+
"iopub.execute_input": "2026-04-23T21:45:13.953395Z",
324+
"iopub.status.busy": "2026-04-23T21:45:13.953395Z",
325+
"iopub.status.idle": "2026-04-23T21:45:13.959375Z",
326+
"shell.execute_reply": "2026-04-23T21:45:13.959375Z"
343327
}
344328
},
345329
"outputs": [
@@ -410,14 +394,14 @@
410394
},
411395
{
412396
"cell_type": "code",
413-
"execution_count": 6,
397+
"execution_count": 5,
414398
"id": "165d8ce2",
415399
"metadata": {
416400
"execution": {
417-
"iopub.execute_input": "2026-04-23T21:32:20.922556Z",
418-
"iopub.status.busy": "2026-04-23T21:32:20.922556Z",
419-
"iopub.status.idle": "2026-04-23T21:32:29.496509Z",
420-
"shell.execute_reply": "2026-04-23T21:32:29.496509Z"
401+
"iopub.execute_input": "2026-04-23T21:45:13.961533Z",
402+
"iopub.status.busy": "2026-04-23T21:45:13.961533Z",
403+
"iopub.status.idle": "2026-04-23T21:45:21.942582Z",
404+
"shell.execute_reply": "2026-04-23T21:45:21.942582Z"
421405
}
422406
},
423407
"outputs": [
@@ -473,14 +457,14 @@
473457
},
474458
{
475459
"cell_type": "code",
476-
"execution_count": 7,
460+
"execution_count": 6,
477461
"id": "59d808ac",
478462
"metadata": {
479463
"execution": {
480-
"iopub.execute_input": "2026-04-23T21:32:29.496509Z",
481-
"iopub.status.busy": "2026-04-23T21:32:29.496509Z",
482-
"iopub.status.idle": "2026-04-23T21:32:29.801456Z",
483-
"shell.execute_reply": "2026-04-23T21:32:29.801456Z"
464+
"iopub.execute_input": "2026-04-23T21:45:21.944590Z",
465+
"iopub.status.busy": "2026-04-23T21:45:21.944590Z",
466+
"iopub.status.idle": "2026-04-23T21:45:22.222853Z",
467+
"shell.execute_reply": "2026-04-23T21:45:22.222300Z"
484468
}
485469
},
486470
"outputs": [
@@ -539,14 +523,14 @@
539523
},
540524
{
541525
"cell_type": "code",
542-
"execution_count": 8,
526+
"execution_count": 7,
543527
"id": "8b653f22",
544528
"metadata": {
545529
"execution": {
546-
"iopub.execute_input": "2026-04-23T21:32:29.801456Z",
547-
"iopub.status.busy": "2026-04-23T21:32:29.801456Z",
548-
"iopub.status.idle": "2026-04-23T21:32:29.814695Z",
549-
"shell.execute_reply": "2026-04-23T21:32:29.814695Z"
530+
"iopub.execute_input": "2026-04-23T21:45:22.222853Z",
531+
"iopub.status.busy": "2026-04-23T21:45:22.222853Z",
532+
"iopub.status.idle": "2026-04-23T21:45:22.234906Z",
533+
"shell.execute_reply": "2026-04-23T21:45:22.234906Z"
550534
}
551535
},
552536
"outputs": [
@@ -678,14 +662,14 @@
678662
},
679663
{
680664
"cell_type": "code",
681-
"execution_count": 9,
665+
"execution_count": 8,
682666
"id": "eb20ce0a",
683667
"metadata": {
684668
"execution": {
685-
"iopub.execute_input": "2026-04-23T21:32:29.814695Z",
686-
"iopub.status.busy": "2026-04-23T21:32:29.814695Z",
687-
"iopub.status.idle": "2026-04-23T21:32:36.457469Z",
688-
"shell.execute_reply": "2026-04-23T21:32:36.457469Z"
669+
"iopub.execute_input": "2026-04-23T21:45:22.236920Z",
670+
"iopub.status.busy": "2026-04-23T21:45:22.235921Z",
671+
"iopub.status.idle": "2026-04-23T21:45:30.275146Z",
672+
"shell.execute_reply": "2026-04-23T21:45:30.274315Z"
689673
}
690674
},
691675
"outputs": [
@@ -743,14 +727,14 @@
743727
},
744728
{
745729
"cell_type": "code",
746-
"execution_count": 10,
730+
"execution_count": 9,
747731
"id": "2a1a8d09",
748732
"metadata": {
749733
"execution": {
750-
"iopub.execute_input": "2026-04-23T21:32:36.457469Z",
751-
"iopub.status.busy": "2026-04-23T21:32:36.457469Z",
752-
"iopub.status.idle": "2026-04-23T21:32:36.956715Z",
753-
"shell.execute_reply": "2026-04-23T21:32:36.956715Z"
734+
"iopub.execute_input": "2026-04-23T21:45:30.277156Z",
735+
"iopub.status.busy": "2026-04-23T21:45:30.277156Z",
736+
"iopub.status.idle": "2026-04-23T21:45:30.928527Z",
737+
"shell.execute_reply": "2026-04-23T21:45:30.928527Z"
754738
}
755739
},
756740
"outputs": [
@@ -933,14 +917,14 @@
933917
},
934918
{
935919
"cell_type": "code",
936-
"execution_count": 11,
920+
"execution_count": 10,
937921
"id": "066f0505",
938922
"metadata": {
939923
"execution": {
940-
"iopub.execute_input": "2026-04-23T21:32:36.956715Z",
941-
"iopub.status.busy": "2026-04-23T21:32:36.956715Z",
942-
"iopub.status.idle": "2026-04-23T21:32:37.275812Z",
943-
"shell.execute_reply": "2026-04-23T21:32:37.275812Z"
924+
"iopub.execute_input": "2026-04-23T21:45:30.931813Z",
925+
"iopub.status.busy": "2026-04-23T21:45:30.930546Z",
926+
"iopub.status.idle": "2026-04-23T21:45:31.409877Z",
927+
"shell.execute_reply": "2026-04-23T21:45:31.409877Z"
944928
}
945929
},
946930
"outputs": [

0 commit comments

Comments
 (0)