Skip to content

Commit 274959b

Browse files
committed
Rename aesara to pytensor.
1 parent fafe18f commit 274959b

File tree

152 files changed

+469
-19466
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+469
-19466
lines changed

examples/case_studies/GEV.ipynb

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@
4545
"metadata": {},
4646
"outputs": [],
4747
"source": [
48-
"import aesara.tensor as at\n",
4948
"import arviz as az\n",
5049
"import matplotlib.pyplot as plt\n",
5150
"import numpy as np\n",
5251
"import pymc as pm\n",
5352
"import pymc_experimental.distributions as pmx\n",
53+
"import pytensor.tensor as at\n",
5454
"\n",
5555
"from arviz.plots import plot_utils as azpu"
5656
]
@@ -984,7 +984,7 @@
984984
"Python version : 3.10.6\n",
985985
"IPython version : 8.5.0\n",
986986
"\n",
987-
"aesara: 2.8.6\n",
987+
"pytensor: 2.8.6\n",
988988
"arviz : 0.12.1\n",
989989
"\n",
990990
"pymc_experimental: 0.0.1\n",
@@ -993,7 +993,7 @@
993993
"arviz : 0.12.1\n",
994994
"numpy : 1.23.3\n",
995995
"json : 2.0.9\n",
996-
"aesara : 2.8.6\n",
996+
"pytensor : 2.8.6\n",
997997
"pymc : 3.9.3+1493.g372d7c24\n",
998998
"\n",
999999
"Watermark: 2.3.1\n",
@@ -1003,7 +1003,7 @@
10031003
],
10041004
"source": [
10051005
"%load_ext watermark\n",
1006-
"%watermark -n -u -v -iv -w -p aesara,arviz"
1006+
"%watermark -n -u -v -iv -w -p pytensor,arviz"
10071007
]
10081008
},
10091009
{

examples/case_studies/LKJ.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@
987987
"Python version : 3.7.12\n",
988988
"IPython version : 5.5.0\n",
989989
"\n",
990-
"aesara: 2.4.0\n",
990+
"pytensor: 2.4.0\n",
991991
"xarray: 0.18.2\n",
992992
"\n",
993993
"pymc : 4.0.0b2\n",
@@ -1004,7 +1004,7 @@
10041004
],
10051005
"source": [
10061006
"%load_ext watermark\n",
1007-
"%watermark -n -u -v -iv -w -p aesara,xarray"
1007+
"%watermark -n -u -v -iv -w -p pytensor,xarray"
10081008
]
10091009
}
10101010
],

