Download code/evaluation/tests/test_cpu_diversity_guard.py from luyu1021/turbot2va-ltx2: direct link, hf CLI and curl.
- Browser
- Download file 607 Bytes
-
https://huggingface.co/luyu1021/turbot2va-ltx2/resolve/main/code/evaluation/tests/test_cpu_diversity_guard.py
- Command line
-
hf download hf://luyu1021/turbot2va-ltx2/code/evaluation/tests/test_cpu_diversity_guard.py
-
curl -L -o test_cpu_diversity_guard.py https://huggingface.co/luyu1021/turbot2va-ltx2/resolve/main/code/evaluation/tests/test_cpu_diversity_guard.py
607 Bytes
| import argparse | |
| import sys | |
| import unittest | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "scripts")) | |
| from run_diversity_probe import run # noqa: E402 | |
| class CpuDiversityGuardTest(unittest.TestCase): | |
| def test_cpu_must_score_existing_only_before_any_file_access(self): | |
| with self.assertRaisesRegex(ValueError, "requires --score-existing-only"): | |
| run(argparse.Namespace(cpu=True, score_existing_only=False, | |
| limit=200, num_seeds=8, batch_size=1, num_workers=0)) | |
| if __name__ == "__main__": | |
| unittest.main() | |