Functions
FUNC validate_revision
revision parameter takes a
branch name, tag, or commit SHA; this validator mirrors that contract.
Catalogue entries pin to commit SHAs by convention; that is enforced by
review and (optionally) build-time drift checks rather than by this
validator.
Args:
revision: Any non-empty string accepted by HuggingFace as a revision (branch name, tag, or commit SHA).
- The validated revision unchanged.
ValueError: Ifrevisionis empty or whitespace-only.
FUNC known_intrinsic_names
- List of all known user-visible intrinsic names.
FUNC fetch_intrinsic_metadata
intrinsic_name: User-visible name of the intrinsic.
- Metadata about the adapter(s) that implement the intrinsic.
ValueError: Ifintrinsic_nameis not a known intrinsic name.
Classes
CLASS AdapterType
Possible types of adapters for a backend.
Attributes:
LORA: Standard LoRA adapter; value"lora".ALORA: Activated LoRA adapter; value"alora".
CLASS IntriniscsCatalogEntry
A single row in the main intrinsics catalog table.
We use Pydantic for this dataclass because the rest of Mellea also uses Pydantic.
Attributes:
name: User-visible name of the intrinsic.internal_name: Internal name used for adapter loading, orNoneif the same asname.repo_id: HuggingFace repository where adapters for the intrinsic are located.revision: HuggingFace revision — branch name, tag, or commit SHA. Catalogue entries pin to commit SHAs by convention so loads are reproducible; the validator itself only requires a non-empty string. Note: this field is stored in the catalogue but not yet forwarded to the HuggingFace download call; wiring it through is deferred to a subsequent phase of the adapter-lifecycle epic (#929).adapter_types: Adapter types known to be available for this intrinsic; defaults to(AdapterType.LORA, AdapterType.ALORA).