Skip to content

Commit b7819b1

Browse files
🔥 Remove Warnings at beginning of notebooks
1 parent a3cfc1d commit b7819b1

File tree

5 files changed

+366
-337
lines changed

5 files changed

+366
-337
lines changed

examples/diagnostics_and_criticism/Bayes_factor.ipynb

Lines changed: 45 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121
}
2222
],
2323
"source": [
24-
"import warnings\n",
25-
"\n",
2624
"import arviz as az\n",
2725
"import numpy as np\n",
2826
"import pymc3 as pm\n",
@@ -39,16 +37,6 @@
3937
"execution_count": 2,
4038
"metadata": {},
4139
"outputs": [],
42-
"source": [
43-
"warnings.filterwarnings(\"ignore\", category=FutureWarning)\n",
44-
"warnings.filterwarnings(\"ignore\", category=UserWarning)"
45-
]
46-
},
47-
{
48-
"cell_type": "code",
49-
"execution_count": 3,
50-
"metadata": {},
51-
"outputs": [],
5240
"source": [
5341
"az.style.use(\"arviz-darkgrid\")"
5442
]
@@ -198,7 +186,7 @@
198186
},
199187
{
200188
"cell_type": "code",
201-
"execution_count": 4,
189+
"execution_count": 3,
202190
"metadata": {},
203191
"outputs": [],
204192
"source": [
@@ -227,7 +215,7 @@
227215
},
228216
{
229217
"cell_type": "code",
230-
"execution_count": 5,
218+
"execution_count": 4,
231219
"metadata": {},
232220
"outputs": [],
233221
"source": [
@@ -237,7 +225,7 @@
237225
},
238226
{
239227
"cell_type": "code",
240-
"execution_count": 6,
228+
"execution_count": 5,
241229
"metadata": {},
242230
"outputs": [
243231
{
@@ -271,7 +259,7 @@
271259
},
272260
{
273261
"cell_type": "code",
274-
"execution_count": 7,
262+
"execution_count": 6,
275263
"metadata": {},
276264
"outputs": [
277265
{
@@ -305,7 +293,7 @@
305293
},
306294
{
307295
"cell_type": "code",
308-
"execution_count": 8,
296+
"execution_count": 7,
309297
"metadata": {},
310298
"outputs": [
311299
{
@@ -341,7 +329,7 @@
341329
},
342330
{
343331
"cell_type": "code",
344-
"execution_count": 9,
332+
"execution_count": 8,
345333
"metadata": {},
346334
"outputs": [
347335
{
@@ -350,7 +338,7 @@
350338
"array([5., 5.])"
351339
]
352340
},
353-
"execution_count": 9,
341+
"execution_count": 8,
354342
"metadata": {},
355343
"output_type": "execute_result"
356344
}
@@ -375,7 +363,7 @@
375363
},
376364
{
377365
"cell_type": "code",
378-
"execution_count": 10,
366+
"execution_count": 9,
379367
"metadata": {},
380368
"outputs": [
381369
{
@@ -384,7 +372,7 @@
384372
"([2, 2, 2], [2, 2, 2])"
385373
]
386374
},
387-
"execution_count": 10,
375+
"execution_count": 9,
388376
"metadata": {},
389377
"output_type": "execute_result"
390378
}
@@ -406,9 +394,17 @@
406394
},
407395
{
408396
"cell_type": "code",
409-
"execution_count": 11,
397+
"execution_count": 10,
410398
"metadata": {},
411399
"outputs": [
400+
{
401+
"name": "stderr",
402+
"output_type": "stream",
403+
"text": [
404+
"/Users/CloudChaoszero/opt/anaconda3/envs/pymc3-dev-py38/lib/python3.8/site-packages/arviz/data/io_pymc3.py:88: FutureWarning: Using `from_pymc3` without the model will be deprecated in a future release. Not using the model will return less accurate and less useful results. Make sure you use the model argument or call from_pymc3 within a model context.\n",
405+
" warnings.warn(\n"
406+
]
407+
},
412408
{
413409
"data": {
414410
"text/html": [
@@ -453,7 +449,7 @@
453449
"a 0.5 0.05 0.4 0.58"
454450
]
455451
},
456-
"execution_count": 11,
452+
"execution_count": 10,
457453
"metadata": {},
458454
"output_type": "execute_result"
459455
}
@@ -464,9 +460,17 @@
464460
},
465461
{
466462
"cell_type": "code",
467-
"execution_count": 12,
463+
"execution_count": 11,
468464
"metadata": {},
469465
"outputs": [
466+
{
467+
"name": "stderr",
468+
"output_type": "stream",
469+
"text": [
470+
"/Users/CloudChaoszero/opt/anaconda3/envs/pymc3-dev-py38/lib/python3.8/site-packages/arviz/data/io_pymc3.py:88: FutureWarning: Using `from_pymc3` without the model will be deprecated in a future release. Not using the model will return less accurate and less useful results. Make sure you use the model argument or call from_pymc3 within a model context.\n",
471+
" warnings.warn(\n"
472+
]
473+
},
470474
{
471475
"data": {
472476
"text/html": [
@@ -511,7 +515,7 @@
511515
"a 0.5 0.04 0.42 0.57"
512516
]
513517
},
514-
"execution_count": 12,
518+
"execution_count": 11,
515519
"metadata": {},
516520
"output_type": "execute_result"
517521
}
@@ -529,7 +533,7 @@
529533
},
530534
{
531535
"cell_type": "code",
532-
"execution_count": 13,
536+
"execution_count": 12,
533537
"metadata": {},
534538
"outputs": [
535539
{
@@ -538,7 +542,7 @@
538542
"<MultiTrace: 2 chains, 1000 iterations, 2 variables>"
539543
]
540544
},
541-
"execution_count": 13,
545+
"execution_count": 12,
542546
"metadata": {},
543547
"output_type": "execute_result"
544548
}
@@ -549,9 +553,17 @@
549553
},
550554
{
551555
"cell_type": "code",
552-
"execution_count": 14,
556+
"execution_count": 13,
553557
"metadata": {},
554558
"outputs": [
559+
{
560+
"name": "stderr",
561+
"output_type": "stream",
562+
"text": [
563+
"/Users/CloudChaoszero/Documents/Projects-Dev/pymc3/pymc3/sampling.py:1687: UserWarning: samples parameter is smaller than nchains times ndraws, some draws and/or chains may not be represented in the returned posterior predictive sample\n",
564+
" warnings.warn(\n"
565+
]
566+
},
555567
{
556568
"data": {
557569
"text/html": [
@@ -644,23 +656,23 @@
644656
},
645657
{
646658
"cell_type": "code",
647-
"execution_count": 15,
659+
"execution_count": 14,
648660
"metadata": {},
649661
"outputs": [
650662
{
651663
"name": "stdout",
652664
"output_type": "stream",
653665
"text": [
654-
"Last updated: Sat Feb 06 2021\n",
666+
"Last updated: Sun Feb 07 2021\n",
655667
"\n",
656668
"Python implementation: CPython\n",
657669
"Python version : 3.8.6\n",
658670
"IPython version : 7.20.0\n",
659671
"\n",
672+
"matplotlib: None\n",
660673
"numpy : 1.20.0\n",
661674
"pymc3 : 3.11.0\n",
662675
"arviz : 0.11.0\n",
663-
"matplotlib: None\n",
664676
"\n",
665677
"Watermark: 2.1.0\n",
666678
"\n"
@@ -675,9 +687,9 @@
675687
],
676688
"metadata": {
677689
"kernelspec": {
678-
"display_name": "Python 3",
690+
"display_name": "Python PyMC3 (Dev)",
679691
"language": "python",
680-
"name": "python3"
692+
"name": "pymc3-dev-py38"
681693
},
682694
"language_info": {
683695
"codemirror_mode": {

examples/diagnostics_and_criticism/model_comparison.ipynb

Lines changed: 54 additions & 59 deletions
Large diffs are not rendered by default.

examples/diagnostics_and_criticism/posterior_predictive.ipynb

Lines changed: 61 additions & 47 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)