Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -40,7 +40,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.12"
- name: Install dependencies
run: pip install build twine
- name: Semantic Release
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@

@pytest.fixture(scope="module")
def tokenizer() -> PreTrainedTokenizer | PreTrainedTokenizerFast:
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-160m")
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-70m")
tokenizer.pad_token = tokenizer.eos_token
return tokenizer


@pytest.fixture(scope="module")
def model() -> PreTrainedModel:
model = AutoModel.from_pretrained("EleutherAI/pythia-160m")
model = AutoModel.from_pretrained("EleutherAI/pythia-70m")
return model


Expand Down Expand Up @@ -73,7 +73,7 @@ def cache_setup(tmp_path_factory, mock_dataset: torch.Tensor, model: PreTrainedM
sampler_cfg=SamplerConfig(),
cache_cfg=cache_cfg,
model="EleutherAI/pythia-160m",
sparse_model="EleutherAI/sae-pythia-160m-32k",
sparse_model="EleutherAI/sae-pythia-70m-32k",
hookpoints=["layers.1"],
)
hookpoint_to_sparse_encode, _ = load_hooks_sparse_coders(model, run_cfg_gemma)
Expand Down
3 changes: 1 addition & 2 deletions tests/test_latents/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def test_config_file(cache_setup: dict[str, Any]):
with open(config_path, "r") as f:
config = json.load(f)
cache_cfg = cache_setup["cache_cfg"]

assert config["batch_size"] == cache_cfg.batch_size, "Config batch_size mismatch"
assert config["cache_ctx_len"] == cache_cfg.cache_ctx_len, "Cache_ctx_len mismatch"
assert config["cache_ctx_len"] == cache_cfg.cache_ctx_len, "ctx_len mismatch"
assert config["n_tokens"] == cache_cfg.n_tokens, "Config n_tokens mismatch"
1 change: 0 additions & 1 deletion tests/test_latents/test_constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def test_save_load_cache(
tokens: Int[Tensor, "examples ctx_len"] = dataset.load_tokens() # type: ignore
assert (tokens == cache_setup["tokens"][: len(tokens)]).all()
for record in dataset:
print(record)
assert len(record.train) <= sampler_cfg.n_examples_train
assert len(record.test) <= sampler_cfg.n_examples_test

Expand Down