You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(I wasn't sure if this was the ~same as #10812 so I figured opening a new issue wouldn't hurt)
When using torchtyping, it's common to write annotations like TensorType["batch", "x_channels"]. ruff doesn't like that because of the quoted "batch" and "x_channels" (and removes the quote with autofix, leading to invalid code).
For now, we're resorting to # noqa, but I wonder if this is something ruff can handle.
The text was updated successfully, but these errors were encountered:
Does not answer your question, but torchtyping is currently in an almost deprecated state: prefer to use jaxtyping (it supports typing of anything numpy-ish, but the name is slightly misleading).
I think at some point I was reading some stuff from Patrick (the author of torchtyping) about what he uses in his workflow, and his observation was that most static analysis tools work poorly with his typing libraries, so the main intent behind using the type annotations was to use them with beartype, a runtime typechecker.
(I wasn't sure if this was the ~same as #10812 so I figured opening a new issue wouldn't hurt)
When using torchtyping, it's common to write annotations like
TensorType["batch", "x_channels"]
. ruff doesn't like that because of the quoted"batch"
and"x_channels"
(and removes the quote with autofix, leading to invalid code).For now, we're resorting to
# noqa
, but I wonder if this is something ruff can handle.The text was updated successfully, but these errors were encountered: