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

Fix jax dependency issue when jaxlib is not installed. #191

Merged
merged 1 commit into from
Mar 8, 2024
Merged

Fix jax dependency issue when jaxlib is not installed. #191

merged 1 commit into from
Mar 8, 2024

Conversation

ar0ck
Copy link
Contributor

@ar0ck ar0ck commented Mar 7, 2024

@@ -192,6 +192,7 @@ def f(...): ...
if (
_tb_flag
and importlib.util.find_spec("jax") is not None
and importlib.util.find_spec("jaxlib") is not None
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also considered:

if _tb_flag:
    try:
        import jax._src.traceback_util as traceback_util
    except ModuleNotFoundError:
        pass
    else:
        traceback_util.register_exclusion(__file__)
        _tb_flag = False

@patrick-kidger patrick-kidger merged commit 696cc5b into patrick-kidger:main Mar 8, 2024
1 check passed
@patrick-kidger
Copy link
Owner

This LGTM! Thank you for the fix.

@ar0ck ar0ck deleted the jaxlib-fix branch March 8, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants