Striving towards backwards compatibility with the Theano -> Aesara transition
Project description
aesara-theano-fallback
Striving towards backwards compatibility as
Theano is replaced by
Aesara by the PyMC3
project. The idea is to provide a nearly drop in
replacement for importing aesara that will fall back onto theano when
aesara is not installed. This was specifically designed to support the
exoplanet and
starry projects so it might not support
all of the features that you need. If you find something that isn't supported,
please submit a pull request!
Installaion
This library can be installed using pip:
python -m pip install aesara-theano-fallback
Usage
The syntax is designed to mostly follow aesara, so things like the following will often work:
import aesara_theano_fallback.tensor as aet
For top-level access, use
from aesara_theano_fallback import aesara
One place where the syntax has changed significantly between Theano and Aesara
is the theano.gof module was re-named to aesara.graph and the contents were
moved around a little bit. For exoplanet and starry, we define a few custom Ops
and you can use this library to do that as follows:
from aesara_theano_fallback.graph import basic, op
class MyPythonOp(op.Op):
def make_node(self, *args):
# ...
return basic.Apply(self, in_args, out_args)
class MyCOp(op.ExternalCOp):
func_file = "./cpp_impl.cc"
func_name = "APPLY_SPECIFIC(my_op_name)"
# ...
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aesara_theano_fallback-0.1.0.tar.gz.
File metadata
- Download URL: aesara_theano_fallback-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f76208ce55de7ca8c069896bd4755096c48c9eaeef6785621f9f20aec9c3b2eb
|
|
| MD5 |
eb7eb529250399b36a2abae2a540039f
|
|
| BLAKE2b-256 |
3c1349533a51effa0a234ca1950b984945990c3fe94a2365725af39359ddd33e
|
File details
Details for the file aesara_theano_fallback-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aesara_theano_fallback-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66f5e5a0a3c98cd59ad33981758f0fe3c738dfdc121782b19bb03166f7c256ec
|
|
| MD5 |
ef1b7b74c7abb5dae3b7345ea8f53185
|
|
| BLAKE2b-256 |
963dd409f466fb73d777a3954e659066e170d833e2ee4eb854e433f7116d91da
|