Spaces:
Running on Zero
Running on Zero
Download tests/test_catalog.py from ArchitSharma/FeatureLens: direct link, hf CLI and curl.
- Browser
- Download file 476 Bytes
-
https://huggingface.co/spaces/ArchitSharma/FeatureLens/resolve/main/tests/test_catalog.py
- Command line
-
hf download hf://spaces/ArchitSharma/FeatureLens/tests/test_catalog.py
-
curl -L -o test_catalog.py https://huggingface.co/spaces/ArchitSharma/FeatureLens/resolve/main/tests/test_catalog.py
476 Bytes
| from __future__ import annotations | |
| from pathlib import Path | |
| from featurelens.catalog import FeatureCatalog | |
| def test_catalog_returns_best_hint(tmp_path: Path) -> None: | |
| (tmp_path / 'feature_catalog.csv').write_text( | |
| 'layer,concept,feature_id,auroc\n14,math,123,0.80\n14,code,123,0.65\n', | |
| encoding='utf-8', | |
| ) | |
| catalog = FeatureCatalog(tmp_path) | |
| assert catalog.hint(14, 123) == 'math (AUROC 0.80)' | |
| assert catalog.hint(4, 123) == 'unlabeled' | |