23 lines
477 B
Python
23 lines
477 B
Python
"""Adapter stamps. Training and serving stay gaps."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
from lead.model import MODEL_GAPS, stamp
|
|
|
|
|
|
def test_stamp_joins_the_weights_hash_and_the_adapter_version():
|
|
assert stamp("abc", "v1") == "abc+v1"
|
|
|
|
|
|
def test_a_stamp_needs_both_halves():
|
|
with pytest.raises(ValueError):
|
|
stamp("", "v1")
|
|
with pytest.raises(ValueError):
|
|
stamp("abc", "")
|
|
|
|
|
|
def test_model_gaps_are_recorded():
|
|
assert MODEL_GAPS
|