Skip to content

Conversation

@LouisYRYJ
Copy link
Contributor

@LouisYRYJ LouisYRYJ commented Jun 22, 2025

This introduces EKFAC computations, everything relevant is in /hessians

  • ignore /approx_unrolling for this PR
  • gradient_covariance files in hessians are for debugging, ignore these too
  • I mostly followed the build_index pipeline
  • Currently, we should not merge this, because it uses the current version main and not the ultrafast one
    ->As I refactored some parts of the general pipeline, we should probably merge ultrafast first and then I can make the changes to this PR.

@CLAassistant
Copy link

CLAassistant commented Jun 22, 2025

CLA assistant check
All committers have signed the CLA.

LouisYRYJ and others added 30 commits August 15, 2025 11:35
This will make future diffs easier to read. Done using:
uv run --with jupyter jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace tests/ekfac_tests/compute_ekfac_ground_truth.ipynb
This class was removed in 8232b77 but the
notebook code was not adapted.
This cell contains code from tests/ekfac_tests/test_covariance.py but fails with
file not found errors and isn't actually needed in the rest of the notebook.
This makes it easier to run the script on a small GPU for testing.
This is adapted from the main branch of bergson.
Use jupytext percent format which is directly interpretable by vscode (and can
also be converted into ipynb using `jupytext --to notebook`).

We want compute_ekfac_ground_truth to be:
- Importable from other files. So it should be split in functions and importing
  it shouldn't have side-effects.
- Usable a script we run from. So it should have a main that parses input
  arguments and run everything.
- Usable as a notebook. So it should be split into cells where each cell can be
  executed individually and produce some output.

To gain back usability as a notebook without compromising the other usecases, we
split the logic that used to be in `main()` in multiple statements guarded by
`if __name__ == "__main__"` at the end of the cell that defines the relevant
function (since each of these guarded statement defines some variable, we
actually need `or TYPE_CHECKING` to ensure they are visible to the typechecker).
All covariance-related cells are next to each other, same for all
eigendecomposition-related code.
ekfac: fix compute_ekfac_ground_truth, add minimal CI
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.

5 participants