examples/case_studies/bayesian_ab_testing_introduction.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,7 @@
21632163
"Python version : 3.8.10\n",
21642164
"IPython version : 8.4.0\n",
21652165
"\n",
2166-
"aesara: 2.7.3\n",
2166+
"pytensor: 2.7.3\n",
21672167
"xarray: 2022.3.0\n",
21682168
"\n",
21692169
"matplotlib: 3.5.2\n",
@@ -2181,7 +2181,7 @@
21812181
],
21822182
"source": [
21832183
"%load_ext watermark\n",
2184-
"%watermark -n -u -v -iv -w -p aesara,xarray"
2184+
"%watermark -n -u -v -iv -w -p pytensor,xarray"
21852185
]
21862186
},
21872187
{

examples/case_studies/binning.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"We are now in a position to sketch out a generative PyMC model:\n",
7373
"\n",
7474
"```python\n",
75-
"import aesara.tensor as at\n",
75+
"import pytensor.tensor as at\n",
7676
"\n",
7777
"with pm.Model() as model:\n",
7878
" # priors\n",
@@ -120,12 +120,12 @@
120120
"source": [
121121
"import warnings\n",
122122
"\n",
123-
"import aesara.tensor as at\n",
124123
"import arviz as az\n",
125124
"import matplotlib.pyplot as plt\n",
126125
"import numpy as np\n",
127126
"import pandas as pd\n",
128127
"import pymc as pm\n",
128+
"import pytensor.tensor as at\n",
129129
"import seaborn as sns\n",
130130
"\n",
131131
"warnings.filterwarnings(action=\"ignore\", category=UserWarning)"
@@ -3538,7 +3538,7 @@
35383538
"pymc : 4.0.0b6\n",
35393539
"arviz : 0.12.1\n",
35403540
"numpy : 1.22.4\n",
3541-
"aesara : 2.5.1\n",
3541+
"pytensor : 2.5.1\n",
35423542
"\n",
35433543
"Watermark: 2.3.1\n",
35443544
"\n"

examples/case_studies/blackbox_external_likelihood_numpy.ipynb

+55-55
Large diffs are not rendered by default.

examples/case_studies/factor_analysis.ipynb

+12-12
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
}
4444
],
4545
"source": [
46-
"import aesara.tensor as at\n",
4746
"import arviz as az\n",
4847
"import matplotlib\n",
4948
"import numpy as np\n",
5049
"import pymc as pm\n",
50+
"import pytensor.tensor as at\n",
5151
"import scipy as sp\n",
5252
"import seaborn as sns\n",
5353
"import xarray as xr\n",
@@ -205,8 +205,8 @@
205205
"text": [
206206
"Auto-assigning NUTS sampler...\n",
207207
"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",
210210
"Multiprocess sampling (4 chains in 4 jobs)\n",
211211
"NUTS: [W, F, psi]\n"
212212
]
@@ -335,18 +335,18 @@
335335
"metadata": {},
336336
"outputs": [],
337337
"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",
339339
" # like expand_packed_triangular, but with d > k.\n",
340-
" assert mtype in {\"aesara\", \"numpy\"}\n",
340+
" assert mtype in {\"pytensor\", \"numpy\"}\n",
341341
" assert d >= k\n",
342342
"\n",
343343
" def set_(M, i_, v_):\n",
344-
" if mtype == \"aesara\":\n",
344+
" if mtype == \"pytensor\":\n",
345345
" return at.set_subtensor(M[i_], v_)\n",
346346
" M[i_] = v_\n",
347347
" return M\n",
348348
"\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",
350350
" if diag is None:\n",
351351
" idxs = np.tril_indices(d, m=k)\n",
352352
" out = set_(out, idxs, packed)\n",
@@ -401,8 +401,8 @@
401401
"text": [
402402
"Auto-assigning NUTS sampler...\n",
403403
"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",
406406
"Multiprocess sampling (4 chains in 4 jobs)\n",
407407
"NUTS: [W_z, W_b, F, psi]\n"
408408
]
@@ -516,8 +516,8 @@
516516
"name": "stderr",
517517
"output_type": "stream",
518518
"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"
521521
]
522522
},
523523
{
@@ -785,7 +785,7 @@
785785
"pymc : 4.0.0b6\n",
786786
"matplotlib : 3.5.1\n",
787787
"arviz : 0.12.0\n",
788-
"aesara : 2.5.1\n",
788+
"pytensor : 2.5.1\n",
789789
"scipy : 1.8.0\n",
790790
"xarray : 2022.3.0\n",
791791
"seaborn : 0.11.2\n",

examples/case_studies/hierarchical_partial_pooling.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
},
6161
"outputs": [],
6262
"source": [
63-
"import aesara.tensor as at\n",
6463
"import arviz as az\n",
6564
"import matplotlib.pyplot as plt\n",
6665
"import numpy as np\n",
6766
"import pandas as pd\n",
6867
"import pymc as pm\n",
68+
"import pytensor.tensor as at\n",
6969
"\n",
7070
"%matplotlib inline"
7171
]
@@ -599,7 +599,7 @@
599599
"arviz : 0.12.1\n",
600600
"sys : 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:04:59) [GCC 10.3.0]\n",
601601
"pymc : 4.1.2\n",
602-
"aesara : 2.7.5\n",
602+
"pytensor : 2.7.5\n",
603603
"\n",
604604
"Watermark: 2.3.1\n",
605605
"\n"

