jaxtyping
madtypes
jaxtyping | madtypes | |
---|---|---|
8 | 2 | |
1,305 | 4 | |
5.1% | - | |
8.2 | 8.1 | |
1 day ago | over 1 year ago | |
Python | Python | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jaxtyping
-
Python type hints may not be not for me in practice
You want runtime typechecking.
See either beartype [1] or typeguard [2]. And if you're doing any kind of array-based programming (JAX or not), then jaxtyping [3].
[1] https://github.com/beartype/beartype/
[2] https://github.com/agronholm/typeguard
[3] https://github.com/patrick-kidger/jaxtyping
-
Writing Python like it's Rust
Try using [jaxtyping](https://github.com/google/jaxtyping).
It also supports numpy/pytorch/etc.
-
Writing Python like it’s Rust
Since you mention ML use-cases, you might like jaxtyping.
-
Scientific computing in JAX
jaxtyping: rich shape & dtype annotations for arrays and tensors (also supports PyTorch/TensorFlow/NumPy);
-
[D] Have their been any attempts to create a programming language specifically for machine learning?
Heads-up that my newer jaxtyping project now exists.
-
Returning to snake's nest after a long journey, any major advances in python for science ?
As other folks have commented, type hints are now a big deal. For static typing the best checker is pyright. For runtime checking there is typeguard and beartype. These can be integrated with array libraries through jaxtyping. (Which also works for PyTorch/numpy/etc., despite the name.)
- Type annotations and runtime checking for shape and dtype
madtypes
- Show HN: Python class typing that raises TypeError at runtime
-
Writing Python like it's Rust
Hei !
This comment inspired me because I was working on data-types at my company at the moment and I realized how static typing would have really benefited us.
So I made a library that does just that !
https://github.com/6r17/madtypes
I hope this will help some people !
What are some alternatives?
torchtyping - Type annotations and dynamic checking for a tensor's shape, dtype, names, etc.
mypy - Optional static typing for Python
plum - Multiple dispatch in Python
pylance-release - Documentation and issues for Pylance
pytype - A static type analyzer for Python code
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
tiny-cuda-nn - Lightning fast C++/CUDA neural network framework
sdk - Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
diffrax - Numerical differential equation solvers in JAX. Autodifferentiable and GPU-capable. https://docs.kidger.site/diffrax/
mypyc - Compile type annotated Python to fast C extensions
MindsDB - AGI's query engine - Platform for building AI that can learn and answer questions over federated data.
pyre-check - Performant type-checking for python.