Composition model
Composition is based on generic I/O types (contracts.io_types), not proprietary ontology chains.
Vocabulary
Section titled “Vocabulary”Examples: material_rows, embeddings, vector_rows, cluster_labels,
cluster_rows, graph_edges, metric_scalar, dataset_rows.
Aliases (symmetric):
embeddings↔vector_rowscluster_labels↔cluster_rowsmaterial_rows↔dataset_rows
Queries
Section titled “Queries”from drtoller.framework.capability import ( get_contract, can_compose, compatible_consumers, assert_compatible, build_catalog,)
embed = get_contract("sgns_v1", kind="algorithm")cluster = get_contract("minibatch_kmeans_v1", kind="algorithm")assert can_compose(embed, cluster)
consumers = compatible_consumers(embed, build_catalog().primitives)assert_compatible(embed, cluster) # raises INCOMPATIBLE_INPUT if not- Do not hard-code domain pipelines (lemma → descriptor → …) in Framework.
- Proprietary ontology steps stay outside OSS Framework catalogs.
- Invalid chains fail with structured
INCOMPATIBLE_INPUTerrors. - Evaluation patterns validate metric method ↔
artifact_kindcompatibility the same way.