examples/case_studies/item_response_nba.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@
11551155
"Python version : 3.9.12\n",
11561156
"IPython version : 8.2.0\n",
11571157
"\n",
1158-
"aesara: 2.6.2\n",
1158+
"pytensor: 2.6.2\n",
11591159
"aeppl : 0.0.28\n",
11601160
"xarray: 2022.3.0\n",
11611161
"\n",
@@ -1172,7 +1172,7 @@
11721172
],
11731173
"source": [
11741174
"%load_ext watermark\n",
1175-
"%watermark -n -u -v -iv -w -p aesara,aeppl,xarray"
1175+
"%watermark -n -u -v -iv -w -p pytensor,aeppl,xarray"
11761176
]
11771177
},
11781178
{

examples/case_studies/mediation_analysis.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@
815815
"Python version : 3.9.9\n",
816816
"IPython version : 7.31.0\n",
817817
"\n",
818-
"aesara: 2.3.8\n",
818+
"pytensor: 2.3.8\n",
819819
"aeppl : 0.0.18\n",
820820
"xarray: 0.20.2\n",
821821
"\n",
@@ -832,7 +832,7 @@
832832
],
833833
"source": [
834834
"%load_ext watermark\n",
835-
"%watermark -n -u -v -iv -w -p aesara,aeppl,xarray"
835+
"%watermark -n -u -v -iv -w -p pytensor,aeppl,xarray"
836836
]
837837
},
838838
{

examples/case_studies/moderation_analysis.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@
859859
"Python version : 3.9.9\n",
860860
"IPython version : 7.31.0\n",
861861
"\n",
862-
"aesara: 2.5.1\n",
862+
"pytensor: 2.5.1\n",
863863
"aeppl : 0.0.27\n",
864864
"xarray: 0.20.2\n",
865865
"\n",
@@ -877,7 +877,7 @@
877877
],
878878
"source": [
879879
"%load_ext watermark\n",
880-
"%watermark -n -u -v -iv -w -p aesara,aeppl,xarray"
880+
"%watermark -n -u -v -iv -w -p pytensor,aeppl,xarray"
881881
]
882882
},
883883
{

examples/case_studies/multilevel_modeling.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@
8585
"import os\n",
8686
"import warnings\n",
8787
"\n",
88-
"import aesara.tensor as at\n",
8988
"import arviz as az\n",
9089
"import matplotlib.pyplot as plt\n",
9190
"import numpy as np\n",
9291
"import pandas as pd\n",
9392
"import pymc as pm\n",
93+
"import pytensor.tensor as at\n",
9494
"import seaborn as sns\n",
9595
"import xarray as xr\n",
9696
"\n",
@@ -3958,7 +3958,7 @@
39583958
"pandas : 1.5.2\n",
39593959
"seaborn : 0.12.1\n",
39603960
"numpy : 1.21.6\n",
3961-
"aesara : 2.8.7\n",
3961+
"pytensor : 2.8.7\n",
39623962
"\n",
39633963
"Watermark: 2.3.0\n",
39643964
"\n"

examples/case_studies/probabilistic_matrix_factorization.ipynb

+7-7
Original file line numberDiff line numberDiff line change
@@ -827,12 +827,12 @@
827827
"import logging\n",
828828
"import time\n",
829829
"\n",
830-
"import aesara\n",
830+
"import pytensor\n",
831831
"import scipy as sp\n",
832832
"\n",
833833
"# Enable on-the-fly graph computations, but ignore\n",
834834
"# absence of intermediate test values.\n",
835-
"aesara.config.compute_test_value = \"ignore\"\n",
835+
"pytensor.config.compute_test_value = \"ignore\"\n",
836836
"\n",
837837
"# Set up logging.\n",
838838
"logger = logging.getLogger()\n",
@@ -1360,8 +1360,8 @@
13601360
"INFO:pymc:Auto-assigning NUTS sampler...\n",
13611361
"Initializing NUTS using jitter+adapt_diag...\n",
13621362
"INFO:pymc:Initializing NUTS using jitter+adapt_diag...\n",
1363-
"/Users/severinhatt/miniconda3/envs/pymc-hack/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",
1364-
" aesara_function = aesara.function(\n",
1363+
"/Users/severinhatt/miniconda3/envs/pymc-hack/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",
1364+
" pytensor_function = pytensor.function(\n",
13651365
"Multiprocess sampling (4 chains in 4 jobs)\n",
13661366
"INFO:pymc:Multiprocess sampling (4 chains in 4 jobs)\n",
13671367
"NUTS: [U, V]\n",
@@ -1721,7 +1721,7 @@
17211721
"Python version : 3.9.7\n",
17221722
"IPython version : 8.4.0\n",
17231723
"\n",
1724-
"aesara: 2.5.1\n",
1724+
"pytensor: 2.5.1\n",
17251725
"aeppl : 0.0.27\n",
17261726
"xarray: 2022.3.0\n",
17271727
"\n",
@@ -1731,7 +1731,7 @@
17311731
"scipy : 1.7.3\n",
17321732
"matplotlib: 3.5.2\n",
17331733
"logging : 0.5.1.2\n",
1734-
"aesara : 2.5.1\n",
1734+
"pytensor : 2.5.1\n",
17351735
"numpy : 1.22.4\n",
17361736
"xarray : 2022.3.0\n",
17371737
"\n",
@@ -1742,7 +1742,7 @@
17421742
],
17431743
"source": [
17441744
"%load_ext watermark\n",
1745-
"%watermark -n -u -v -iv -w -p aesara,aeppl,xarray"
1745+
"%watermark -n -u -v -iv -w -p pytensor,aeppl,xarray"
17461746
]
17471747
},
17481748
{

0 commit comments

Comments
 (0)