|
43 | 43 | }
|
44 | 44 | ],
|
45 | 45 | "source": [
|
46 |
| - "import aesara.tensor as at\n", |
47 | 46 | "import arviz as az\n",
|
48 | 47 | "import matplotlib\n",
|
49 | 48 | "import numpy as np\n",
|
50 | 49 | "import pymc as pm\n",
|
| 50 | + "import pytensor.tensor as at\n", |
51 | 51 | "import scipy as sp\n",
|
52 | 52 | "import seaborn as sns\n",
|
53 | 53 | "import xarray as xr\n",
|
|
205 | 205 | "text": [
|
206 | 206 | "Auto-assigning NUTS sampler...\n",
|
207 | 207 | "Initializing NUTS using jitter+adapt_diag...\n",
|
208 |
| - "/home/oriol/miniconda3/envs/arviz/lib/python3.9/site-packages/pymc/aesaraf.py:1005: UserWarning: The parameter 'updates' of aesara.function() expects an OrderedDict, got <class 'dict'>. Using a standard dictionary here results in non-deterministic behavior. You should use an OrderedDict if you are using Python 2.7 (collections.OrderedDict for older python), or use a list of (shared, update) pairs. Do not just convert your dictionary to this type before the call as the conversion will still be non-deterministic.\n", |
209 |
| - " aesara_function = aesara.function(\n", |
| 208 | + "/home/oriol/miniconda3/envs/arviz/lib/python3.9/site-packages/pymc/pytensorf.py:1005: UserWarning: The parameter 'updates' of pytensor.function() expects an OrderedDict, got <class 'dict'>. Using a standard dictionary here results in non-deterministic behavior. You should use an OrderedDict if you are using Python 2.7 (collections.OrderedDict for older python), or use a list of (shared, update) pairs. Do not just convert your dictionary to this type before the call as the conversion will still be non-deterministic.\n", |
| 209 | + " pytensor_function = pytensor.function(\n", |
210 | 210 | "Multiprocess sampling (4 chains in 4 jobs)\n",
|
211 | 211 | "NUTS: [W, F, psi]\n"
|
212 | 212 | ]
|
|
335 | 335 | "metadata": {},
|
336 | 336 | "outputs": [],
|
337 | 337 | "source": [
|
338 |
| - "def expand_packed_block_triangular(d, k, packed, diag=None, mtype=\"aesara\"):\n", |
| 338 | + "def expand_packed_block_triangular(d, k, packed, diag=None, mtype=\"pytensor\"):\n", |
339 | 339 | " # like expand_packed_triangular, but with d > k.\n",
|
340 |
| - " assert mtype in {\"aesara\", \"numpy\"}\n", |
| 340 | + " assert mtype in {\"pytensor\", \"numpy\"}\n", |
341 | 341 | " assert d >= k\n",
|
342 | 342 | "\n",
|
343 | 343 | " def set_(M, i_, v_):\n",
|
344 |
| - " if mtype == \"aesara\":\n", |
| 344 | + " if mtype == \"pytensor\":\n", |
345 | 345 | " return at.set_subtensor(M[i_], v_)\n",
|
346 | 346 | " M[i_] = v_\n",
|
347 | 347 | " return M\n",
|
348 | 348 | "\n",
|
349 |
| - " out = at.zeros((d, k), dtype=float) if mtype == \"aesara\" else np.zeros((d, k), dtype=float)\n", |
| 349 | + " out = at.zeros((d, k), dtype=float) if mtype == \"pytensor\" else np.zeros((d, k), dtype=float)\n", |
350 | 350 | " if diag is None:\n",
|
351 | 351 | " idxs = np.tril_indices(d, m=k)\n",
|
352 | 352 | " out = set_(out, idxs, packed)\n",
|
|
401 | 401 | "text": [
|
402 | 402 | "Auto-assigning NUTS sampler...\n",
|
403 | 403 | "Initializing NUTS using jitter+adapt_diag...\n",
|
404 |
| - "/home/oriol/miniconda3/envs/arviz/lib/python3.9/site-packages/pymc/aesaraf.py:1005: UserWarning: The parameter 'updates' of aesara.function() expects an OrderedDict, got <class 'dict'>. Using a standard dictionary here results in non-deterministic behavior. You should use an OrderedDict if you are using Python 2.7 (collections.OrderedDict for older python), or use a list of (shared, update) pairs. Do not just convert your dictionary to this type before the call as the conversion will still be non-deterministic.\n", |
405 |
| - " aesara_function = aesara.function(\n", |
| 404 | + "/home/oriol/miniconda3/envs/arviz/lib/python3.9/site-packages/pymc/pytensorf.py:1005: UserWarning: The parameter 'updates' of pytensor.function() expects an OrderedDict, got <class 'dict'>. Using a standard dictionary here results in non-deterministic behavior. You should use an OrderedDict if you are using Python 2.7 (collections.OrderedDict for older python), or use a list of (shared, update) pairs. Do not just convert your dictionary to this type before the call as the conversion will still be non-deterministic.\n", |
| 405 | + " pytensor_function = pytensor.function(\n", |
406 | 406 | "Multiprocess sampling (4 chains in 4 jobs)\n",
|
407 | 407 | "NUTS: [W_z, W_b, F, psi]\n"
|
408 | 408 | ]
|
|
516 | 516 | "name": "stderr",
|
517 | 517 | "output_type": "stream",
|
518 | 518 | "text": [
|
519 |
| - "/home/oriol/miniconda3/envs/arviz/lib/python3.9/site-packages/pymc/aesaraf.py:1005: UserWarning: The parameter 'updates' of aesara.function() expects an OrderedDict, got <class 'dict'>. Using a standard dictionary here results in non-deterministic behavior. You should use an OrderedDict if you are using Python 2.7 (collections.OrderedDict for older python), or use a list of (shared, update) pairs. Do not just convert your dictionary to this type before the call as the conversion will still be non-deterministic.\n", |
520 |
| - " aesara_function = aesara.function(\n" |
| 519 | + "/home/oriol/miniconda3/envs/arviz/lib/python3.9/site-packages/pymc/pytensorf.py:1005: UserWarning: The parameter 'updates' of pytensor.function() expects an OrderedDict, got <class 'dict'>. Using a standard dictionary here results in non-deterministic behavior. You should use an OrderedDict if you are using Python 2.7 (collections.OrderedDict for older python), or use a list of (shared, update) pairs. Do not just convert your dictionary to this type before the call as the conversion will still be non-deterministic.\n", |
| 520 | + " pytensor_function = pytensor.function(\n" |
521 | 521 | ]
|
522 | 522 | },
|
523 | 523 | {
|
|
785 | 785 | "pymc : 4.0.0b6\n",
|
786 | 786 | "matplotlib : 3.5.1\n",
|
787 | 787 | "arviz : 0.12.0\n",
|
788 |
| - "aesara : 2.5.1\n", |
| 788 | + "pytensor : 2.5.1\n", |
789 | 789 | "scipy : 1.8.0\n",
|
790 | 790 | "xarray : 2022.3.0\n",
|
791 | 791 | "seaborn : 0.11.2\n",
|
|
0 commit comments