metadata
Classes
Metadata-only cache slot for teacher hidden states or prefix activations. |
|
Create manifest-backed cache directories for future tensor-backed reuse. |
- class EvaluationCacheSlot
Bases:
objectMetadata-only cache slot for teacher hidden states or prefix activations.
- __init__(*, kind, cache_id, path, manifest)
- Parameters:
kind (str)
cache_id (str)
path (Path)
manifest (dict[str, Any])
- Return type:
None
- cache_id: str
- kind: str
- manifest: dict[str, Any]
- property manifest_path: Path
- path: Path
- to_dict()
- Return type:
dict[str, Any]
- class EvaluationMetadataCache
Bases:
objectCreate manifest-backed cache directories for future tensor-backed reuse.
These slots intentionally store metadata only. They give Stage 6/7 callers a stable identity and directory contract before the real tensor cache exists.
- __init__(root)
- Parameters:
root (str | Path)
- evict_expired_prefixes()
- Return type:
list[str]
- prepare_prefix(inputs, settings=None, *, metadata=None, ttl_seconds=None)
- Parameters:
inputs (Any)
settings (Any | None)
metadata (dict[str, Any] | None)
ttl_seconds (int | None)
- Return type:
- Parameters:
inputs (Any)
settings (Any | None)
metadata (dict[str, Any] | None)
- Return type: