parrt / tensor-sensor

The goal of this library is to generate more helpful exception messages for matrix algebra expressions for numpy, pytorch, jax, tensorflow, keras, fastai.
https://github.com/parrt/tensor-sensor
MIT License
794 stars 40 forks source link

Include dtype information #35

Closed sbrugman closed 2 years ago

sbrugman commented 3 years ago

Closes https://github.com/parrt/tensor-sensor/issues/25

parrt commented 3 years ago

Looking cool...I still need to think about how I'd viz this. Maybe the elem type goes in the box not outside, for example.

sbrugman commented 3 years ago

Discussion on that could go in the issue. With respect to implementation: this feature still needs testing, mention in documentation/examples.

sbrugman commented 3 years ago

Failing tests seem unrelated.

Two examples to for review.

Example 1 Legend No Legend
Dtypes example-dtype-legend-1.pdf example-dtype-no-legend-1.pdf
Shape example-shape-legend-1.pdf example-shape-no-legend-1.pdf
Example 2 Legend No Legend
Dtypes example-dtype-legend-2.pdf example-dtype-no-legend-2.pdf
Shape example-shape-legend-2.pdf example-shape-no-legend-2.pdf
parrt commented 2 years ago

Ok, took me a second, but I managed to find a combination of versions that make the tests pass (python 3.9)! @sbrugman you can pull from master to grab these

sbrugman commented 2 years ago

Ready for review, legend improved over the last time we spoke

parrt commented 2 years ago

sounds good @sbrugman ... I am writing my final exam and hoping to catch up shortly...

parrt commented 2 years ago

Trying it out now :)

parrt commented 2 years ago

I have to clean up AST viz but about ready! Thanks for the help!