Skip to content

Commit

Permalink
Run core notebooks locally
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Jun 25, 2024
1 parent 5e61495 commit b7e3d40
Show file tree
Hide file tree
Showing 6 changed files with 1,291 additions and 1,812 deletions.
136 changes: 61 additions & 75 deletions docs/source/learn/core_notebooks/GLM_linear.ipynb

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions docs/source/learn/core_notebooks/dimensionality.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -499,12 +499,12 @@
"output_type": "stream",
"text": [
"shape mismatch: objects cannot be broadcast to a single shape. Mismatch is between arg 0 with shape (3, 4) and arg 1 with shape (1, 3).\n",
"Apply node that caused the error: normal_rv{\"(),()->()\"}(RNG(<Generator(PCG64) at 0x7F9A2DA91000>), [3 4], [[0 1 2]], [[1]])\n",
"Apply node that caused the error: normal_rv{\"(),()->()\"}(RNG(<Generator(PCG64) at 0x7FB323BFA0A0>), [3 4], [[0 1 2]], [[1]])\n",
"Toposort index: 0\n",
"Inputs types: [RandomGeneratorType, TensorType(int64, shape=(2,)), TensorType(int64, shape=(1, 3)), TensorType(int8, shape=(1, 1))]\n",
"Inputs shapes: ['No shapes', (2,), (1, 3), (1, 1)]\n",
"Inputs strides: ['No strides', (8,), (24, 8), (1, 1)]\n",
"Inputs values: [Generator(PCG64) at 0x7F9A2DA91000, array([3, 4]), array([[0, 1, 2]]), array([[1]], dtype=int8)]\n",
"Inputs values: [Generator(PCG64) at 0x7FB323BFA0A0, array([3, 4]), array([[0, 1, 2]]), array([[1]], dtype=int8)]\n",
"Outputs clients: [['output'], ['output']]\n",
"\n",
"HINT: Re-running with most PyTensor optimizations disabled could provide a back-trace showing when this node was created. This can be done by setting the PyTensor flag 'optimizer=fast_compile'. If that does not work, PyTensor optimizations can be disabled with 'optimizer=None'.\n",
Expand Down Expand Up @@ -1249,12 +1249,12 @@
"output_type": "stream",
"text": [
"operands could not be broadcast together with remapped shapes [original->remapped]: (1,2) and requested shape (2,4)\n",
"Apply node that caused the error: multinomial_rv{\"(),(p)->(p)\"}(RNG(<Generator(PCG64) at 0x7F9A2DA91C40>), [2 4], [[ 5 10]], [[[0.1 0.3 0.6]]])\n",
"Apply node that caused the error: multinomial_rv{\"(),(p)->(p)\"}(RNG(<Generator(PCG64) at 0x7FB323BF9460>), [2 4], [[ 5 10]], [[[0.1 0.3 0.6]]])\n",
"Toposort index: 0\n",
"Inputs types: [RandomGeneratorType, TensorType(int64, shape=(2,)), TensorType(int64, shape=(1, 2)), TensorType(float64, shape=(1, 1, 3))]\n",
"Inputs shapes: ['No shapes', (2,), (1, 2), (1, 1, 3)]\n",
"Inputs strides: ['No strides', (8,), (16, 8), (24, 24, 8)]\n",
"Inputs values: [Generator(PCG64) at 0x7F9A2DA91C40, array([2, 4]), array([[ 5, 10]]), array([[[0.1, 0.3, 0.6]]])]\n",
"Inputs values: [Generator(PCG64) at 0x7FB323BF9460, array([2, 4]), array([[ 5, 10]]), array([[[0.1, 0.3, 0.6]]])]\n",
"Outputs clients: [['output'], ['output']]\n",
"\n",
"HINT: Re-running with most PyTensor optimizations disabled could provide a back-trace showing when this node was created. This can be done by setting the PyTensor flag 'optimizer=fast_compile'. If that does not work, PyTensor optimizations can be disabled with 'optimizer=None'.\n",
Expand Down Expand Up @@ -1355,24 +1355,24 @@
"<path fill=\"none\" stroke=\"black\" d=\"M20,-8C20,-8 110,-8 110,-8 116,-8 122,-14 122,-20 122,-20 122,-242.25 122,-242.25 122,-248.25 116,-254.25 110,-254.25 110,-254.25 20,-254.25 20,-254.25 14,-254.25 8,-248.25 8,-242.25 8,-242.25 8,-20 8,-20 8,-14 14,-8 20,-8\"/>\n",
"<text text-anchor=\"middle\" x=\"109.5\" y=\"-15.95\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
"</g>\n",
"<!-- x -->\n",
"<g id=\"node1\" class=\"node\">\n",
"<title>x</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"65\" cy=\"-204\" rx=\"48.97\" ry=\"42.25\"/>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-216.57\" font-family=\"Times,serif\" font-size=\"14.00\">x</text>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-199.32\" font-family=\"Times,serif\" font-size=\"14.00\">~</text>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-182.07\" font-family=\"Times,serif\" font-size=\"14.00\">Normal</text>\n",
"</g>\n",
"<!-- y -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<g id=\"node1\" class=\"node\">\n",
"<title>y</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"65\" cy=\"-83.5\" rx=\"48.97\" ry=\"42.25\"/>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-96.07\" font-family=\"Times,serif\" font-size=\"14.00\">y</text>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-78.82\" font-family=\"Times,serif\" font-size=\"14.00\">~</text>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-61.57\" font-family=\"Times,serif\" font-size=\"14.00\">Normal</text>\n",
"</g>\n",
"<!-- x -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>x</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"65\" cy=\"-204\" rx=\"48.97\" ry=\"42.25\"/>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-216.57\" font-family=\"Times,serif\" font-size=\"14.00\">x</text>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-199.32\" font-family=\"Times,serif\" font-size=\"14.00\">~</text>\n",
"<text text-anchor=\"middle\" x=\"65\" y=\"-182.07\" font-family=\"Times,serif\" font-size=\"14.00\">Normal</text>\n",
"</g>\n",
"<!-- x&#45;&gt;y -->\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<title>x&#45;&gt;y</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M65,-161.55C65,-153.75 65,-145.49 65,-137.4\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"68.5,-137.64 65,-127.64 61.5,-137.64 68.5,-137.64\"/>\n",
Expand All @@ -1386,7 +1386,7 @@
"<text text-anchor=\"middle\" x=\"202\" y=\"-182.07\" font-family=\"Times,serif\" font-size=\"14.00\">HalfNormal</text>\n",
"</g>\n",
"<!-- sigma&#45;&gt;y -->\n",
"<g id=\"edge2\" class=\"edge\">\n",
"<g id=\"edge1\" class=\"edge\">\n",
"<title>sigma&#45;&gt;y</title>\n",
"<path fill=\"none\" stroke=\"black\" d=\"M162.37,-168.72C145.12,-153.8 124.88,-136.3 107.34,-121.12\"/>\n",
"<polygon fill=\"black\" stroke=\"black\" points=\"109.96,-118.76 100.11,-114.87 105.39,-124.06 109.96,-118.76\"/>\n",
Expand All @@ -1395,7 +1395,7 @@
"</svg>\n"
],
"text/plain": [
"<graphviz.graphs.Digraph at 0x7f9a34337110>"
"<graphviz.graphs.Digraph at 0x7fb330ad16d0>"
]
},
"execution_count": 38,
Expand Down Expand Up @@ -1480,7 +1480,7 @@
"</svg>\n"
],
"text/plain": [
"<graphviz.graphs.Digraph at 0x7f9a255cb590>"
"<graphviz.graphs.Digraph at 0x7fb323bd5210>"
]
},
"execution_count": 39,
Expand Down Expand Up @@ -1554,7 +1554,7 @@
"</svg>\n"
],
"text/plain": [
"<graphviz.graphs.Digraph at 0x7f9a34342950>"
"<graphviz.graphs.Digraph at 0x7fb31b9632d0>"
]
},
"execution_count": 40,
Expand Down Expand Up @@ -1619,7 +1619,7 @@
"</svg>\n"
],
"text/plain": [
"<graphviz.graphs.Digraph at 0x7f9a2d972410>"
"<graphviz.graphs.Digraph at 0x7fb323b63890>"
]
},
"execution_count": 41,
Expand Down Expand Up @@ -1697,27 +1697,27 @@
"<text text-anchor=\"middle\" x=\"81\" y=\"-78.82\" font-family=\"Times,serif\" font-size=\"14.00\">~</text>\n",
"<text text-anchor=\"middle\" x=\"81\" y=\"-61.57\" font-family=\"Times,serif\" font-size=\"14.00\">MvNormal</text>\n",
"</g>\n",
"<!-- matrix (explicit) -->\n",
"<!-- matrix (implicit) -->\n",
"<g id=\"node2\" class=\"node\">\n",
"<title>matrix (explicit)</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"468\" cy=\"-83.5\" rx=\"92.45\" ry=\"42.25\"/>\n",
"<text text-anchor=\"middle\" x=\"468\" y=\"-96.07\" font-family=\"Times,serif\" font-size=\"14.00\">matrix (explicit)</text>\n",
"<text text-anchor=\"middle\" x=\"468\" y=\"-78.82\" font-family=\"Times,serif\" font-size=\"14.00\">~</text>\n",
"<text text-anchor=\"middle\" x=\"468\" y=\"-61.57\" font-family=\"Times,serif\" font-size=\"14.00\">MvNormal</text>\n",
"<title>matrix (implicit)</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"466\" cy=\"-83.5\" rx=\"93.51\" ry=\"42.25\"/>\n",
"<text text-anchor=\"middle\" x=\"466\" y=\"-96.07\" font-family=\"Times,serif\" font-size=\"14.00\">matrix (implicit)</text>\n",
"<text text-anchor=\"middle\" x=\"466\" y=\"-78.82\" font-family=\"Times,serif\" font-size=\"14.00\">~</text>\n",
"<text text-anchor=\"middle\" x=\"466\" y=\"-61.57\" font-family=\"Times,serif\" font-size=\"14.00\">MvNormal</text>\n",
"</g>\n",
"<!-- matrix (implicit) -->\n",
"<!-- matrix (explicit) -->\n",
"<g id=\"node3\" class=\"node\">\n",
"<title>matrix (implicit)</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"264\" cy=\"-83.5\" rx=\"93.51\" ry=\"42.25\"/>\n",
"<text text-anchor=\"middle\" x=\"264\" y=\"-96.07\" font-family=\"Times,serif\" font-size=\"14.00\">matrix (implicit)</text>\n",
"<text text-anchor=\"middle\" x=\"264\" y=\"-78.82\" font-family=\"Times,serif\" font-size=\"14.00\">~</text>\n",
"<text text-anchor=\"middle\" x=\"264\" y=\"-61.57\" font-family=\"Times,serif\" font-size=\"14.00\">MvNormal</text>\n",
"<title>matrix (explicit)</title>\n",
"<ellipse fill=\"none\" stroke=\"black\" cx=\"262\" cy=\"-83.5\" rx=\"92.45\" ry=\"42.25\"/>\n",
"<text text-anchor=\"middle\" x=\"262\" y=\"-96.07\" font-family=\"Times,serif\" font-size=\"14.00\">matrix (explicit)</text>\n",
"<text text-anchor=\"middle\" x=\"262\" y=\"-78.82\" font-family=\"Times,serif\" font-size=\"14.00\">~</text>\n",
"<text text-anchor=\"middle\" x=\"262\" y=\"-61.57\" font-family=\"Times,serif\" font-size=\"14.00\">MvNormal</text>\n",
"</g>\n",
"</g>\n",
"</svg>\n"
],
"text/plain": [
"<graphviz.graphs.Digraph at 0x7f9a2d969550>"
"<graphviz.graphs.Digraph at 0x7fb31b894210>"
]
},
"execution_count": 42,
Expand Down Expand Up @@ -1788,16 +1788,16 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Last updated: Wed Jun 19 2024\n",
"Last updated: Tue Jun 25 2024\n",
"\n",
"Python implementation: CPython\n",
"Python version : 3.11.8\n",
"IPython version : 8.22.2\n",
"\n",
"pytensor: 2.20.0+3.g66439d283.dirty\n",
"\n",
"numpy : 1.26.4\n",
"pymc : 5.15.0+1.g58927d608\n",
"numpy : 1.26.4\n",
"pytensor: 2.20.0+3.g66439d283.dirty\n",
"\n",
"Watermark: 2.4.3\n",
Expand Down
294 changes: 120 additions & 174 deletions docs/source/learn/core_notebooks/model_comparison.ipynb

Large diffs are not rendered by default.

1,483 changes: 530 additions & 953 deletions docs/source/learn/core_notebooks/posterior_predictive.ipynb

Large diffs are not rendered by default.

988 changes: 479 additions & 509 deletions docs/source/learn/core_notebooks/pymc_overview.ipynb

Large diffs are not rendered by default.

134 changes: 67 additions & 67 deletions docs/source/learn/core_notebooks/pymc_pytensor.ipynb

Large diffs are not rendered by default.

0 comments on commit b7e3d40

Please sign in to comment.