mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-09-21 17:00:50 +02:00
168 lines
6.2 KiB
JSON
168 lines
6.2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://obliteratus.dev/schemas/conversion-manifest-v1.schema.json",
|
|
"title": "OBLITERATUS Checkpoint Conversion Manifest v1",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"schema_id",
|
|
"schema_version",
|
|
"manifest_id",
|
|
"descriptor",
|
|
"source_inventory_digest",
|
|
"source_files",
|
|
"adapter",
|
|
"source_topology",
|
|
"state",
|
|
"dropped_scopes",
|
|
"canonical_output",
|
|
"resource_usage",
|
|
"validation",
|
|
"provenance",
|
|
"publication"
|
|
],
|
|
"properties": {
|
|
"schema_id": {"const": "obliteratus.conversion-manifest"},
|
|
"schema_version": {"const": "1.0.0"},
|
|
"manifest_id": {"$ref": "#/$defs/id"},
|
|
"descriptor": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema_version", "digest"],
|
|
"properties": {
|
|
"schema_version": {"const": "1.0.0"},
|
|
"digest": {"$ref": "#/$defs/digest"}
|
|
}
|
|
},
|
|
"source_inventory_digest": {"$ref": "#/$defs/digest"},
|
|
"source_files": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {"$ref": "#/$defs/file"}
|
|
},
|
|
"adapter": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "version", "capability_digest", "producer", "producer_version"],
|
|
"properties": {
|
|
"id": {"$ref": "#/$defs/id"},
|
|
"version": {"$ref": "#/$defs/id"},
|
|
"capability_digest": {"$ref": "#/$defs/digest"},
|
|
"producer": {"$ref": "#/$defs/id"},
|
|
"producer_version": {"$ref": "#/$defs/id"}
|
|
}
|
|
},
|
|
"source_topology": {"type": "object"},
|
|
"state": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["source_classification", "output_classification", "observed_scopes"],
|
|
"properties": {
|
|
"source_classification": {"enum": ["weights_only", "model_and_optimizer", "exact_resume", "unknown"]},
|
|
"output_classification": {"const": "weights_only"},
|
|
"observed_scopes": {"type": "array", "uniqueItems": true, "items": {"$ref": "#/$defs/id"}}
|
|
}
|
|
},
|
|
"dropped_scopes": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["scope", "reason"],
|
|
"properties": {
|
|
"scope": {"$ref": "#/$defs/id"},
|
|
"reason": {"type": "string", "minLength": 1, "maxLength": 2048}
|
|
}
|
|
}
|
|
},
|
|
"canonical_output": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["format", "dtype_policy", "files", "hf_index", "logical_tensor_count", "logical_bytes"],
|
|
"properties": {
|
|
"format": {"const": "hf_safetensors"},
|
|
"dtype_policy": {"$ref": "#/$defs/id"},
|
|
"files": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/file"}},
|
|
"hf_index": {"type": ["string", "null"], "maxLength": 4096},
|
|
"logical_tensor_count": {"$ref": "#/$defs/int64"},
|
|
"logical_bytes": {"$ref": "#/$defs/int64"}
|
|
}
|
|
},
|
|
"resource_usage": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["estimated_peak_ram_bytes", "actual_peak_ram_bytes", "estimated_temp_bytes", "actual_temp_bytes"],
|
|
"properties": {
|
|
"estimated_peak_ram_bytes": {"$ref": "#/$defs/int64"},
|
|
"actual_peak_ram_bytes": {"anyOf": [{"$ref": "#/$defs/int64"}, {"type": "null"}]},
|
|
"estimated_temp_bytes": {"$ref": "#/$defs/int64"},
|
|
"actual_temp_bytes": {"anyOf": [{"$ref": "#/$defs/int64"}, {"type": "null"}]}
|
|
}
|
|
},
|
|
"validation": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["coverage", "replicas", "ties", "hashes", "index", "safe_reload", "source_unchanged", "result"],
|
|
"properties": {
|
|
"coverage": {"type": "boolean"},
|
|
"replicas": {"type": "boolean"},
|
|
"ties": {"type": "boolean"},
|
|
"hashes": {"type": "boolean"},
|
|
"index": {"type": "boolean"},
|
|
"safe_reload": {"type": "boolean"},
|
|
"source_unchanged": {"type": "boolean"},
|
|
"result": {"enum": ["passed", "failed"]}
|
|
}
|
|
},
|
|
"provenance": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["obliteratus_commit", "configuration_digest", "tokenizer_digest", "base_model", "transformation_log", "unknowns"],
|
|
"properties": {
|
|
"obliteratus_commit": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
|
|
"configuration_digest": {"type": ["string", "null"], "pattern": "^(sha256:[0-9a-f]{64})?$"},
|
|
"tokenizer_digest": {"type": ["string", "null"], "pattern": "^(sha256:[0-9a-f]{64})?$"},
|
|
"base_model": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["identity", "revision", "digest"],
|
|
"properties": {
|
|
"identity": {"type": ["string", "null"], "maxLength": 512},
|
|
"revision": {"type": ["string", "null"], "maxLength": 256},
|
|
"digest": {"anyOf": [{"$ref": "#/$defs/digest"}, {"type": "null"}]}
|
|
}
|
|
},
|
|
"transformation_log": {"type": "array", "items": {"type": "string", "maxLength": 2048}},
|
|
"unknowns": {"type": "array", "items": {"type": "string", "maxLength": 2048}}
|
|
}
|
|
},
|
|
"publication": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["staging_validated", "promoted", "atomic_strategy", "rollback_result"],
|
|
"properties": {
|
|
"staging_validated": {"type": "boolean"},
|
|
"promoted": {"type": "boolean"},
|
|
"atomic_strategy": {"$ref": "#/$defs/id"},
|
|
"rollback_result": {"enum": ["not_required", "succeeded", "failed"]}
|
|
}
|
|
}
|
|
},
|
|
"$defs": {
|
|
"id": {"type": "string", "minLength": 1, "maxLength": 512},
|
|
"int64": {"type": "integer", "minimum": 0, "maximum": 9223372036854775807},
|
|
"digest": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
|
|
"file": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["relative_path", "size_bytes", "sha256"],
|
|
"properties": {
|
|
"relative_path": {"type": "string", "minLength": 1, "maxLength": 4096, "not": {"pattern": "(^/|(^|/)\\.\\.(/|$))"}},
|
|
"size_bytes": {"$ref": "#/$defs/int64"},
|
|
"sha256": {"$ref": "#/$defs/digest"}
|
|
}
|
|
}
|
|
}
|
|
}
|