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 Op
s
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
File details
Details for the file aesara_theano_fallback-0.0.4.tar.gz
.
File metadata
- Download URL: aesara_theano_fallback-0.0.4.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd4b0dd4848f0380c616e8e8a20566aa21b33a5f504ee9a0461cacf3f14dac5a |
|
MD5 | ff98be951da4ac153b72b19873d5e24a |
|
BLAKE2b-256 | 7a9d88efb89e0b95653b4e5721b9e6b5a9565d1a484ad81c0b0fd53d2a209e14 |
Provenance
File details
Details for the file aesara_theano_fallback-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: aesara_theano_fallback-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d225242bd2682530374a3fc4da2be0e929c2d52ca0a4ea44f87c7964ba4d0c53 |
|
MD5 | c03bb0927f999883cfa4539547c528dd |
|
BLAKE2b-256 | 7bc23d633adf2b13b5e79df9f380ae23e9e909e8bd8d19ce28dd58c95b0747cc |