File size: 294 Bytes
877add7
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
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