Closed kharitonov-ivan closed 2 years ago
So it should be possible to use TensorType for documentation purposes. But probably not to perform runtime type checking.
TorchTyping relies on its own type checker to make that happen, and monkey-patches that into typeguard. Probably we'd need to do something similar and monkey patch into pydantic etc. as well. But I'm not a user of that so it's hard to say.
If you figure out any neat way of tackling the problem I'd be happy to accept a PR.
Okay! Understood. Thank you for fast reply. I am closing the issue.
Hi! Is it an option to use the torchtyping annotations with other runtime type checkers instead of typeguard?
It is not directly related, but the question came up from the next case. For batch I use dataclass, and typeguard doesn't check in runtime constructor of dataclass. Maybe there is a more clever choice for from what inherit batch?