polyguard-openenv-workbench / polyguard-rl /tests /test_checkpoint_integrity.py
TheJackBright's picture
Deploy GitHub root master to Space
c296d62
from pathlib import Path
from app.training.checkpointing import load_checkpoint, save_checkpoint
def test_checkpoint_roundtrip(tmp_path: Path) -> None:
ckpt = tmp_path / "ckpt.json"
save_checkpoint(ckpt, {"a": 1, "b": "x"})
data = load_checkpoint(ckpt)
assert data["a"] == 1