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

Update call to psd_inv_cholesky to fix breaking change #71

Merged
merged 9 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -55,18 +55,13 @@ jobs:
matrix:
include:
- name-prefix: "all tests"
python-version: 3.8
python-version: '3.10'
os: ubuntu-latest
package-overrides: "none"
- name-prefix: "all tests"
python-version: 3.9
python-version: '3.11'
os: ubuntu-latest
package-overrides: "none"
- name-prefix: "with internal numpy"
python-version: 3.9
os: ubuntu-latest
# Test with numpy version that matches Google-internal version
package-overrides: "numpy==1.21.5"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -95,6 +90,6 @@ jobs:
run: |
python -m pytest
- name: Run multi-device tests
if: matrix.python-version == 3.8
if: matrix.python-version == '3.10'
run: |
FERMINET_CHEX_N_CPU_DEVICES=2 python -m pytest ferminet/tests/train_test.py
2 changes: 1 addition & 1 deletion ferminet/curvature_tags_and_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Scalar = kfac_jax.utils.Scalar
Numeric = kfac_jax.utils.Numeric

vmap_psd_inv_cholesky = jax.vmap(kfac_jax.utils.psd_inv_cholesky, (0, None), 0)
vmap_psd_inv = jax.vmap(kfac_jax.utils.psd_inv, (0, None), 0)
vmap_matmul = jax.vmap(jnp.matmul, in_axes=(0, 0), out_axes=0)


Expand Down
2 changes: 1 addition & 1 deletion ferminet/psiformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def make_fermi_net(
heads_dim=heads_dim,
mlp_hidden_dims=mlp_hidden_dims,
use_layer_norm=use_layer_norm,
)
) # pytype: disable=wrong-keyword-args

psiformer_layers = make_psiformer_layers(nspins, charges.shape[0], options)

Expand Down
Loading