tinyviz
Graph recorder and visualization helpers for tinygrad tensors.
Code for the Image
Note the order of execution and the variable names in the image from the code
def add_stuff(a, b):
c = a * b
d = a * c
return d
a1 = Tensor([[1, 2], [1, 3]])
b1 = Tensor([-10, 255])
z = a1 * a1
add_stuff(a1, b1)
Installation
pip install tinyviz
Usage
from tinygrad import Tensor
from tinyviz import graph
# Record tensor operations
with graph:
a = Tensor([[1, 2], [3, 4]])
b = Tensor([[5, 6], [7, 8]])
c = a + b
d = c * a
# Display the graph in Jupyter
graph
Features
- Automatic operation recording: Tracks tensor operations inside context managers
- Beautiful visualizations: Clean, dark-themed graphs with color-coded values
- Jupyter integration: Displays directly in notebooks
- Variable name inference: Automatically captures tensor names from your code
- Multiple themes: Switch between dark and light modes
API
Context Manager
with graph:
result = my_computation()
graph # Display
Reset
graph.reset()
Decorator
@graph.capture
def my_function(x, y):
return x + y
Manual Control
graph.start()
result = my_computation()
graph.stop()
graph # Display
Theme Control
graph.dark() # Dark theme (default)
graph.light() # Light theme
License
Apache 2.0
Metadata
Release files for tinyviz 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tinyviz-0.1.1.tar.gz | 355.0 kB | Without provenance | Details for tinyviz-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tinyviz-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for tinyviz-0.1.1-py3-none-any.whl |
Total release size: 373.0 kB
Release files / tinyviz-0.1.1.tar.gz
| Download URL | tinyviz-0.1.1.tar.gz |
|---|---|
| Size | 355.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f118b30b13cefcc3dc9bf6e75ea161e23641bf01665a0b1cd123384804e43c4e
|
|
BLAKE2b-256 checksum How to use checksums |
b0ae8eac6d3dcff8f576ec7d7247b62deb8b1cfdb5ae7152a6f9d2c72d757843
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / tinyviz-0.1.1-py3-none-any.whl
| Download URL | tinyviz-0.1.1-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09463487e21dcdec92599fd5a3e653cf058651fc084def60735531328e93c125
|
|
BLAKE2b-256 checksum How to use checksums |
77c69474bd107e42c49d1cafeed131e3b19095f4d86590b4e2cd3418d9faddac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for tinyviz 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.