calibrate

This commit is contained in:
2026-10-06 17:58:35 +03:00
parent 86222f5f93
commit 476cfe0b17
21 changed files with 1666 additions and 14 deletions
+8
View File
@@ -32,6 +32,14 @@ def post_verify(client, probe: bytes, references: list[tuple[str, bytes, str]],
)
def post_calibrate(client, positives: list[tuple[str, bytes, str]],
negatives: list[tuple[str, bytes, str]]):
"""Пачки калибровки — списки (имя, байты, content_type)."""
files = [("positive", p) for p in positives]
files += [("negative", n) for n in negatives]
return client.post("/api/v1/calibrate", headers=API_KEY_HEADERS, files=files)
def make_blob_ref(blob: bytes) -> tuple[str, bytes, str]:
return ("reference.npz", blob, "application/octet-stream")