We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a function with signature:
from typing import Union from jaxtyping import Float, jaxtyped from typeguard import typechecked @jaxtyped @typechecked def fn(x: Union[Float[torch.Tensor, "B F"], int]): ...
which doesn't work. It fails to compile the AST
The text was updated successfully, but these errors were encountered:
What version of typeguard? I think this was a bug in earlier versions of typeguard.
Sorry, something went wrong.
4.1.0
Thanks!
Looks like this is still an outstanding bug in typeguard. Here's a reproducer that doesn't use jaxtyping:
import numpy as np from typeguard import typechecked from typing import Annotated, Union @typechecked def fn(x: Union[Annotated[np.ndarray, "B F"], int]): ...
I'd recommend reporting this as a bug on their issue tracker.
As a workaround for now, I'd recommend either downgrading to typeguard 2.*, or to use beartype instead.
typechecked
TypeError: <module '__main__'> is a built-in module
No branches or pull requests
I have a function with signature:
which doesn't work. It fails to compile the AST
The text was updated successfully, but these errors were encountered: