pytensor 2.19.0__tar.gz → 2.20.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytensor-2.19.0/pytensor.egg-info → pytensor-2.20.0}/PKG-INFO +3 -5
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/environment.yml +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pyproject.toml +3 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/__init__.py +1 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/_version.py +3 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/builders.py +38 -36
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/compiledir.py +2 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/compilelock.py +3 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/debugmode.py +6 -11
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/function/__init__.py +2 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/function/pfunc.py +13 -17
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/function/types.py +12 -12
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/io.py +0 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/mode.py +5 -5
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/monitormode.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/nanguardmode.py +3 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/ops.py +3 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/profiling.py +5 -5
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/sharedvalue.py +6 -6
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/configparser.py +5 -6
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/d3viz.py +0 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/formatting.py +3 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/gradient.py +39 -39
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/basic.py +45 -50
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/destroyhandler.py +2 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/fg.py +19 -18
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/op.py +14 -17
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/replace.py +23 -29
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/rewriting/basic.py +38 -41
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/rewriting/db.py +17 -22
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/rewriting/kanren.py +4 -6
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/rewriting/unify.py +3 -4
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/rewriting/utils.py +5 -5
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/type.py +11 -13
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/utils.py +6 -6
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/ifelse.py +15 -15
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/basic.py +17 -17
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/basic.py +8 -7
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/cmodule.py +24 -29
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/interface.py +2 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/lazylinker_c.py +1 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/op.py +9 -11
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/params_type.py +0 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/type.py +3 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/random.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/scalar.py +2 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/shape.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/linker.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/basic.py +11 -5
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/cython_support.py +4 -4
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/elemwise.py +4 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/elemwise_codegen.py +2 -4
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/random.py +3 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/scalar.py +0 -6
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/scan.py +4 -5
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/slinalg.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/utils.py +14 -22
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/vm.py +5 -4
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/may_share_memory.py +0 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/ordered_set.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/safe_asarray.py +0 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/printing.py +50 -55
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/raise_op.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scalar/basic.py +14 -16
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scalar/loop.py +2 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scalar/sharedvar.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/__init__.py +0 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/basic.py +8 -8
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/op.py +13 -26
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/rewriting.py +7 -7
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/scan_perform_ext.py +1 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/utils.py +10 -10
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/views.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/__init__.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/basic.py +4 -9
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/sharedvar.py +2 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/type.py +7 -7
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/__init__.py +7 -7
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/basic.py +55 -60
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/blas.py +1 -4
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/blas_headers.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/blockwise.py +8 -8
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/conv/abstract_conv.py +39 -44
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/elemwise.py +11 -12
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/extra_ops.py +5 -6
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/functional.py +3 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/io.py +2 -4
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/math.py +10 -10
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/nlinalg.py +39 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/basic.py +9 -10
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/op.py +25 -7
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/rewriting/basic.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/utils.py +36 -8
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/basic.py +40 -23
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/blas.py +4 -6
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/blockwise.py +5 -14
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/elemwise.py +2 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/linalg.py +2 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/math.py +7 -7
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/shape.py +8 -9
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/subtensor.py +15 -18
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/shape.py +7 -7
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/sharedvar.py +2 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/slinalg.py +6 -52
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/subtensor.py +17 -18
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/type.py +30 -30
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/type_other.py +1 -6
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/utils.py +2 -3
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/variable.py +7 -7
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/typed_list/basic.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/typed_list/rewriting.py +1 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/updates.py +1 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/utils.py +2 -2
- {pytensor-2.19.0 → pytensor-2.20.0/pytensor.egg-info}/PKG-INFO +3 -5
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor.egg-info/requires.txt +1 -2
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/test_config.py +1 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/test_printing.py +2 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/test_rop.py +0 -1
- {pytensor-2.19.0 → pytensor-2.20.0}/LICENSE.txt +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/MANIFEST.in +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/README.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/bin/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/bin/pytensor-cache +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/bin/pytensor_cache.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/.templates/PLACEHOLDER +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/.templates/layout.html +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/LICENSE.txt +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/README.md +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/acknowledgement.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/bcast.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/bcast.svg +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/conf.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/core_development_guide.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/css.inc +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/dev_start_guide.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/apply.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/apply.svg +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/apply2.svg +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/creating_a_c_op.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/creating_a_numba_jax_op.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/creating_an_op.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/ctype.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/extending_faq.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/extending_pytensor_solution_1.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/graph_rewriting.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/graphstructures.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/inplace.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/op.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/other_ops.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/pics/symbolic_graph_opt.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/pics/symbolic_graph_unopt.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/pipeline.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/scan.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/tips.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/type.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/unittest.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/extending/using_params.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/faq.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/generate_dtype_tensor_table.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/glossary.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/images/Elman_srnn.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/images/PyTensor_RGB.svg +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/images/blocksparse.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/images/lstm.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/images/lstm_memorycell.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/images/talk2010.gif +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/images/talk2010.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/install.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/internal/how_to_release.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/internal/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/internal/metadocumentation.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/introduction.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/debugmode.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/function.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/io.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/mode.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/nanguardmode.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/opfromgraph.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/ops.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/profilemode.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/compile/shared.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/config.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/d3viz/css/d3viz.css +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/d3viz/js/d3viz.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/mlp.html +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/mlp.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/mlp2.html +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/mlp2.pdf +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/mlp2.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/ofg.html +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/examples/ofg2.html +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/index.ipynb +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/index_files/index_10_0.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/index_files/index_11_0.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/index_files/index_24_0.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/d3viz/index_files/index_25_0.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/gradient.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/graph/features.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/graph/fgraph.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/graph/graph.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/graph/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/graph/op.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/graph/type.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/graph/utils.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/misc/pkl_utils.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/printing.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/sandbox/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/sandbox/linalg.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/scalar/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/scan.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/sparse/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/sparse/sandbox.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/basic.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/basic_opt.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/bcast.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/bcast.svg +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/conv.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/elemwise.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/extra_ops.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/fft.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/io.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/math_opt.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/nlinalg.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/plot_fft.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/random/basic.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/random/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/random/utils.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/slinalg.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/tensor/utils.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/library/typed_list.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/links.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/optimizations.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/pylintrc +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/ccodegen.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/compilation.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/debugging_with_stepmode.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/elemwise_compiler.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/function.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/functional.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/how_to_make_ops.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/index2.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/interactive_debugger.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/logistic_regression_example.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/performance.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/randomnumbers.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/rethinkccodegen.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/sandbox.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/software.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/sparse.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/sandbox/tensoroptools.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/scripts/docgen.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/troubleshooting.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/adding.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/adding_solution_1.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/aliasing.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/apply.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/apply.svg +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/bcast.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/broadcasting.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/conditions.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/debug_faq.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/dlogistic.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/examples.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/faq_tutorial.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/gradients.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/index.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/loading_and_saving.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/logistic.gp +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/logistic.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/loop.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/loop_solution_1.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/modes.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/modes_solution_1.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/multi_cores.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/nan_tutorial.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/pics/d3viz.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/pics/logreg_pydotprint_predict.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/pics/logreg_pydotprint_prediction.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/pics/logreg_pydotprint_train.png +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/printing_drawing.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/profiling.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/profiling_example.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/profiling_example_out.prof +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/shape_info.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/sparse.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/tutorial/symbolic_graphs.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/doc/user_guide.rst +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/bin/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/bin/pytensor_cache.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/breakpoint.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/compile/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/configdefaults.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/css/d3-context-menu.css +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/css/d3viz.css +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/js/d3-context-menu.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/js/d3.v3.min.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/js/d3viz.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/js/dagre-d3.min.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/d3viz/js/graphlib-dot.min.js +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/features.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/null_type.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/graph/rewriting/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/c_code/lazylinker_c.c +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/c_code/pytensor_mod_helper.h +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/cutils.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/cvm.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/c/exceptions.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/basic.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/blockwise.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/elemwise.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/extra_ops.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/nlinalg.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/scan.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/slinalg.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/sparse.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/subtensor.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/jax/dispatch/tensor_basic.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/extra_ops.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/nlinalg.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/sparse.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/dispatch/tensor_basic.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/link/numba/linker.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/check_blas.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/check_blas_many.sh +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/check_duplicate_key.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/elemwise_openmp_speedup.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/elemwise_time_test.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/frozendict.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/misc/pkl_utils.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/py.typed +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scalar/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scalar/c_code/Faddeeva.cc +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scalar/c_code/Faddeeva.hh +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scalar/c_code/gamma.c +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scalar/math.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/checkpoints.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/scan/scan_perform.pyx +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/rewriting.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/sandbox/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/sandbox/sp.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/sandbox/sp2.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/sparse/utils.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/blas_c.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/blas_scipy.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/c_code/alt_blas_common.h +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/c_code/alt_blas_template.c +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/c_code/dimshuffle.c +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/conv/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/elemwise_cgen.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/exceptions.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/fft.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/fourier.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/inplace.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/linalg.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/rewriting/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/rewriting/jax.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/type.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/random/var.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/blas_c.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/blas_scipy.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/extra_ops.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/jax.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/special.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/rewriting/uncanonicalize.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/sort.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/special.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/var.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/tensor/xlogx.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/typed_list/__init__.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/typed_list/type.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor/version.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor.egg-info/SOURCES.txt +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor.egg-info/dependency_links.txt +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor.egg-info/entry_points.txt +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/pytensor.egg-info/top_level.txt +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/scripts/mypy-failing.txt +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/setup.cfg +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/setup.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/link/c/c_code/test_cenum.h +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/link/c/c_code/test_quadratic_function.c +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/tensor/conv/c_code/corr3d_gemm.c +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/tensor/conv/c_code/corr_gemm.c +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/test_breakpoint.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/test_gradient.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/test_ifelse.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/test_raise_op.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/tests/test_updates.py +0 -0
- {pytensor-2.19.0 → pytensor-2.20.0}/versioneer.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytensor
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.20.0
|
|
4
4
|
Summary: Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs.
|
|
5
5
|
Author-email: pymc-devs <pymc.devs@gmail.com>
|
|
6
6
|
License: .. _license:
|
|
@@ -66,11 +66,10 @@ Classifier: Operating System :: POSIX
|
|
|
66
66
|
Classifier: Operating System :: Unix
|
|
67
67
|
Classifier: Operating System :: MacOS
|
|
68
68
|
Classifier: Programming Language :: Python :: 3
|
|
69
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
70
69
|
Classifier: Programming Language :: Python :: 3.10
|
|
71
70
|
Classifier: Programming Language :: Python :: 3.11
|
|
72
71
|
Classifier: Programming Language :: Python :: 3.12
|
|
73
|
-
Requires-Python: <3.13,>=3.
|
|
72
|
+
Requires-Python: <3.13,>=3.10
|
|
74
73
|
Description-Content-Type: text/x-rst
|
|
75
74
|
License-File: LICENSE.txt
|
|
76
75
|
Requires-Dist: setuptools>=48.0.0
|
|
@@ -106,8 +105,7 @@ Provides-Extra: jax
|
|
|
106
105
|
Requires-Dist: jax; extra == "jax"
|
|
107
106
|
Requires-Dist: jaxlib; extra == "jax"
|
|
108
107
|
Provides-Extra: numba
|
|
109
|
-
Requires-Dist: numba>=0.
|
|
110
|
-
Requires-Dist: numba-scipy>=0.3.0; extra == "numba"
|
|
108
|
+
Requires-Dist: numba>=0.57; extra == "numba"
|
|
111
109
|
|
|
112
110
|
.. image:: https://cdn.rawgit.com/pymc-devs/pytensor/main/doc/images/PyTensor_RGB.svg
|
|
113
111
|
:height: 100px
|
|
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
|
|
|
10
10
|
[project]
|
|
11
11
|
name = "pytensor"
|
|
12
12
|
dynamic = ['version']
|
|
13
|
-
requires-python = ">=3.
|
|
13
|
+
requires-python = ">=3.10,<3.13"
|
|
14
14
|
authors = [{ name = "pymc-devs", email = "pymc.devs@gmail.com" }]
|
|
15
15
|
description = "Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs."
|
|
16
16
|
readme = "README.rst"
|
|
@@ -30,7 +30,6 @@ classifiers = [
|
|
|
30
30
|
"Operating System :: Unix",
|
|
31
31
|
"Operating System :: MacOS",
|
|
32
32
|
"Programming Language :: Python :: 3",
|
|
33
|
-
"Programming Language :: Python :: 3.9",
|
|
34
33
|
"Programming Language :: Python :: 3.10",
|
|
35
34
|
"Programming Language :: Python :: 3.11",
|
|
36
35
|
"Programming Language :: Python :: 3.12",
|
|
@@ -80,7 +79,7 @@ tests = [
|
|
|
80
79
|
]
|
|
81
80
|
rtd = ["sphinx>=5.1.0,<6", "pygments", "pydot", "pydot2", "pydot-ng"]
|
|
82
81
|
jax = ["jax", "jaxlib"]
|
|
83
|
-
numba = ["numba>=0.
|
|
82
|
+
numba = ["numba>=0.57"]
|
|
84
83
|
|
|
85
84
|
[tool.setuptools.packages.find]
|
|
86
85
|
include = ["pytensor*", "bin"]
|
|
@@ -154,6 +153,7 @@ lines-after-imports = 2
|
|
|
154
153
|
|
|
155
154
|
|
|
156
155
|
[tool.mypy]
|
|
156
|
+
python_version = "3.10"
|
|
157
157
|
ignore_missing_imports = true
|
|
158
158
|
no_implicit_optional = true
|
|
159
159
|
check_untyped_defs = false
|
|
@@ -18,7 +18,6 @@ To learn more, check out:
|
|
|
18
18
|
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
__docformat__ = "restructuredtext en"
|
|
23
22
|
|
|
24
23
|
# Set a default logger. It is important to do this before importing some other
|
|
@@ -77,7 +76,7 @@ from pytensor.graph.replace import clone_replace, graph_replace
|
|
|
77
76
|
# isort: on
|
|
78
77
|
|
|
79
78
|
|
|
80
|
-
def as_symbolic(x: Any, name:
|
|
79
|
+
def as_symbolic(x: Any, name: str | None = None, **kwargs) -> Variable:
|
|
81
80
|
"""Convert `x` into an equivalent PyTensor `Variable`.
|
|
82
81
|
|
|
83
82
|
Parameters
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-03-
|
|
11
|
+
"date": "2024-03-28T18:19:27+0100",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "2.
|
|
14
|
+
"full-revisionid": "ef22377d7e6ea6c74c36a8dc634ef7f1f1f8f9c6",
|
|
15
|
+
"version": "2.20.0"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""Define new Ops from existing Ops"""
|
|
2
|
+
|
|
2
3
|
from collections import OrderedDict
|
|
3
4
|
from collections.abc import Sequence
|
|
4
5
|
from copy import copy
|
|
5
6
|
from functools import partial
|
|
6
|
-
from typing import
|
|
7
|
+
from typing import cast
|
|
7
8
|
|
|
8
9
|
import pytensor.tensor as pt
|
|
9
10
|
from pytensor import function
|
|
@@ -91,38 +92,29 @@ def construct_nominal_fgraph(
|
|
|
91
92
|
dict[Variable, Variable],
|
|
92
93
|
]:
|
|
93
94
|
"""Construct an inner-`FunctionGraph` with ordered nominal inputs."""
|
|
94
|
-
|
|
95
|
-
for n, inp in enumerate(inputs):
|
|
96
|
-
if (
|
|
97
|
-
not isinstance(inp, Variable)
|
|
98
|
-
or isinstance(inp, Constant)
|
|
99
|
-
or isinstance(inp, SharedVariable)
|
|
100
|
-
):
|
|
101
|
-
raise TypeError(
|
|
102
|
-
f"Inputs and outputs must be non-Constant/shared Variable instances; got {inp}"
|
|
103
|
-
)
|
|
95
|
+
implicit_shared_inputs = []
|
|
104
96
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
dummy_shared_inputs = []
|
|
108
|
-
shared_inputs = []
|
|
97
|
+
dummy_inputs = [inp.type() for inp in inputs]
|
|
98
|
+
dummy_implicit_shared_inputs = []
|
|
109
99
|
for var in graph_inputs(outputs, inputs):
|
|
100
|
+
if var in inputs:
|
|
101
|
+
continue
|
|
110
102
|
if isinstance(var, SharedVariable):
|
|
111
|
-
#
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
103
|
+
# We allow shared inputs to be added automatically to the graph
|
|
104
|
+
implicit_shared_inputs.append(var)
|
|
105
|
+
dummy_implicit_shared_inputs.append(var.type())
|
|
106
|
+
elif not isinstance(var, Constant):
|
|
107
|
+
raise MissingInputError(f"NominalGraph is missing an input: {var}")
|
|
108
|
+
|
|
109
|
+
replacements = dict(
|
|
110
|
+
zip(
|
|
111
|
+
inputs + implicit_shared_inputs, dummy_inputs + dummy_implicit_shared_inputs
|
|
112
|
+
)
|
|
113
|
+
)
|
|
122
114
|
|
|
123
115
|
new = rebuild_collect_shared(
|
|
124
116
|
cast(Sequence[Variable], outputs),
|
|
125
|
-
inputs=inputs +
|
|
117
|
+
inputs=inputs + implicit_shared_inputs,
|
|
126
118
|
replace=replacements,
|
|
127
119
|
copy_inputs_over=False,
|
|
128
120
|
)
|
|
@@ -132,7 +124,7 @@ def construct_nominal_fgraph(
|
|
|
132
124
|
(clone_d, update_d, update_expr, new_shared_inputs),
|
|
133
125
|
) = new
|
|
134
126
|
|
|
135
|
-
assert len(local_inputs) == len(inputs) + len(
|
|
127
|
+
assert len(local_inputs) == len(inputs) + len(implicit_shared_inputs)
|
|
136
128
|
assert len(local_outputs) == len(outputs)
|
|
137
129
|
assert not update_d
|
|
138
130
|
assert not update_expr
|
|
@@ -154,7 +146,7 @@ def construct_nominal_fgraph(
|
|
|
154
146
|
fgraph.clients.pop(inp, None)
|
|
155
147
|
fgraph.add_input(nom_inp)
|
|
156
148
|
|
|
157
|
-
return fgraph,
|
|
149
|
+
return fgraph, implicit_shared_inputs, update_d, update_expr
|
|
158
150
|
|
|
159
151
|
|
|
160
152
|
class OpFromGraph(Op, HasInnerGraph):
|
|
@@ -176,8 +168,6 @@ class OpFromGraph(Op, HasInnerGraph):
|
|
|
176
168
|
- grad() make it support DisconnectedType and the new interface
|
|
177
169
|
- add support for NullType and DisconnectedType when R_op supports them
|
|
178
170
|
- check how it works with updates.
|
|
179
|
-
- add test with constant as input or inside the inner graph.
|
|
180
|
-
- Add support for the GPU? Probably just need an opt to remove transfer
|
|
181
171
|
- Add support to pickle this Op.
|
|
182
172
|
- Add support/test with random generator
|
|
183
173
|
- Add optimization to removing unused inputs/outputs
|
|
@@ -285,7 +275,7 @@ class OpFromGraph(Op, HasInnerGraph):
|
|
|
285
275
|
#
|
|
286
276
|
# For now, this converts NullType or DisconnectedType into zeros_like.
|
|
287
277
|
# other types are unmodified: overrider_var -> None
|
|
288
|
-
if isinstance(grad.type,
|
|
278
|
+
if isinstance(grad.type, NullType | DisconnectedType):
|
|
289
279
|
if hasattr(inp, "zeros_like"):
|
|
290
280
|
return inp.zeros_like(), grad
|
|
291
281
|
else:
|
|
@@ -309,12 +299,14 @@ class OpFromGraph(Op, HasInnerGraph):
|
|
|
309
299
|
self,
|
|
310
300
|
inputs: list[Variable],
|
|
311
301
|
outputs: list[Variable],
|
|
302
|
+
*,
|
|
312
303
|
inline: bool = False,
|
|
313
304
|
lop_overrides: str = "default",
|
|
314
305
|
grad_overrides: str = "default",
|
|
315
306
|
rop_overrides: str = "default",
|
|
316
|
-
connection_pattern:
|
|
317
|
-
|
|
307
|
+
connection_pattern: list[list[bool]] | None = None,
|
|
308
|
+
strict: bool = False,
|
|
309
|
+
name: str | None = None,
|
|
318
310
|
**kwargs,
|
|
319
311
|
):
|
|
320
312
|
"""
|
|
@@ -398,6 +390,10 @@ class OpFromGraph(Op, HasInnerGraph):
|
|
|
398
390
|
must be equal to number of outputs. connection_pattern If not
|
|
399
391
|
``None``, this will be used as the connection_pattern for this
|
|
400
392
|
:class:`Op`.
|
|
393
|
+
strict: bool, default False
|
|
394
|
+
If true, it raises when any variables needed to compute the inner graph
|
|
395
|
+
are not provided as explici inputs. This can only happen for graphs with
|
|
396
|
+
shared variables.
|
|
401
397
|
name
|
|
402
398
|
A name for debugging purposes.
|
|
403
399
|
kwargs
|
|
@@ -423,6 +419,12 @@ class OpFromGraph(Op, HasInnerGraph):
|
|
|
423
419
|
inputs, outputs
|
|
424
420
|
)
|
|
425
421
|
|
|
422
|
+
if strict and self.shared_inputs:
|
|
423
|
+
raise ValueError(
|
|
424
|
+
"All variables needed to compute inner-graph must be provided as inputs under strict=True. "
|
|
425
|
+
f"The inner-graph implicitly depends on the following shared variables {self.shared_inputs}"
|
|
426
|
+
)
|
|
427
|
+
|
|
426
428
|
self.kwargs = kwargs
|
|
427
429
|
self.input_types = [inp.type for inp in inputs]
|
|
428
430
|
self.output_types = [out.type for out in outputs]
|
|
@@ -533,7 +535,7 @@ class OpFromGraph(Op, HasInnerGraph):
|
|
|
533
535
|
all_grads_l = list(all_grads_l)
|
|
534
536
|
all_grads_ov_l = list(all_grads_ov_l)
|
|
535
537
|
elif isinstance(lop_op, Variable):
|
|
536
|
-
if isinstance(lop_op.type,
|
|
538
|
+
if isinstance(lop_op.type, DisconnectedType | NullType):
|
|
537
539
|
all_grads_l = [inp.zeros_like() for inp in local_inputs]
|
|
538
540
|
all_grads_ov_l = [lop_op.type() for _ in range(inp_len)]
|
|
539
541
|
else:
|
|
@@ -560,7 +562,7 @@ class OpFromGraph(Op, HasInnerGraph):
|
|
|
560
562
|
all_grads_l.append(gnext)
|
|
561
563
|
all_grads_ov_l.append(gnext_ov)
|
|
562
564
|
elif isinstance(fn_gov, Variable):
|
|
563
|
-
if isinstance(fn_gov.type,
|
|
565
|
+
if isinstance(fn_gov.type, DisconnectedType | NullType):
|
|
564
566
|
all_grads_l.append(inp.zeros_like())
|
|
565
567
|
all_grads_ov_l.append(fn_gov.type())
|
|
566
568
|
else:
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
This module contains housekeeping functions for cleaning/purging the "compiledir".
|
|
3
3
|
It is used by the "pytensor-cache" CLI tool, located in the /bin folder of the repository.
|
|
4
4
|
"""
|
|
5
|
+
|
|
5
6
|
import logging
|
|
6
7
|
import os
|
|
7
8
|
import pickle
|
|
@@ -54,7 +55,7 @@ def cleanup():
|
|
|
54
55
|
have_npy_abi_version = True
|
|
55
56
|
elif obj.startswith("c_compiler_str="):
|
|
56
57
|
have_c_compiler = True
|
|
57
|
-
elif isinstance(obj,
|
|
58
|
+
elif isinstance(obj, Op | CType) and hasattr(
|
|
58
59
|
obj, "c_code_cache_version"
|
|
59
60
|
):
|
|
60
61
|
v = obj.c_code_cache_version()
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Locking mechanism to ensure no two compilations occur simultaneously
|
|
3
3
|
in the same compilation directory (which can cause crashes).
|
|
4
4
|
"""
|
|
5
|
+
|
|
5
6
|
import os
|
|
6
7
|
import threading
|
|
7
8
|
from contextlib import contextmanager
|
|
8
|
-
from typing import Optional, Union
|
|
9
9
|
|
|
10
10
|
import filelock
|
|
11
11
|
|
|
@@ -46,9 +46,9 @@ def force_unlock(lock_dir: os.PathLike):
|
|
|
46
46
|
|
|
47
47
|
@contextmanager
|
|
48
48
|
def lock_ctx(
|
|
49
|
-
lock_dir:
|
|
49
|
+
lock_dir: str | os.PathLike | None = None,
|
|
50
50
|
*,
|
|
51
|
-
timeout:
|
|
51
|
+
timeout: float | None = None,
|
|
52
52
|
):
|
|
53
53
|
"""Context manager that wraps around FileLock and SoftFileLock from filelock package.
|
|
54
54
|
|
|
@@ -5,7 +5,6 @@ TODO: add support for IfElse Op, LazyLinker, etc.
|
|
|
5
5
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
|
|
9
8
|
import copy
|
|
10
9
|
import gc
|
|
11
10
|
import logging
|
|
@@ -14,7 +13,6 @@ from io import StringIO
|
|
|
14
13
|
from itertools import chain
|
|
15
14
|
from itertools import product as itertools_product
|
|
16
15
|
from logging import Logger
|
|
17
|
-
from typing import Optional
|
|
18
16
|
from warnings import warn
|
|
19
17
|
|
|
20
18
|
import numpy as np
|
|
@@ -681,7 +679,7 @@ def _lessbroken_deepcopy(a):
|
|
|
681
679
|
# This logic is also in link.py
|
|
682
680
|
from pytensor.link.c.type import _cdata_type
|
|
683
681
|
|
|
684
|
-
if isinstance(a,
|
|
682
|
+
if isinstance(a, np.ndarray | np.memmap):
|
|
685
683
|
rval = a.copy(order="K")
|
|
686
684
|
elif isinstance(a, _cdata_type):
|
|
687
685
|
# This is not copyable (and should be used for constant data).
|
|
@@ -1355,7 +1353,7 @@ class _Linker(LocalLinker):
|
|
|
1355
1353
|
self.maker = maker
|
|
1356
1354
|
super().__init__(scheduler=schedule)
|
|
1357
1355
|
|
|
1358
|
-
def accept(self, fgraph, no_recycling:
|
|
1356
|
+
def accept(self, fgraph, no_recycling: list | None = None, profile=None):
|
|
1359
1357
|
if no_recycling is None:
|
|
1360
1358
|
no_recycling = []
|
|
1361
1359
|
if self.fgraph is not None and self.fgraph is not fgraph:
|
|
@@ -1891,7 +1889,7 @@ class _Linker(LocalLinker):
|
|
|
1891
1889
|
# HACK TO LOOK LIKE A REAL DESTRUCTIVE ACTION
|
|
1892
1890
|
# TOOK PLACE
|
|
1893
1891
|
if (
|
|
1894
|
-
isinstance(dr_vals[r][0],
|
|
1892
|
+
isinstance(dr_vals[r][0], np.ndarray | np.memmap)
|
|
1895
1893
|
and (dr_vals[r][0].dtype == storage_map[r][0].dtype)
|
|
1896
1894
|
and (dr_vals[r][0].shape == storage_map[r][0].shape)
|
|
1897
1895
|
):
|
|
@@ -2021,10 +2019,10 @@ class _Maker(FunctionMaker): # inheritance buys a few helper functions
|
|
|
2021
2019
|
if outputs is None:
|
|
2022
2020
|
return_none = True
|
|
2023
2021
|
outputs = []
|
|
2024
|
-
if not isinstance(outputs,
|
|
2022
|
+
if not isinstance(outputs, list | tuple):
|
|
2025
2023
|
unpack_single = True
|
|
2026
2024
|
outputs = [outputs]
|
|
2027
|
-
if not isinstance(inputs,
|
|
2025
|
+
if not isinstance(inputs, list | tuple):
|
|
2028
2026
|
inputs = [inputs]
|
|
2029
2027
|
|
|
2030
2028
|
# Wrap them in In or Out instances if needed.
|
|
@@ -2317,10 +2315,7 @@ class DebugMode(Mode):
|
|
|
2317
2315
|
raise ValueError("DebugMode has to check at least one of c and py code")
|
|
2318
2316
|
|
|
2319
2317
|
def __str__(self):
|
|
2320
|
-
return "DebugMode(linker={}, optimizer={})"
|
|
2321
|
-
self.provided_linker,
|
|
2322
|
-
self.provided_optimizer,
|
|
2323
|
-
)
|
|
2318
|
+
return f"DebugMode(linker={self.provided_linker}, optimizer={self.provided_optimizer})"
|
|
2324
2319
|
|
|
2325
2320
|
|
|
2326
2321
|
register_mode("DEBUG_MODE", DebugMode(optimizer="fast_run"))
|
|
@@ -285,7 +285,7 @@ def function(
|
|
|
285
285
|
|
|
286
286
|
if givens is None:
|
|
287
287
|
givens = []
|
|
288
|
-
if not isinstance(inputs,
|
|
288
|
+
if not isinstance(inputs, list | tuple):
|
|
289
289
|
raise Exception(
|
|
290
290
|
"Input variables of an PyTensor function should be "
|
|
291
291
|
"contained in a list, even when there is a single "
|
|
@@ -293,7 +293,7 @@ def function(
|
|
|
293
293
|
)
|
|
294
294
|
|
|
295
295
|
# compute some features of the arguments:
|
|
296
|
-
uses_tuple = any(isinstance(i,
|
|
296
|
+
uses_tuple = any(isinstance(i, list | tuple) for i in inputs)
|
|
297
297
|
uses_updates = bool(updates)
|
|
298
298
|
uses_givens = bool(givens)
|
|
299
299
|
|
|
@@ -5,7 +5,7 @@ Provide a simple user friendly API.
|
|
|
5
5
|
|
|
6
6
|
from collections.abc import Sequence
|
|
7
7
|
from copy import copy
|
|
8
|
-
from typing import
|
|
8
|
+
from typing import overload
|
|
9
9
|
|
|
10
10
|
from pytensor.compile.function.types import Function, UnusedInputError, orig_function
|
|
11
11
|
from pytensor.compile.io import In, Out
|
|
@@ -35,8 +35,7 @@ def rebuild_collect_shared(
|
|
|
35
35
|
list[Variable],
|
|
36
36
|
list[SharedVariable],
|
|
37
37
|
],
|
|
38
|
-
]:
|
|
39
|
-
...
|
|
38
|
+
]: ...
|
|
40
39
|
|
|
41
40
|
|
|
42
41
|
@overload
|
|
@@ -58,8 +57,7 @@ def rebuild_collect_shared(
|
|
|
58
57
|
list[Variable],
|
|
59
58
|
list[SharedVariable],
|
|
60
59
|
],
|
|
61
|
-
]:
|
|
62
|
-
...
|
|
60
|
+
]: ...
|
|
63
61
|
|
|
64
62
|
|
|
65
63
|
@overload
|
|
@@ -81,8 +79,7 @@ def rebuild_collect_shared(
|
|
|
81
79
|
list[Variable],
|
|
82
80
|
list[SharedVariable],
|
|
83
81
|
],
|
|
84
|
-
]:
|
|
85
|
-
...
|
|
82
|
+
]: ...
|
|
86
83
|
|
|
87
84
|
|
|
88
85
|
@overload
|
|
@@ -104,12 +101,11 @@ def rebuild_collect_shared(
|
|
|
104
101
|
list[Variable],
|
|
105
102
|
list[SharedVariable],
|
|
106
103
|
],
|
|
107
|
-
]:
|
|
108
|
-
...
|
|
104
|
+
]: ...
|
|
109
105
|
|
|
110
106
|
|
|
111
107
|
def rebuild_collect_shared(
|
|
112
|
-
outputs:
|
|
108
|
+
outputs: Sequence[Variable] | Variable | Out | Sequence[Out],
|
|
113
109
|
inputs=None,
|
|
114
110
|
replace=None,
|
|
115
111
|
updates=None,
|
|
@@ -119,7 +115,7 @@ def rebuild_collect_shared(
|
|
|
119
115
|
clone_inner_graphs=False,
|
|
120
116
|
) -> tuple[
|
|
121
117
|
list[Variable],
|
|
122
|
-
|
|
118
|
+
list[Variable] | Variable | Out | list[Out],
|
|
123
119
|
tuple[
|
|
124
120
|
dict[Variable, Variable],
|
|
125
121
|
dict[SharedVariable, Variable],
|
|
@@ -380,7 +376,7 @@ def pfunc(
|
|
|
380
376
|
profile=None,
|
|
381
377
|
on_unused_input=None,
|
|
382
378
|
output_keys=None,
|
|
383
|
-
fgraph:
|
|
379
|
+
fgraph: FunctionGraph | None = None,
|
|
384
380
|
) -> Function:
|
|
385
381
|
"""
|
|
386
382
|
Function-constructor for graphs with shared variables.
|
|
@@ -488,7 +484,7 @@ def construct_pfunc_ins_and_outs(
|
|
|
488
484
|
no_default_updates=False,
|
|
489
485
|
rebuild_strict=True,
|
|
490
486
|
allow_input_downcast=None,
|
|
491
|
-
fgraph:
|
|
487
|
+
fgraph: FunctionGraph | None = None,
|
|
492
488
|
):
|
|
493
489
|
"""Construct inputs and outputs for `pfunc`.
|
|
494
490
|
|
|
@@ -516,7 +512,7 @@ def construct_pfunc_ins_and_outs(
|
|
|
516
512
|
if givens is None:
|
|
517
513
|
givens = []
|
|
518
514
|
|
|
519
|
-
if not isinstance(params,
|
|
515
|
+
if not isinstance(params, list | tuple):
|
|
520
516
|
raise TypeError("The `params` argument must be a list or a tuple")
|
|
521
517
|
|
|
522
518
|
if not isinstance(no_default_updates, bool) and not isinstance(
|
|
@@ -525,7 +521,7 @@ def construct_pfunc_ins_and_outs(
|
|
|
525
521
|
raise TypeError("The `no_default_update` argument must be a boolean or list")
|
|
526
522
|
|
|
527
523
|
if len(updates) > 0 and not all(
|
|
528
|
-
isinstance(pair,
|
|
524
|
+
isinstance(pair, tuple | list)
|
|
529
525
|
and len(pair) == 2
|
|
530
526
|
and isinstance(pair[0], Variable)
|
|
531
527
|
for pair in iter_over_pairs(updates)
|
|
@@ -579,7 +575,7 @@ def construct_pfunc_ins_and_outs(
|
|
|
579
575
|
if outputs is None:
|
|
580
576
|
out_list = []
|
|
581
577
|
else:
|
|
582
|
-
if isinstance(outputs,
|
|
578
|
+
if isinstance(outputs, list | tuple):
|
|
583
579
|
out_list = list(outputs)
|
|
584
580
|
else:
|
|
585
581
|
out_list = [outputs]
|
|
@@ -602,7 +598,7 @@ def construct_pfunc_ins_and_outs(
|
|
|
602
598
|
if outputs is None:
|
|
603
599
|
new_outputs = []
|
|
604
600
|
else:
|
|
605
|
-
if isinstance(outputs,
|
|
601
|
+
if isinstance(outputs, list | tuple):
|
|
606
602
|
new_outputs = cloned_extended_outputs[: len(outputs)]
|
|
607
603
|
else:
|
|
608
604
|
new_outputs = cloned_extended_outputs[0]
|
|
@@ -6,7 +6,7 @@ import logging
|
|
|
6
6
|
import time
|
|
7
7
|
import warnings
|
|
8
8
|
from itertools import chain
|
|
9
|
-
from typing import TYPE_CHECKING
|
|
9
|
+
from typing import TYPE_CHECKING
|
|
10
10
|
|
|
11
11
|
import numpy as np
|
|
12
12
|
|
|
@@ -173,7 +173,7 @@ def std_fgraph(
|
|
|
173
173
|
input_specs: list[SymbolicInput],
|
|
174
174
|
output_specs: list[SymbolicOutput],
|
|
175
175
|
accept_inplace: bool = False,
|
|
176
|
-
fgraph:
|
|
176
|
+
fgraph: FunctionGraph | None = None,
|
|
177
177
|
features: list[type[Feature]] = [PreserveVariableAttributes],
|
|
178
178
|
force_clone=False,
|
|
179
179
|
) -> tuple[FunctionGraph, list[SymbolicOutput]]:
|
|
@@ -340,7 +340,7 @@ class Function:
|
|
|
340
340
|
return_none: bool,
|
|
341
341
|
output_keys,
|
|
342
342
|
maker: "FunctionMaker",
|
|
343
|
-
name:
|
|
343
|
+
name: str | None = None,
|
|
344
344
|
):
|
|
345
345
|
"""
|
|
346
346
|
Parameters
|
|
@@ -1310,7 +1310,7 @@ class FunctionMaker:
|
|
|
1310
1310
|
elif isinstance(input, Variable):
|
|
1311
1311
|
# r -> SymbolicInput(variable=r)
|
|
1312
1312
|
return SymbolicInput(input)
|
|
1313
|
-
elif isinstance(input,
|
|
1313
|
+
elif isinstance(input, list | tuple):
|
|
1314
1314
|
# (r, u) -> SymbolicInput(variable=r, update=u)
|
|
1315
1315
|
if len(input) == 2:
|
|
1316
1316
|
return SymbolicInput(input[0], update=input[1])
|
|
@@ -1495,10 +1495,10 @@ class FunctionMaker:
|
|
|
1495
1495
|
if outputs is None:
|
|
1496
1496
|
return_none = True
|
|
1497
1497
|
outputs = []
|
|
1498
|
-
if not isinstance(outputs,
|
|
1498
|
+
if not isinstance(outputs, list | tuple):
|
|
1499
1499
|
unpack_single = True
|
|
1500
1500
|
outputs = [outputs]
|
|
1501
|
-
if not isinstance(inputs,
|
|
1501
|
+
if not isinstance(inputs, list | tuple):
|
|
1502
1502
|
inputs = [inputs]
|
|
1503
1503
|
|
|
1504
1504
|
# Wrap them in In or Out instances if needed.
|
|
@@ -1693,7 +1693,7 @@ def orig_function(
|
|
|
1693
1693
|
profile=None,
|
|
1694
1694
|
on_unused_input=None,
|
|
1695
1695
|
output_keys=None,
|
|
1696
|
-
fgraph:
|
|
1696
|
+
fgraph: FunctionGraph | None = None,
|
|
1697
1697
|
) -> Function:
|
|
1698
1698
|
"""
|
|
1699
1699
|
Return a Function that will calculate the outputs from the inputs.
|
|
@@ -1734,14 +1734,14 @@ def orig_function(
|
|
|
1734
1734
|
inputs = list(map(convert_function_input, inputs))
|
|
1735
1735
|
|
|
1736
1736
|
if outputs is not None:
|
|
1737
|
-
if isinstance(outputs,
|
|
1737
|
+
if isinstance(outputs, list | tuple):
|
|
1738
1738
|
outputs = list(map(FunctionMaker.wrap_out, outputs))
|
|
1739
1739
|
else:
|
|
1740
1740
|
outputs = FunctionMaker.wrap_out(outputs)
|
|
1741
1741
|
|
|
1742
1742
|
defaults = [getattr(input, "value", None) for input in inputs]
|
|
1743
1743
|
|
|
1744
|
-
if isinstance(mode,
|
|
1744
|
+
if isinstance(mode, list | tuple):
|
|
1745
1745
|
raise ValueError("We do not support the passing of multiple modes")
|
|
1746
1746
|
|
|
1747
1747
|
fn = None
|
|
@@ -1797,7 +1797,7 @@ def convert_function_input(input):
|
|
|
1797
1797
|
raise TypeError(f"A Constant instance is not a legal function input: {input}")
|
|
1798
1798
|
elif isinstance(input, Variable):
|
|
1799
1799
|
return In(input)
|
|
1800
|
-
elif isinstance(input,
|
|
1800
|
+
elif isinstance(input, list | tuple):
|
|
1801
1801
|
orig = input
|
|
1802
1802
|
if not input:
|
|
1803
1803
|
raise TypeError(f"Nonsensical input specification: {input}")
|
|
@@ -1806,7 +1806,7 @@ def convert_function_input(input):
|
|
|
1806
1806
|
input = input[1:]
|
|
1807
1807
|
else:
|
|
1808
1808
|
name = None
|
|
1809
|
-
if isinstance(input[0],
|
|
1809
|
+
if isinstance(input[0], list | tuple):
|
|
1810
1810
|
if len(input[0]) != 2 or len(input) != 2:
|
|
1811
1811
|
raise TypeError(
|
|
1812
1812
|
f"Invalid input syntax: {orig} (check "
|
|
@@ -1843,7 +1843,7 @@ def convert_function_input(input):
|
|
|
1843
1843
|
raise TypeError(
|
|
1844
1844
|
f"Unknown update type: {type(update)}, expected Variable instance"
|
|
1845
1845
|
)
|
|
1846
|
-
if value is not None and isinstance(value,
|
|
1846
|
+
if value is not None and isinstance(value, Variable | SymbolicInput):
|
|
1847
1847
|
raise TypeError(
|
|
1848
1848
|
f"The value for input {variable} should not be a Variable "
|
|
1849
1849
|
f"or SymbolicInput instance (got: {value})"
|
|
@@ -5,7 +5,7 @@ WRITEME
|
|
|
5
5
|
|
|
6
6
|
import logging
|
|
7
7
|
import warnings
|
|
8
|
-
from typing import Literal
|
|
8
|
+
from typing import Literal
|
|
9
9
|
|
|
10
10
|
from pytensor.compile.function.types import Supervisor
|
|
11
11
|
from pytensor.configdefaults import config
|
|
@@ -260,7 +260,7 @@ optdb.register(
|
|
|
260
260
|
# final pass just to make sure
|
|
261
261
|
optdb.register("merge3", MergeOptimizer(), "fast_run", "merge", position=100)
|
|
262
262
|
|
|
263
|
-
_tags:
|
|
263
|
+
_tags: tuple[str, str] | tuple
|
|
264
264
|
|
|
265
265
|
if config.check_stack_trace in ("raise", "warn", "log"):
|
|
266
266
|
_tags = ("fast_run", "fast_compile")
|
|
@@ -297,8 +297,8 @@ class Mode:
|
|
|
297
297
|
|
|
298
298
|
def __init__(
|
|
299
299
|
self,
|
|
300
|
-
linker:
|
|
301
|
-
optimizer:
|
|
300
|
+
linker: str | Linker | None = None,
|
|
301
|
+
optimizer: str | RewriteDatabaseQuery = "default",
|
|
302
302
|
db: RewriteDatabase = None,
|
|
303
303
|
):
|
|
304
304
|
if linker is None:
|
|
@@ -565,7 +565,7 @@ def get_target_language(mode=None) -> tuple[Literal["py", "c", "numba", "jax"],
|
|
|
565
565
|
if isinstance(linker, CLinker):
|
|
566
566
|
return ("c",)
|
|
567
567
|
|
|
568
|
-
if isinstance(linker,
|
|
568
|
+
if isinstance(linker, VMLinker | OpWiseCLinker):
|
|
569
569
|
return ("c", "py") if config.cxx else ("py",)
|
|
570
570
|
|
|
571
571
|
raise Exception(f"Unsupported Linker: {linker}")
|
|
@@ -105,7 +105,7 @@ def detect_nan(fgraph, i, node, fn):
|
|
|
105
105
|
|
|
106
106
|
for output in fn.outputs:
|
|
107
107
|
if (
|
|
108
|
-
not isinstance(output[0],
|
|
108
|
+
not isinstance(output[0], np.random.RandomState | np.random.Generator)
|
|
109
109
|
and np.isnan(output[0]).any()
|
|
110
110
|
):
|
|
111
111
|
print("*** NaN detected ***")
|