Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GingerlyData247/SOTeam4-P2/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Path Parameters
The unique identifier of the model artifact to retrieve lineage for
Response
Returns a lineage graph with nodes and edges.Array of model nodes in the lineage graphNode Properties:
artifact_id(string): Unique identifier for this node. For models in the registry, this is the model ID. For external models, this is prefixed with “external:”name(string): Human-readable name of the model (usually the Hugging Face model ID)source(string): How this parent relationship was discovered (typically “config_json”)metadata(object): Additional metadata. External models include{"external": true}
Array of directed edges representing parent-child relationshipsEdge Properties:
from_node_artifact_id(string): The artifact ID of the parent modelto_node_artifact_id(string): The artifact ID of the child model (derived from the parent)relationship(string): Type of relationship, typically “base_model”
Parent Model Detection
Parent models are identified from structured metadata stored in the model’sconfig.json file. The system checks multiple fields:
base_modelteacher_modelparent_modelsource_modeloriginal_modelpretrained_model_name_or_path
Tree Score Calculation
Thetree_score metric (available via the /artifact/model/{id}/rate endpoint) uses lineage information to compute a quality score that incorporates ancestor model metrics:
- Compute the model’s own aggregate metric score
- Recursively walk the lineage tree to collect ancestor scores
- Combine the model’s score with the average ancestor score:
(own_score + avg_ancestor_score) / 2
Example Request
Example Response
Model with Registered Parent
Model with External Parent
Model with No Parents
Error Responses
Artifact not found - the specified model ID does not exist in the registry
Lineage Graph Structure
The lineage graph follows these principles:- Root node first: The requested model is always the first node in the array
- Directed edges: Edges point from parent (base model) to child (fine-tuned model)
- External dependencies: Models not in the registry are marked with
artifact_idprefix “external:” andmetadata.external = true - Single-level depth: Currently returns immediate parents only (not recursive ancestors)
- Deterministic: Same model ID always returns the same graph structure
Use Cases
- Model provenance: Track which base models were used to create fine-tuned models
- Quality assessment: Use lineage in combination with tree_score to evaluate model trustworthiness
- Dependency analysis: Identify external dependencies that may affect reproducibility
- Visualization: Build model family trees and lineage diagrams