Optional
Release identity and label coverage
Change the feature version while retaining weights. Inspect why the digest changes, then distinguish label coverage from accuracy. The six labels do not tell us whether any prediction is correct.
- Version
- v2
- Minutes
- ~20
- Evidence
- Self-check in the notebook
Until platform auto-check exists, compare cell output with the expected numbers in the notebook. This is not a debt and does not affect mastery.
Download the notebook and run it locally. Its environment requirements are listed inside.
Notebook contents
Readable on your phone. The code below has not been executed in the browser; download the notebook to run it.
Release identity and label coverage / Идентичность релиза и покрытие метками
Optional practice; Python standard library only. The core lesson does not require running code. No downloads, network, accounts, models, user data or actual deployments.
Необязательная практика; только стандартная библиотека Python. Для основной темы запуск кода не требуется. Без загрузок, сети, аккаунтов, моделей, пользовательских данных или реальных деплоев.
Authored for the Fedor Pakhurov project with Codex assistance. Case functions and fictional inputs come from the independently reviewed first-party note and fixture at published revision 82b6cb07167b37710c6a786a3a41878a4e928483. New packaging and exact-arithmetic self-checks are added here. No exclusive copyright guarantee is asserted.
The note retains primary conceptual citations; no external source-specific dataset, model output, figure or code is included.
Inputs and limits / Входы и границы
Change the feature version while retaining weights. Inspect why the digest changes, then distinguish label coverage from accuracy. The six labels do not tell us whether any prediction is correct.
Измените версию признаков при прежних весах. Проследите изменение digest и различите покрытие метками и accuracy. Шесть меток сами по себе не говорят, верен ли какой-нибудь прогноз.
import hashlib
import itertools
import json
import math
def digest(value):
data = json.dumps(value, sort_keys=True, separators=(",", ":")).encode()
return hashlib.sha256(data).hexdigest()
def lifecycle():
release = {"features": "contrast-v1", "weights": "fixture-score-v1",
"schema": "preview-v1", "threshold": 0.6}
next_release = {**release, "features": "contrast-v2"}
assert digest(release) != digest(next_release)
return {"release": release, "release_sha256": digest(release),
"feature_change_sha256": digest(next_release),
"joined_labels": 6, "submitted_documents": 8,
"mature_cohort_coverage": 6 / 8}result = lifecycle()
print(json.dumps(result, indent=2, allow_nan=False))Check independently / Независимая проверка
The checks below use conservation, exact arithmetic or boundary cases in addition to the case function. Passing them establishes these declared examples, not production reliability.
Ниже проверяются сохранение, точная арифметика или граничные случаи сверх функции примера. Их прохождение устанавливает эти заданные примеры, а не надёжность продакшена.
assert result["mature_cohort_coverage"] == 6 / 8
assert digest(dict(reversed(list(result["release"].items())))) == result["release_sha256"]
assert digest({**result["release"], "threshold": 0.7}) != result["release_sha256"]
assert result["joined_labels"] < result["submitted_documents"]
print("Self-checks passed: canonical identity changes; label coverage is not accuracy.")Change one assumption / Измените одно предположение
Try reordering the release fields and changing only the threshold. Explain which transformation changes the canonical bytes and why neither digest establishes quality.
Переставьте поля релиза и измените только порог. Объясните, какое преобразование меняет канонические байты и почему ни один digest не устанавливает качество.