Skip to content

Commit

Permalink
try partial cache restore
Browse files Browse the repository at this point in the history
  • Loading branch information
chanind committed Apr 11, 2024
1 parent 89e1568 commit 392f982
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
venv-${{ runner.os }}-${{ matrix.python-version }}-
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/training/test_sparse_autoencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def test_per_item_mse_loss_with_norm_matches_original_implementation() -> None:
/ (target_centered**2).sum(dim=-1, keepdim=True).sqrt()
)
sae_res = _per_item_mse_loss_with_target_norm(input, target)
assert torch.allclose(orig_impl_res, sae_res)
assert torch.allclose(orig_impl_res, sae_res, atol=1e-5)


def test_SparseAutoencoder_remove_gradient_parallel_to_decoder_directions() -> None:
Expand Down

0 comments on commit 392f982

Please sign in to comment.