Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conceptual intro #12

Open
ricardoV94 opened this issue Jan 13, 2025 · 0 comments
Open

Conceptual intro #12

ricardoV94 opened this issue Jan 13, 2025 · 0 comments

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Jan 13, 2025

What is PyTensor

A library to define and manipulate array-based computational graphs

  • Represent numpy-like computations in a graph composed of Python objects
  • Manipulate graph at the Python level for:
    • Optimization and stabilization
    • Automatic differentiation
    • Vectorization and "Scalarization"
    • Anything else: Shape inference, logp inference
  • Compile to performant non-python backends: C, Numba, JAX, PyTorch (or just vanilla numpy)

How does it compare with other frameworks

  • Analogy with Sympy
  • Graph is specified explicitly and with placeholder inputs
  • It is focused on array (tensor) operations (dense and sparse). Narrow/hidden support for other types like scalars, lists, slices, random Generators, strings, None (although easy to extend)
  • Side-effects free from the user perspective
  • EVERYTHING IS LAZY!
  • Trivial support for "partialling" / subgraph extraction.
  • Strong focus on hackability / user-defined rewrites
  • It's completely ours! (And nobody else uses it)
  • Evolved from:
    1. Theano which strongly inspired Tensorflow 1.x and JAX. Many concepts stood the test of time. Others have aged and provide some drag.
    2. Aesara, which cleaned up the codebase, added alternative backends (Numba and JAX) and proved there's some interest out there in a library like this.
@ricardoV94 ricardoV94 changed the title Conceptual intro to PyTensor Conceptual intro Jan 13, 2025
@ricardoV94 ricardoV94 mentioned this issue Jan 15, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant