-
Couldn't load subscription status.
- Fork 9
ekfac: fix compute_ekfac_ground_truth, add minimal CI #53
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
base: ekfac
Are you sure you want to change the base?
Conversation
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.
… a bit more specific
|
Looks great! I made minor edits. One more thing before merge, I think we could maybe keep an original version as notebook. At least for now it might be still helpful for more closer debugging |
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.
As discussed, I've added jupytext cell markers as an alternative, see 5e33a30 for the details and let me know if this seems usable to you. |
No description provided.