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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ docs/source/generated
**.orig
.venv
.env
transformer_lens/tools/model_registry/data/verification_checkpoint.json
9 changes: 9 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import gc
import random
import tempfile
from pathlib import Path

import numpy as np
import pytest
Expand Down Expand Up @@ -49,3 +51,10 @@ def pytest_sessionfinish(session, exitstatus):
if torch.cuda.is_available():
torch.cuda.empty_cache()
gc.collect()


@pytest.fixture
def temp_dir():
"""Create a temporary directory for test files."""
with tempfile.TemporaryDirectory() as tmpdir:
yield Path(tmpdir)
Empty file added tests/unit/tools/__init__.py
Empty file.
Loading