Skip to content

Commit ccc74da

Browse files
committed
switch to aesara; formatting
1 parent c787e5a commit ccc74da

File tree

4 files changed

+345
-227
lines changed

4 files changed

+345
-227
lines changed

README.md

+17-19
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ inequality constraints, {ci}. PYIPM uses a line search interior-point
1212
method to search for an x that is a feasible local minimizer of a
1313
user-defined nonlinear program.
1414

15-
## Shift to Theano-PyMC
15+
## Shift to Aesara
1616

1717
Originally, this module used the Theano library maintained by the
1818
Montreal Institute for Learning Algorithms. The original version of
19-
Theano was deprecated in 2017. Fortunately, the PyMC team has taken
19+
Theano was deprecated in 2017. Fortunately, the Aesara dev team has taken
2020
over maintenance of Theano in a fork called
21-
[Theano-PyMC](https://github.com/pymc-devs/Theano-PyMC). The install
22-
script (setup.py) now installs Theano-PyMC instead of Theano as a
23-
dependency. That said, this module is still compatible with deprecated
24-
Theano so you may choose to continue using deprecated Theano (at least
25-
as long as your architecture can still run it).
21+
[Aesara](https://github.com/aesara-devs/aesara). The install
22+
script (setup.py) now installs Aesara instead of Theano as a
23+
dependency.
2624

2725
## Getting Started
2826

@@ -35,14 +33,14 @@ Using PYIPM requires either a python 3 or python 2.7 interpreter. In
3533
addition to having python installed, the following packages are
3634
required:
3735

38-
NumPy, SciPy, Theano-PyMC
36+
NumPy, SciPy, Aesara
3937

40-
Theano is used to speed up the code execution through parallelization
38+
Aesara is used to speed up the code execution through parallelization
4139
and compilations of certain functions used in PYIPM. Furthermore,
42-
Theano makes it possible to perform many of largest steps in the
40+
Aesara makes it possible to perform many of largest steps in the
4341
algorithm on graphics processing units (GPUs). For information on
44-
using the GPUs, see the Theano documentation at
45-
http://deeplearning.net/software/theano/.
42+
using the GPUs, see the Aesara documentation at
43+
https://aesara.readthedocs.io/en/latest/.
4644

4745
All of the above required packages may be installed through pip.
4846

@@ -128,14 +126,14 @@ minimum if you compare the 'Ground truth' line to the 'Solver
128126
solution' line.
129127

130128
These example problems can also be used as a guide to construct your
131-
own problems which may be helpful if you are unfamiliar with Theano.
129+
own problems which may be helpful if you are unfamiliar with Aesara.
132130

133131
## Building and solving your own problems
134132

135133
The basics of writing your own problem statements are to define the
136134
objective function, f, the equality constraints function, ce, and the
137135
inequality constraints function, ci, as symbolic expressions that
138-
depend on the Theano tensor variable, x_dev. The tensor variable x_dev
136+
depend on the Aesara tensor variable, x_dev. The tensor variable x_dev
139137
is the symbolic input to all of the aforementioned functions that
140138
represents the weights, x.
141139

@@ -175,17 +173,17 @@ kkt = the Karush-Kuhn-Tucker (KKT) conditions (length 4 list of NumPy
175173
arrays)
176174

177175
The reason why compiling f, ce, and ci would cause errors in this case
178-
is because PYIPM uses Theano's symbolic differentation functionality
176+
is because PYIPM uses Aesara's symbolic differentation functionality
179177
to generate expressions for the gradients, df, dce, and dci, and, if
180178
the exact Hessian is being used, the Hessians, d2f, d2ce, and
181179
d2ci. Unfortunately, once these expressions are compiled, they cannot
182180
be used for symbolic differentiation. That is not to say, however,
183-
that you cannot use theano.function() to precompile your expressions
181+
that you cannot use aesara.function() to precompile your expressions
184182
into functions. You can do that at your own convenience so long as you
185183
provide your own symbolic expressions or functions for df, dce, and
186184
dci and, if applicable, d2f, d2ce, and d2ci. It is worth pointing out,
187185
however, that PYIPM does much more than just automatic differentiation
188-
(through Theano) and compiling your expressions; PYIPM also organizes
186+
(through Aesara) and compiling your expressions; PYIPM also organizes
189187
these inputs into an overall gradient and Hessian. To take full
190188
advantage of PYIPM for larger problems, it is best to provide PYIPM
191189
with expressions such that it can construct and compile the symbolic
@@ -218,8 +216,8 @@ it to 0 or False.
218216

219217
For a more thorough guide to the parameters and public class
220218
functions, see the docstring of class IPM in pyipm.py. For more
221-
information about how to build and compile expressions, see the Theano
222-
documentation at http://deeplearning.net/software/theano/.
219+
information about how to build and compile expressions, see the Aesara
220+
documentation at https://aesara.readthedocs.io/en/latest/.
223221

224222
# Contributing, help, bug reporting, etc.
225223

0 commit comments

Comments
 (0)