Hey all,

We've finally managed to open-source our library for shape annotations of tensors! It allows you to write code like

import tensor_annotations.tensorflow as ttf
from tensor_annotations.axes import Batch, Time

def get_batch() -> ttf.Tensor2[Time, Batch]: ...
def train(batch: ttf.Tensor2[Batch, Time]): ...

batch = get_batch()
train(batch)

and run e.g. Mypy on it to detect errors like

test.py:6: error: Argument 1 to "train" has incompatible type "Tensor2[Time, Batch]"; expected "Tensor2[Batch, Time]"

Check it out at https://github.com/deepmind/tensor_annotations. We'd love to hear your feedback, so give it a try and let us know what you think!

It would be great to discuss folks' experiences with it at the next tensor typing meeting, but even if we were to do it at the earliest next week, that's starting to feel a little too close to the holiday season. So let's wait until the new year - tentatively aiming for Monday the 11th of January for our next meeting.

Until then - happy holidays, all!
Matthew