model_weights
Telemetry reporters for the host cache key and the model-weights sweep.
Both log one event through telemetry_logger and never raise.
Module
Functions
report_host_cache_key
def report_host_cache_key( *, outcome: "Literal['available', 'unavailable']", reason: HostCacheKeyReason | None, fetch_seconds: float | None,) ‑> None:Report whether the host's cache key was obtained. Never raises.
Arguments
outcome:"available"or"unavailable".reason: One of the fixed codes for why the key was unavailable, if it was; never free text.fetch_seconds: Time the request for the key took, if one was made.
report_model_weights_sweep
def report_model_weights_sweep( *, deleted: int, failed: int, bytes_reclaimed: int, legacy_deleted: int, kept_live: int,) ‑> None:Report the result of a model-weights store sweep. Never raises.
Arguments
deleted: Entries deleted.failed: Entries that could not be deleted.bytes_reclaimed: Bytes freed by the deletions.legacy_deleted: Of those deleted, entries in the legacy layout.kept_live: Entries kept because they are still in use.