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

internal _typeguard not picked up by install_import_hook #274

Open
phinate opened this issue Nov 21, 2024 · 1 comment
Open

internal _typeguard not picked up by install_import_hook #274

phinate opened this issue Nov 21, 2024 · 1 comment
Labels
question User queries

Comments

@phinate
Copy link
Contributor

phinate commented Nov 21, 2024

Hi Patrick! With the recent shipping of typeguard in jaxtyping as of this recent commit, I'm getting ModuleNotFoundError: No module named 'typeguard' in the context of

with install_import_hook("...", "typeguard.typechecked"):
    ...

Am I doing things right here? If it was desired to pick up the internally shipped typeguard, then maybe doing some sort of check here to see if there's a typeguard version in the env already (and use jaxtyping._typeguard if not) would be useful.

What do you think?

@patrick-kidger
Copy link
Owner

This is working as intended! If you want to use typeguard then install it directly as you would normally, pretty much just like you would have done before.

The vendored version exists just to ease compatibility issues, it's not meant to be used in this way :)

@patrick-kidger patrick-kidger added the question User queries label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question User queries
Projects
None yet
Development

No branches or pull requests

2 participants