|
109 | 109 | "id": "046fb0a3", |
110 | 110 | "metadata": { |
111 | 111 | "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" |
116 | 116 | } |
117 | 117 | }, |
118 | 118 | "outputs": [ |
|
149 | 149 | ] |
150 | 150 | }, |
151 | 151 | { |
152 | | - "cell_type": "code", |
153 | | - "execution_count": 2, |
| 152 | + "cell_type": "markdown", |
| 153 | + "execution_count": null, |
154 | 154 | "id": "8f4b903e", |
155 | 155 | "metadata": { |
156 | 156 | "execution": { |
|
160 | 160 | "shell.execute_reply": "2026-04-23T21:32:20.774600Z" |
161 | 161 | } |
162 | 162 | }, |
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": [], |
175 | 164 | "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." |
182 | 166 | ] |
183 | 167 | }, |
184 | 168 | { |
|
197 | 181 | }, |
198 | 182 | { |
199 | 183 | "cell_type": "code", |
200 | | - "execution_count": 3, |
| 184 | + "execution_count": 2, |
201 | 185 | "id": "04138f5a", |
202 | 186 | "metadata": { |
203 | 187 | "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" |
208 | 192 | } |
209 | 193 | }, |
210 | 194 | "outputs": [ |
|
271 | 255 | }, |
272 | 256 | { |
273 | 257 | "cell_type": "code", |
274 | | - "execution_count": 4, |
| 258 | + "execution_count": 3, |
275 | 259 | "id": "68d30485", |
276 | 260 | "metadata": { |
277 | 261 | "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" |
282 | 266 | } |
283 | 267 | }, |
284 | 268 | "outputs": [ |
|
332 | 316 | }, |
333 | 317 | { |
334 | 318 | "cell_type": "code", |
335 | | - "execution_count": 5, |
| 319 | + "execution_count": 4, |
336 | 320 | "id": "e8aca3ab", |
337 | 321 | "metadata": { |
338 | 322 | "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" |
343 | 327 | } |
344 | 328 | }, |
345 | 329 | "outputs": [ |
|
410 | 394 | }, |
411 | 395 | { |
412 | 396 | "cell_type": "code", |
413 | | - "execution_count": 6, |
| 397 | + "execution_count": 5, |
414 | 398 | "id": "165d8ce2", |
415 | 399 | "metadata": { |
416 | 400 | "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" |
421 | 405 | } |
422 | 406 | }, |
423 | 407 | "outputs": [ |
|
473 | 457 | }, |
474 | 458 | { |
475 | 459 | "cell_type": "code", |
476 | | - "execution_count": 7, |
| 460 | + "execution_count": 6, |
477 | 461 | "id": "59d808ac", |
478 | 462 | "metadata": { |
479 | 463 | "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" |
484 | 468 | } |
485 | 469 | }, |
486 | 470 | "outputs": [ |
|
539 | 523 | }, |
540 | 524 | { |
541 | 525 | "cell_type": "code", |
542 | | - "execution_count": 8, |
| 526 | + "execution_count": 7, |
543 | 527 | "id": "8b653f22", |
544 | 528 | "metadata": { |
545 | 529 | "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" |
550 | 534 | } |
551 | 535 | }, |
552 | 536 | "outputs": [ |
|
678 | 662 | }, |
679 | 663 | { |
680 | 664 | "cell_type": "code", |
681 | | - "execution_count": 9, |
| 665 | + "execution_count": 8, |
682 | 666 | "id": "eb20ce0a", |
683 | 667 | "metadata": { |
684 | 668 | "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" |
689 | 673 | } |
690 | 674 | }, |
691 | 675 | "outputs": [ |
|
743 | 727 | }, |
744 | 728 | { |
745 | 729 | "cell_type": "code", |
746 | | - "execution_count": 10, |
| 730 | + "execution_count": 9, |
747 | 731 | "id": "2a1a8d09", |
748 | 732 | "metadata": { |
749 | 733 | "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" |
754 | 738 | } |
755 | 739 | }, |
756 | 740 | "outputs": [ |
|
933 | 917 | }, |
934 | 918 | { |
935 | 919 | "cell_type": "code", |
936 | | - "execution_count": 11, |
| 920 | + "execution_count": 10, |
937 | 921 | "id": "066f0505", |
938 | 922 | "metadata": { |
939 | 923 | "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" |
944 | 928 | } |
945 | 929 | }, |
946 | 930 | "outputs": [ |
|
0 commit comments