Skip to main content

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

aesara_theano_fallback-0.0.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

aesara_theano_fallback-0.0.3-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file aesara_theano_fallback-0.0.3.tar.gz.

File metadata

  • Download URL: aesara_theano_fallback-0.0.3.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/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for aesara_theano_fallback-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2076a1a8efef3395a90490af1287611d3350ef961ac9e51f470d16033647b8ad
MD5 88f200ac1cd39c032eb03f8834481232
BLAKE2b-256 29fbeda01b395f13573b50bc6b037c03c5db1a31a08a7039c2fabff35f96b4ac

See more details on using hashes here.

File details

Details for the file aesara_theano_fallback-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: aesara_theano_fallback-0.0.3-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/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for aesara_theano_fallback-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 255608c235a0217753b473a184317d8f174fda475f42a9ad8e98cc9c5534865b
MD5 b8398cd60f01b769e1d8f199d7a6fdba
BLAKE2b-256 74b01a825f8681c85d2d8d1e81a8f8c6a2c9fca62b810766d54c2586e76b6c0e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page