google-deepmind / ferminet

An implementation of the Fermionic Neural Network for ab-initio electronic structure calculations
Apache License 2.0
740 stars 129 forks source link

Update call to `psd_inv_cholesky` to fix breaking change #71

Closed gcassella closed 11 months ago

gcassella commented 1 year ago

Closes #70

gcassella commented 1 year ago

Tests are now failing due to

ferminet/tests/train_test.py:25: in <module>
    from ferminet import train
ferminet/train.py:24: in <module>
    from ferminet import checkpoint
ferminet/checkpoint.py:24: in <module>
    from ferminet import networks
ferminet/networks.py:21: in <module>
    from ferminet import envelopes
ferminet/envelopes.py:21: in <module>
    from ferminet import curvature_tags_and_blocks
ferminet/curvature_tags_and_blocks.py:76: in <module>
    class QmcBlockedDense(kfac_jax.TwoKroneckerFactored):
ferminet/curvature_tags_and_blocks.py:144: in QmcBlockedDense
    exact_powers: set[kfac_jax.utils.Scalar],
E   TypeError: 'type' object is not subscriptable
gcassella commented 1 year ago

Tests are still failing because the codebase now uses union type hints (X | Y) which were introduced in Python 3.10, but the test suite runs on python 3.8.

gcassella commented 1 year ago

Just to confirm -- tests are now all passing on my local machine w/ Python 3.10

jsspencer commented 1 year ago

Just to confirm -- tests are now all passing on my local machine w/ Python 3.10

Yeah, we should drop 3.8 and 3.9 in https://github.com/google-deepmind/ferminet/blob/main/.github/workflows/ci-build.yaml and use 3.10 and 3.11 instead.