1 |
commit: 61c25a3e98e73fed146874d62db5809e770a3669 |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 29 09:39:28 2023 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 09:41:23 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61c25a3e |
7 |
|
8 |
dev-python/aesara: add 2.8.10 |
9 |
|
10 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
11 |
|
12 |
dev-python/aesara/Manifest | 1 + |
13 |
dev-python/aesara/aesara-2.8.10.ebuild | 122 +++++++++++++++++++++ |
14 |
.../aesara/files/aesara-2.8.10-fix-tuple.patch | 19 ++++ |
15 |
3 files changed, 142 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/aesara/Manifest b/dev-python/aesara/Manifest |
18 |
index 48291baf84e1..74ef92d59b9f 100644 |
19 |
--- a/dev-python/aesara/Manifest |
20 |
+++ b/dev-python/aesara/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
+DIST aesara-rel-2.8.10.gh.tar.gz 4342183 BLAKE2B 3e6dcb362d613ce9fb621408d3d7c6f6d3f30e52fe39f484fbe6c9d834d59b428e736b13275d99b204774c719cc532fc42e877685b0639b344fa5b2965dfe602 SHA512 360419a79eb0571d431bb146e5fcf2d63a9c8b40e3ee0a31d7d38aeeceaa47da10ab3f640a4b4011f0a9b28438f20a0feb3ea64d07289d0e9513cb32d066820b |
23 |
DIST aesara-rel-2.8.9.gh.tar.gz 4351952 BLAKE2B ffdc3d33caba5cf5edd3dd15e62cd295dd23f944ac6d76461e9e43717a4126669391dadfee51c6117911dc4236e8787d3e9ab712a0fcbd1dcb137e64f9f994c4 SHA512 3fb4374899ab71366961a07c750f594505467cdab01b6851b36d1dd924b816117ebe488a6cae548650df393c8447de69e21ce2cf6eafe34e951b98f27c3a4f6c |
24 |
|
25 |
diff --git a/dev-python/aesara/aesara-2.8.10.ebuild b/dev-python/aesara/aesara-2.8.10.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..4b8039b62529 |
28 |
--- /dev/null |
29 |
+++ b/dev-python/aesara/aesara-2.8.10.ebuild |
30 |
@@ -0,0 +1,122 @@ |
31 |
+# Copyright 2021-2023 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+DISTUTILS_USE_PEP517=setuptools |
37 |
+# A whole bunch of test failures with 3.11 |
38 |
+PYTHON_COMPAT=( python3_{9..10} ) |
39 |
+ |
40 |
+inherit distutils-r1 multiprocessing optfeature |
41 |
+ |
42 |
+MY_P=aesara-rel-${PV} |
43 |
+DESCRIPTION="Library for operating on mathematical expressions with multi-dimensional arrays" |
44 |
+HOMEPAGE=" |
45 |
+ https://github.com/aesara-devs/aesara/ |
46 |
+ https://pypi.org/project/aesara/ |
47 |
+" |
48 |
+SRC_URI=" |
49 |
+ https://github.com/aesara-devs/aesara/archive/rel-${PV}.tar.gz |
50 |
+ -> ${MY_P}.gh.tar.gz |
51 |
+" |
52 |
+S=${WORKDIR}/${MY_P} |
53 |
+ |
54 |
+LICENSE="BSD" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" |
57 |
+ |
58 |
+RDEPEND=" |
59 |
+ dev-python/cons[${PYTHON_USEDEP}] |
60 |
+ dev-python/etuples[${PYTHON_USEDEP}] |
61 |
+ dev-python/logical-unification[${PYTHON_USEDEP}] |
62 |
+ dev-python/minikanren[${PYTHON_USEDEP}] |
63 |
+ dev-python/filelock[${PYTHON_USEDEP}] |
64 |
+ dev-python/numpy[${PYTHON_USEDEP}] |
65 |
+ dev-python/scipy[${PYTHON_USEDEP}] |
66 |
+ dev-python/typing-extensions[${PYTHON_USEDEP}] |
67 |
+" |
68 |
+BDEPEND=" |
69 |
+ dev-vcs/git |
70 |
+ dev-python/setuptools_scm[${PYTHON_USEDEP}] |
71 |
+ test? ( |
72 |
+ dev-python/pytest-xdist[${PYTHON_USEDEP}] |
73 |
+ ) |
74 |
+" |
75 |
+ |
76 |
+PATCHES=( |
77 |
+ "${FILESDIR}"/aesara-2.6.5-compiledir-tid.patch |
78 |
+ "${FILESDIR}"/aesara-2.8.10-fix-tuple.patch |
79 |
+) |
80 |
+ |
81 |
+distutils_enable_sphinx doc 'dev-python/sphinx_rtd_theme' |
82 |
+distutils_enable_tests pytest |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ # do not claim "bin" package (sic!) |
86 |
+ rm bin/__init__.py || die |
87 |
+ # setuptools_scm wants to read PV from git |
88 |
+ touch setup.cfg || die |
89 |
+ git init -q || die |
90 |
+ git config --global user.email "larry@g.o" || die |
91 |
+ git config --global user.name "Larry the Cow" || die |
92 |
+ git add . || die |
93 |
+ git commit -qm "init" || die |
94 |
+ git tag -a "rel-${PV}" -m "rel-${PV}" || die |
95 |
+ distutils-r1_src_prepare |
96 |
+} |
97 |
+ |
98 |
+python_test() { |
99 |
+ local EPYTEST_DESELECT=( |
100 |
+ # speed tests are unreliable |
101 |
+ tests/scan/test_basic.py::test_speed |
102 |
+ tests/scan/test_basic.py::test_speed_rnn |
103 |
+ tests/scan/test_basic.py::test_speed_batchrnn |
104 |
+ tests/link/test_vm.py::test_speed |
105 |
+ tests/link/test_vm.py::test_speed_lazy |
106 |
+ tests/tensor/test_gc.py::test_merge_opt_runtime |
107 |
+ |
108 |
+ # rounding problem? |
109 |
+ # https://github.com/aesara-devs/aesara/issues/477 |
110 |
+ tests/tensor/test_math_scipy.py::TestGammaUBroadcast::test_good |
111 |
+ tests/tensor/test_math_scipy.py::TestGammaUInplaceBroadcast::test_good |
112 |
+ |
113 |
+ # Deprecation warning causes unexpected additional output |
114 |
+ tests/tensor/test_basic.py::TestLongTensor::test_fit_int64 |
115 |
+ |
116 |
+ # dunno |
117 |
+ tests/tensor/test_elemwise.py::TestDimShuffle::test_memory_leak |
118 |
+ tests/tensor/signal/test_pool.py::TestDownsampleFactorMax::test_DownsampleFactorMaxGradGrad_grad |
119 |
+ |
120 |
+ # TODO |
121 |
+ tests/link/c/test_op.py::test_ExternalCOp_c_code_cache_version |
122 |
+ tests/sparse/sandbox/test_sp.py::TestSP::test_multilayer_conv |
123 |
+ tests/sparse/sandbox/test_sp.py::TestSP::test_maxpool |
124 |
+ |
125 |
+ # TODO: Package pytest-benchmark |
126 |
+ tests/scan/test_basic.py::TestExamples::test_reordering |
127 |
+ tests/scan/test_basic.py::TestExamples::test_scan_as_tensor_on_gradients |
128 |
+ tests/scan/test_basic.py::TestExamples::test_multiple_outs_taps |
129 |
+ tests/scan/test_rewriting.py::TestPushOutAddScan::test_pregreedy_optimizer |
130 |
+ tests/scan/test_rewriting.py::TestSaveMem::test_savemem_opt |
131 |
+ tests/scan/test_basic.py::test_cython_performance |
132 |
+ ) |
133 |
+ local EPYTEST_IGNORE=( |
134 |
+ # we do not package jax or numba |
135 |
+ tests/link/jax |
136 |
+ tests/link/numba |
137 |
+ ) |
138 |
+ |
139 |
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 |
140 |
+ local -x AESARA_FLAGS="cxx=${CXX}" |
141 |
+ AESARA_FLAGS+=",config.gcc__cxxflags=\"${CXXFLAGS}\"" |
142 |
+ AESARA_FLAGS+=',compiledir_format="compiledir_%(thread_id)s"' |
143 |
+ |
144 |
+ epytest -p xdist.plugin -n "$(makeopts_jobs)" |
145 |
+ # clean up the compiledir, as it can grow pretty large |
146 |
+ rm -r "${HOME}"/.aesara || die |
147 |
+} |
148 |
+ |
149 |
+pkg_postinst() { |
150 |
+ optfeature "GPU code generation/execution on NVIDIA gpus" dev-util/nvidia-cuda-toolkit |
151 |
+ optfeature "GPU/CPU code generation on CUDA and OpenCL devices" dev-libs/libgpuarray dev-python/pycuda |
152 |
+} |
153 |
|
154 |
diff --git a/dev-python/aesara/files/aesara-2.8.10-fix-tuple.patch b/dev-python/aesara/files/aesara-2.8.10-fix-tuple.patch |
155 |
new file mode 100644 |
156 |
index 000000000000..7eb537d54286 |
157 |
--- /dev/null |
158 |
+++ b/dev-python/aesara/files/aesara-2.8.10-fix-tuple.patch |
159 |
@@ -0,0 +1,19 @@ |
160 |
+diff --git a/aesara/tensor/nnet/corr.py b/aesara/tensor/nnet/corr.py |
161 |
+index e89054d..77ed344 100644 |
162 |
+--- a/aesara/tensor/nnet/corr.py |
163 |
++++ b/aesara/tensor/nnet/corr.py |
164 |
+@@ -692,12 +692,12 @@ class CorrMM(BaseCorrMM): |
165 |
+ if kern.type.ndim != 4: |
166 |
+ raise TypeError("kern must be 4D tensor") |
167 |
+ |
168 |
+- out_shape = tuple( |
169 |
++ out_shape = tuple([ |
170 |
+ 1 if img.type.shape[0] == 1 else None, |
171 |
+ 1 if kern.type.shape[0] == 1 else None, |
172 |
+ None, |
173 |
+ None, |
174 |
+- ) |
175 |
++ ]) |
176 |
+ dtype = img.type.dtype |
177 |
+ return Apply(self, [img, kern], [TensorType(dtype, shape=out_shape)()]) |
178 |
+ |