turbot2va-ltx2 / code /evaluation /tests /test_cpu_diversity_guard.py
luyu1021's picture
Add documented LTX-2 training source, recipes and checkpoint release plan
76b7b25 verified
Raw History Blame Contribute Delete
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()