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.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

aesara_theano_fallback-0.0.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aesara_theano_fallback-0.0.2.tar.gz
  • Upload date:
  • Size: 6.4 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.2.tar.gz
Algorithm Hash digest
SHA256 3f99c6e77c16b870e0a1895bec018a3590a889da8195dfdd4f5010ae7802f022
MD5 07c708f112812f366af79ecdeff9887a
BLAKE2b-256 762851281ca708b50314e1dd6aac517441b6b807289c0f2d3a6a9a019d18a5d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aesara_theano_fallback-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b7f80a5e27260967e226d6659133d9110062f2db1c60ce377e1be1b3d7528ea
MD5 2321ac1df02120736f5e084ca28abba4
BLAKE2b-256 558bac5818c2b9fed0fa95343e2a402e8e5a3094ba39e91f313ab2db6cafb916

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