File tree Expand file tree Collapse file tree 3 files changed +32
-3
lines changed
Expand file tree Collapse file tree 3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Tests
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v3
14+
15+ - name : Set up Python
16+ uses : actions/setup-python@v3
17+ with :
18+ python-version : ' 3.10'
19+
20+ - name : Install dependencies
21+ run : |
22+ python -m pip install --upgrade pip
23+ pip install ".[dev]"
24+
25+ - name : Run tests
26+ run : pytest
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def load_sparse_coders(
2828
2929 # Add SAE hooks to the model
3030 if "gemma" not in run_cfg .sparse_model :
31- hookpoint_to_sae_encode = load_sparsify_sparse_coders (
31+ hookpoint_to_sparse_encode = load_sparsify_sparse_coders (
3232 model ,
3333 run_cfg .sparse_model ,
3434 run_cfg .hookpoints ,
@@ -54,7 +54,7 @@ def load_sparse_coders(
5454 sae_sizes .append (sae_size )
5555 l0s .append (l0 )
5656
57- hookpoint_to_sae_encode = load_gemma_autoencoders (
57+ hookpoint_to_sparse_encode = load_gemma_autoencoders (
5858 model_path = model_path ,
5959 ae_layers = layers ,
6060 average_l0s = l0s ,
@@ -64,4 +64,4 @@ def load_sparse_coders(
6464 device = model .device ,
6565 )
6666
67- return hookpoint_to_sae_encode
67+ return hookpoint_to_sparse_encode
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ dependencies = [
2525 " sentence_transformers"
2626]
2727
28+ [project .optional-dependencies ]
29+ dev = [" pytest" ]
30+
2831[tool .pyright ]
2932include = [" delphi*" ]
3033reportPrivateImportUsage = false
You can’t perform that action at this time.
0 commit comments