Skip to content

fixes import of eig from fmmax.utils to fmmax.eig #41

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

Merged
merged 2 commits into from
Mar 19, 2025

Conversation

julian-urban
Copy link
Contributor

The location of the eig function in fmmax changed from fmmax.utils.eig to fmmax.eig.eig in version 1.0.0. This causes the following error when installing thermox with pip and importing it:

>>> import thermox
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import thermox
  File "/home/julian/.conda/envs/thermox/lib/python3.13/site-packages/thermox/__init__.py", line 1, in <module>
    from thermox import linalg
  File "/home/julian/.conda/envs/thermox/lib/python3.13/site-packages/thermox/linalg.py", line 4, in <module>
    from thermox.sampler import sample, sample_identity_diffusion
  File "/home/julian/.conda/envs/thermox/lib/python3.13/site-packages/thermox/sampler.py", line 6, in <module>
    from thermox.utils import (
    ...<4 lines>...
    )
  File "/home/julian/.conda/envs/thermox/lib/python3.13/site-packages/thermox/utils.py", line 4, in <module>
    from fmmax.utils import (
    ^^^^^^^^^^^^^^^^^^^^^^^^^
        eig,
        ^^^^
    )  # differentiable and jit-able eigendecomposition, not yet available in jax, see https://github.com/google/jax/issues/2748
    ^
ImportError: cannot import name 'eig' from 'fmmax.utils' (/home/julian/.conda/envs/thermox/lib/python3.13/site-packages/fmmax/utils.py)

This trivial PR fixes the above issue. I ran pre-commit run --all-files and everything passed.

Copy link
Contributor

@KaelanDt KaelanDt left a comment

Choose a reason for hiding this comment

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

Thank you for the fix, much appreciated!

@SamDuffield
Copy link
Contributor

Let's also bump the fmmax requirement in pyproject.toml 😁

@SamDuffield SamDuffield merged commit fd6a8b8 into normal-computing:main Mar 19, 2025
2 checks passed
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.

3 participants