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

Update typing to use jaxtyping #24

Open
kazewong opened this issue Jun 1, 2024 · 0 comments
Open

Update typing to use jaxtyping #24

kazewong opened this issue Jun 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@kazewong
Copy link
Collaborator

kazewong commented Jun 1, 2024

Currently, the typing system does not leverage jaxtyping https://docs.kidger.site/jaxtyping/, which helps with static analysis.

For example, in the current typing scheme, a function could look something like

def f(x: Array) -> Array:
   ...

With jaxtyping, the function should look like:

def f(x: Float[Array, " n_samples"]) -> Float[Array, " n_samples"]:
   ...

which provides more information to the user as well. I think this is better considering the shape of array is usually very important.

@kazewong kazewong added the enhancement New feature or request label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant