Skip to content

Conversation

@smarter
Copy link

@smarter smarter commented Nov 11, 2025

This includes using fixtures for ground truth generation and test configuration,
so that we can just do:

uv run pytest -sv tests/ekfac_tests

and ground truth will be auto-generated.

Additionally, this required adding a pass/fail threshold to tests/ekfac_tests/test_eigenvalue_correction.py.

I haven't tested test_apply_ekfac yet.

The keyword parameter `dtype` for AutoModelForCausalLM.from_pretrained does not
exist in version 4.54.1 which was present in uv.lock (this parameter used to be
called `torch_dtype` which is now a deprecated alias).
Also rework default handling to avoid specifying default values in multiple places.
…ection)

This way when we start using pytest, test failures will be properly reported.

test_eigenvalue_correction had no explicit criterion for success so I made one
up.
This includes using fixtures for ground truth generation and test configuration,
so that we can just do:

uv run pytest -sv tests/ekfac_tests

and ground truth will be auto-generated.
Ran "uv pre-commit run --all-files" which reads from .pre-commit-config.yaml

Unfortunately pre-commit does not respect tool settings in pyproject.toml, so
right now there's conflicting informations in pyproject.toml and
.pre-commit-config.yaml and so different settings and tool versions used
depending on how we run tools.
test_eigenvalue_corrections had to be disabled due to precision errors:

  h.6.attn.attention.out_proj: max_rel_diff=2.285%
  h.6.mlp.c_proj: max_rel_diff=3.599%
  h.7.attn.attention.out_proj: max_rel_diff=4.041%
  h.7.mlp.c_proj: max_rel_diff=2.204%
It seems the working-directory parameter in the CI config is ignored if
pyproject.toml configures pyright, so tweak that instead.
Overwriting is allowed using the --overwrite flag.
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.

2 participants