jbloomAus / SAELens

Training Sparse Autoencoders on Language Models
https://jbloomaus.github.io/SAELens/
MIT License
481 stars 127 forks source link

Add tests for evals #346

Closed anthonyduong9 closed 1 month ago

anthonyduong9 commented 1 month ago

Description

Adds unit tests for all_loadable_saes() and get_saes_from_regex(), and another test for run_evals(). There's no coverage for the first two functions, and there's no coverage for single_head_replacement_hook() and single_head_zero_ablate_hook() defined inside of the third function, at https://app.codecov.io/gh/jbloomAus/SAELens/blob/main/sae_lens%2Fevals.py.

Fixes #82

Type of change

Please delete options that are not relevant.

Checklist:

You have tested formatting, typing and unit tests (acceptance tests not currently in use)

Performance Check.

If you have implemented a training change, please indicate precisely how performance changes with respect to the following metrics:

Please links to wandb dashboards with a control and test group.