{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.runlocal.ai/schemas/v1/workload.json",
  "title": "Workload request",
  "description": "A runlocal.workload/5.1 request: the model, the situations to optimize for, the parts to work on, and recorded knowledge. How to write one: fill the required fields from the top. Omit each other field that keeps its default. A request with one graph function has files (the graph document), functions, entrypoints, operators, and examples. Keywords of this schema. x-runlocal-ref: the value is a key of the map at that pointer, for example a name under /files. x-runlocal-set: the array is a set, so its members are unique and sorted by the UTF-8 bytes of their canonical JSON text. For plain ASCII strings that is ascending character order, with each uppercase letter before each lowercase letter. A list out of order is an error, and its finding states the right order. x-runlocal-absent: the field has no default and no empty spelling, so omit it and never write null or an empty list. x-runlocal-defaults: the map accepts the key *, whose record gives shared terms to each other entry. x-runlocal-lift: the map accepts the key * as written-form shorthand, which the server expands. x-runlocal-form: the form of a text value, in words. x-runlocal-rules: at the root, each rule code with its meaning; on a field, the codes that apply to it. A finding of a check names its code, and GET /api/v1/schemas/semantics has the full rule. The three digests. The server computes each one from the request with every default filled in, so you never compute one, and the text of a request needs no canonical form. The revision digest covers the whole request. The contract digest covers what is asked: the source, functions, entrypoints, model and extension files, operators, weights, state, constants, and targets, without notes, file locations, examples, or knowledge. An example digest covers one example and its sample files. The report of a check returns all three.",
  "type": "object",
  "required": [
    "kind",
    "protocol_version",
    "name",
    "version",
    "previous",
    "source",
    "files",
    "functions",
    "entrypoints",
    "examples"
  ],
  "properties": {
    "kind": {
      "description": "The document kind.",
      "type": "string",
      "const": "runlocal.workload",
      "x-runlocal-rules": []
    },
    "protocol_version": {
      "description": "The protocol version this document conforms to.",
      "type": "string",
      "const": "5.1",
      "x-runlocal-rules": []
    },
    "name": {
      "description": "The name of this request, for the model and the variant that it describes, for example lidar-detector-small. It stays the same across versions. source.name is the customer's program that the model comes from, which can serve many requests.",
      "$ref": "#/$defs/Id",
      "x-runlocal-rules": []
    },
    "version": {
      "description": "This version of the request, for example r1. It is a name, so it starts with a letter: write r2 or v2, not 2. (name, version) identifies one revision digest.",
      "$ref": "#/$defs/Id",
      "x-runlocal-rules": []
    },
    "previous": {
      "description": "The revision digest of the version this one replaces, or null for the first. A version is a complete document, not a patch.",
      "anyOf": [
        {
          "$ref": "#/$defs/Digest"
        },
        {
          "type": "null"
        }
      ],
      "x-runlocal-rules": []
    },
    "note": {
      "$ref": "#/$defs/Note",
      "x-runlocal-absent": true,
      "x-runlocal-rules": []
    },
    "source": {
      "$ref": "#/$defs/Source",
      "x-runlocal-rules": []
    },
    "links": {
      "description": "Context links. They count toward the revision digest, never the contract or example digests.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/RequestLink"
      },
      "default": {},
      "x-runlocal-rules": [
        "LINKS.URL_INVALID",
        "LINKS.CREDENTIALS_PRESENT",
        "LINKS.ACCESS_TOKEN_PRESENT",
        "LINKS.SCOPE_NOT_FOUND"
      ]
    },
    "baseline": {
      "description": "A link to another stored request that is the baseline of this one, for a fidelity comparison. It needs the contract digest of that request. It is not the float reference of a quantized function: the quantization overlay already makes the float body the reference. It affects the revision digest, not the contract or example digests.",
      "anyOf": [
        {
          "$ref": "#/$defs/BaselineRelationship"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "x-runlocal-rules": []
    },
    "files": {
      "description": "Every file of the request, by name. A file with no location travels with the request: send its exact bytes under objects in the transport, with the same name. A file with a location has its bytes at another place, and you send no bytes for it. Write {} when the request has no file.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/File"
      },
      "x-runlocal-rules": [
        "FILES.BYTES_NOT_STATED",
        "FILES.CONTENT_NOT_PERMITTED",
        "FILES.CONSTANT_ROLE_INVALID",
        "FILES.CONSTANT_SIZE_MISMATCH",
        "FILES.LOCATION_UNSUPPORTED",
        "FILES.EXTERNAL_DATA_MISMATCH",
        "FILES.EXTERNAL_DATA_FILE_INVALID"
      ]
    },
    "environments": {
      "description": "Pinned software environments. Empty when the request has no Torch graph.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/TorchEnvironment"
      },
      "default": {},
      "x-runlocal-rules": [
        "ENVIRONMENTS.TORCH_REQUIRED",
        "ENVIRONMENTS.PACKAGE_NAME_INVALID"
      ]
    },
    "functions": {
      "description": "The model's functions. A request has at least one. The call graph between them is acyclic.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/Function"
      },
      "minProperties": 1,
      "x-runlocal-rules": [
        "FUNCTIONS.INPUT_BINDING_INVALID",
        "FUNCTIONS.OUTPUT_BINDING_INVALID",
        "FUNCTIONS.STATE_BINDING_INVALID",
        "FUNCTIONS.STATE_PAIR_INVALID",
        "FUNCTIONS.STATE_DOMAIN_MISMATCH",
        "FUNCTIONS.STATE_INITIAL_TYPE_MISMATCH",
        "FUNCTIONS.ALIAS_PAIR_INVALID",
        "FUNCTIONS.STATE_READ_REUSED",
        "FUNCTIONS.INPUT_NOT_FOUND",
        "FUNCTIONS.STEP_NOT_FOUND",
        "FUNCTIONS.OUTPUT_NOT_FOUND",
        "FUNCTIONS.STEP_CYCLE",
        "FUNCTIONS.CALL_CYCLE",
        "FUNCTIONS.VALUE_POLICY_MISMATCH",
        "FUNCTIONS.STEP_TYPE_MISMATCH",
        "FUNCTIONS.STEP_TYPE_UNPROVED",
        "FUNCTIONS.DIMENSION_RANGE_INVALID",
        "FUNCTIONS.DIMENSION_NOT_FOUND",
        "FUNCTIONS.DIMENSION_CYCLE",
        "FUNCTIONS.DIMENSION_RELATION_INVALID",
        "FUNCTIONS.GRAPH_TYPE_UNRESOLVED",
        "FUNCTIONS.GRAPH_BINDING_INVALID",
        "FUNCTIONS.GRAPH_TYPE_MISMATCH"
      ]
    },
    "entrypoints": {
      "description": "The ways to call the model, by the source's names for them. A request has at least one.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/Entrypoint"
      },
      "minProperties": 1,
      "x-runlocal-rules": []
    },
    "weights": {
      "description": "Named weights at program scope for steps to bind. Empty when no function composes others with weights.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/IdOrDefaults"
      },
      "additionalProperties": {
        "$ref": "#/$defs/WeightSlot"
      },
      "default": {},
      "patternProperties": {
        "^\\*$": {
          "$ref": "#/$defs/WeightDefaults"
        }
      },
      "x-runlocal-defaults": true,
      "x-runlocal-rules": [
        "WEIGHTS.PORT_BINDING_INVALID",
        "WEIGHTS.PORT_NOT_FOUND",
        "WEIGHTS.PORT_CONTRACT_MISMATCH",
        "WEIGHTS.PORT_DIMENSION_INVALID",
        "WEIGHTS.LIFT_INVALID",
        "WEIGHTS.GRAPH_BINDING_INVALID",
        "WEIGHTS.GRAPH_TYPE_MISMATCH",
        "WEIGHTS.DEFAULT_NOT_ALLOWED",
        "WEIGHTS.REFERENCE_NOT_FOUND",
        "WEIGHTS.TIED_CONTRACT_MISMATCH",
        "WEIGHTS.TENSOR_NOT_FOUND"
      ]
    },
    "tied_weights": {
      "description": "Weights that hold the same values. Equal bytes never establish tying; only this list does.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/TiedPair"
      },
      "default": [],
      "x-runlocal-rules": []
    },
    "state": {
      "description": "Persistent state, by name. Empty for a stateless model.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/StateSlot"
      },
      "default": {},
      "x-runlocal-rules": []
    },
    "constants": {
      "description": "Public constants outside function graphs, by name.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/Constant"
      },
      "default": {},
      "x-runlocal-rules": []
    },
    "operators": {
      "description": "The operator registry of this request. Every graph node names one entry by its key. Each entry is ONNX or Torch, and it states the identity of the operator, what defines its meaning, and its use count. The key is free: the operator type name is a good key. Empty only when no body is a graph body.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/Operator"
      },
      "default": {},
      "x-runlocal-rules": [
        "OPERATORS.NOT_REGISTERED",
        "OPERATORS.LOCAL_FUNCTION_NOT_FOUND",
        "OPERATORS.SEMANTICS_INVALID",
        "OPERATORS.SYSTEM_INVALID",
        "OPERATORS.TORCH_STATE_INVALID",
        "OPERATORS.DUPLICATE",
        "OPERATORS.COUNT_MISMATCH",
        "OPERATORS.OPSET_UNSUPPORTED",
        "OPERATORS.SCHEMA_NOT_FOUND",
        "OPERATORS.INPUTS_INVALID",
        "OPERATORS.OUTPUTS_INVALID",
        "OPERATORS.ATTRIBUTES_INVALID",
        "OPERATORS.DEFINITION_INVALID",
        "OPERATORS.NODE_INVALID",
        "OPERATORS.LOCAL_FUNCTION_CYCLE"
      ]
    },
    "examples": {
      "description": "Situations to optimize for, by name. An example states what is known about one situation: extents, value sources, and statistics. The work table of the service (GET /api/v1/work) states which kinds of work each stated item permits. No item is required: the map can be empty when only the model is submitted, and then no shape or input is implied.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/Example"
      },
      "x-runlocal-rules": [
        "EXAMPLES.INPUT_BINDING_INVALID",
        "EXAMPLES.STATE_BINDING_INVALID",
        "EXAMPLES.OUTPUT_BINDING_INVALID",
        "EXAMPLES.COUNT_TERM_INVALID",
        "EXAMPLES.COUNT_VALUE_MISMATCH",
        "EXAMPLES.SOURCE_FILE_INVALID",
        "EXAMPLES.SOURCE_PRIVATE",
        "EXAMPLES.SOURCE_TYPE_MISMATCH",
        "EXAMPLES.SOURCE_STATISTICS_INVALID",
        "EXAMPLES.SOURCE_GENERATOR_INVALID",
        "EXAMPLES.SOURCE_VALUE_MISMATCH",
        "EXAMPLES.PIN_IDENTITY_REQUIRED",
        "EXAMPLES.WEIGHT_BINDING_DUPLICATE",
        "EXAMPLES.WEIGHT_SOURCE_INVALID",
        "EXAMPLES.DIMENSION_NOT_FOUND",
        "EXAMPLES.DIMENSION_RANGE_INVALID",
        "EXAMPLES.DIMENSION_RELATION_INVALID",
        "EXAMPLES.DIMENSION_COUNT_MISMATCH"
      ]
    },
    "optimize": {
      "description": "The parts of the model to optimize, by name. Omitted or empty means every entrypoint with its whole body. A map with entries means those parts only: a request that lists one layer asks for that layer and not for the entrypoints. List an entrypoint beside a layer to ask for both. A want belongs to a target, so to state a want for the whole model, write one target for each entrypoint.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/Target"
      },
      "default": {},
      "x-runlocal-rules": [
        "OPTIMIZE.NOT_CONVEX",
        "OPTIMIZE.PATH_NOT_FOUND",
        "OPTIMIZE.BODY_KIND_INVALID",
        "OPTIMIZE.SELECTION_NOT_FOUND",
        "OPTIMIZE.WORK_UNKNOWN",
        "OPTIMIZE.WORK_UNAVAILABLE"
      ]
    },
    "knowledge": {
      "description": "Questions and evidence, by name.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/KnowledgeEntry"
      },
      "default": {},
      "x-runlocal-rules": [
        "KNOWLEDGE.REFERENCE_INVALID",
        "KNOWLEDGE.RESULT_INVALID",
        "KNOWLEDGE.ARTIFACT_ROLE_INVALID",
        "KNOWLEDGE.SUBJECT_NOT_FOUND",
        "KNOWLEDGE.CONTENT_MISMATCH",
        "KNOWLEDGE.DEPENDENCY_CYCLE",
        "KNOWLEDGE.FIDELITY_REQUIRED",
        "KNOWLEDGE.CURRENT_CONTRACT_MISMATCH",
        "KNOWLEDGE.BASELINE_MISMATCH",
        "KNOWLEDGE.FIDELITY_INTERFACE_MISMATCH",
        "KNOWLEDGE.SOURCE_REFUTED"
      ]
    },
    "extensions": {
      "description": "Extensions this document uses, by name.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/Id"
      },
      "additionalProperties": {
        "$ref": "#/$defs/ExtensionDefinition"
      },
      "default": {},
      "x-runlocal-rules": [
        "EXTENSIONS.FILE_INVALID",
        "EXTENSIONS.SCHEMA_INVALID",
        "EXTENSIONS.PAYLOAD_INVALID",
        "EXTENSIONS.SLOT_INVALID",
        "EXTENSIONS.DEPENDENCY_CYCLE"
      ]
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AliasPair": {
      "title": "AliasPair",
      "description": "Whether two of the function's states may share storage.",
      "type": "object",
      "required": [
        "first",
        "second",
        "relation"
      ],
      "properties": {
        "first": {
          "description": "The lesser state name in ASCII order.",
          "$ref": "#/$defs/Id"
        },
        "second": {
          "description": "The greater state name in ASCII order.",
          "$ref": "#/$defs/Id"
        },
        "relation": {
          "description": "may_overlap is an explicit permission, distinct from not knowing.",
          "type": "string",
          "enum": [
            "disjoint",
            "may_overlap"
          ]
        }
      },
      "additionalProperties": false
    },
    "Aliasing": {
      "title": "Aliasing",
      "description": "Whether states may share storage. Binding one slot to two states declared disjoint is invalid.",
      "anyOf": [
        {
          "description": "Alias relations among the function's states.",
          "type": "object",
          "required": [
            "default"
          ],
          "properties": {
            "default": {
              "description": "The relation for every pair not listed.",
              "type": "string",
              "enum": [
                "disjoint",
                "may_overlap"
              ]
            },
            "pairs": {
              "description": "Explicit pairs overriding the default, sorted by (first, second) without duplicates.",
              "type": "array",
              "items": {
                "$ref": "#/$defs/AliasPair"
              },
              "default": []
            }
          },
          "additionalProperties": false
        },
        {
          "$ref": "#/$defs/UnknownRef"
        }
      ]
    },
    "BaselineRelationship": {
      "title": "BaselineRelationship",
      "description": "A relationship to a baseline model. It is revision context and does not change the requested computation or its contract digest.",
      "type": "object",
      "required": [
        "contract",
        "revision",
        "title"
      ],
      "properties": {
        "contract": {
          "description": "The baseline model's contract digest.",
          "$ref": "#/$defs/Digest"
        },
        "revision": {
          "description": "The baseline revision digest, or null.",
          "anyOf": [
            {
              "description": "The baseline request revision digest.",
              "$ref": "#/$defs/Digest"
            },
            {
              "type": "null"
            }
          ]
        },
        "title": {
          "description": "A short label for the baseline.",
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "BlackBox": {
      "title": "BlackBox",
      "description": "A fixed implementation on the customer's machine that Runlocal never sees or runs. Its inputs, outputs, state pairs, effects, and contract must be fully known. A transformation keeps every call to it, its arguments, and its order.",
      "type": "object",
      "required": [
        "kind",
        "binding",
        "version"
      ],
      "properties": {
        "kind": {
          "description": "Always \"black_box\". Selects this alternative.",
          "type": "string",
          "const": "black_box"
        },
        "binding": {
          "description": "A name for the implementation on the customer's machine.",
          "$ref": "#/$defs/Id"
        },
        "version": {
          "description": "Its version.",
          "$ref": "#/$defs/Id"
        },
        "effects": {
          "description": "The effects of this opaque implementation. Functional bodies have no effect record.",
          "type": "object",
          "properties": {
            "side_effects": {
              "default": "declared",
              "$ref": "#/$defs/SideEffects"
            },
            "aliasing": {
              "default": {
                "default": "disjoint",
                "pairs": []
              },
              "$ref": "#/$defs/Aliasing"
            }
          },
          "additionalProperties": false,
          "default": {
            "aliasing": {
              "default": "disjoint",
              "pairs": []
            },
            "side_effects": "declared"
          }
        }
      },
      "additionalProperties": false
    },
    "Body": {
      "title": "Body",
      "description": "How the function is defined. Exactly one body is authoritative; an export in another format may only be attached as evidence.",
      "oneOf": [
        {
          "$ref": "#/$defs/GraphBody"
        },
        {
          "$ref": "#/$defs/StepsBody"
        },
        {
          "$ref": "#/$defs/BlackBox"
        },
        {
          "$ref": "#/$defs/Missing"
        },
        {
          "$ref": "#/$defs/Extension"
        }
      ],
      "discriminator": {
        "mapping": {
          "graph": "#/$defs/GraphBody",
          "steps": "#/$defs/StepsBody",
          "black_box": "#/$defs/BlackBox",
          "missing": "#/$defs/Missing",
          "extension": "#/$defs/Extension"
        },
        "propertyName": "kind"
      }
    },
    "Confidence": {
      "title": "Confidence",
      "description": "A submitting tool's subjective, uncalibrated estimate for one evidence entry. It is not a measured probability or an acceptance decision.",
      "type": "object",
      "required": [
        "value",
        "reason"
      ],
      "properties": {
        "value": {
          "description": "The submitting tool's subjective, uncalibrated estimate that this evidence claim holds, from 0 through 1.",
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "reason": {
          "description": "Why the submitting tool gave this estimate.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "Configuration": {
      "title": "Configuration",
      "description": "The fixed model configuration. It records how the graph was built and does not change the graph. It is part of the contract digest.",
      "type": "object",
      "required": [
        "family",
        "variant",
        "values"
      ],
      "properties": {
        "family": {
          "description": "The model family, for example pointcept-concerto or qwen3.5. For a model of the customer with no family, write the name of the customer's model.",
          "type": "string",
          "maxLength": 128,
          "minLength": 1
        },
        "variant": {
          "description": "The selected preset, for example tiny or 9b. This is a name, not a parameter count. For a model with one preset, write default.",
          "type": "string",
          "maxLength": 128,
          "minLength": 1
        },
        "values": {
          "description": "The effective settings used to build the graph, with defaults and overrides resolved.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/ConfigurationKey"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ConfigurationValue"
          }
        }
      },
      "additionalProperties": false
    },
    "ConfigurationKey": {
      "title": "ConfigurationKey",
      "description": "A key from the source configuration, kept exactly as written.",
      "type": "string"
    },
    "ConfigurationValue": {
      "title": "ConfigurationValue",
      "description": "A resolved JSON value. Strings are literal text. No expressions or substitutions are evaluated.",
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "boolean"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConfigurationValue"
          }
        },
        {
          "description": "Nested settings, with the source's keys.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/ConfigurationKey"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ConfigurationValue"
          }
        }
      ]
    },
    "Constant": {
      "title": "Constant",
      "description": "A typed public constant from a file or an extension. A steps body passes it to a step as {constant: name}, which is how a step gets a literal tensor, for example an empty cache for the first call of a shared layer. The file has role model or extension, it travels with the request, and it holds the data of the tensor alone: little-endian elements in row-major order, with no header, so its size_bytes equals the byte count of the type. A format such as bytes/application/octet-stream fits. A tensor with no element, such as float[1,2,0,64], is a file of 0 bytes. It never has role sample: a sample is an example value, and a constant is part of the computation.",
      "type": "object",
      "required": [
        "type",
        "source"
      ],
      "properties": {
        "type": {
          "description": "The public constant's exact tensor type.",
          "$ref": "#/$defs/TensorType"
        },
        "source": {
          "$ref": "#/$defs/ConstantSource"
        }
      },
      "additionalProperties": false
    },
    "ConstantSource": {
      "title": "ConstantSource",
      "description": "Where a public constant comes from: a bundled file or an extension.",
      "anyOf": [
        {
          "$ref": "#/$defs/FileValueSource"
        },
        {
          "$ref": "#/$defs/Extension"
        }
      ]
    },
    "ConstantValueSource": {
      "title": "ConstantValueSource",
      "description": "A value supplied by a public constant.",
      "type": "object",
      "required": [
        "kind",
        "constant"
      ],
      "properties": {
        "kind": {
          "description": "Always \"constant\". Selects this alternative.",
          "type": "string",
          "const": "constant"
        },
        "constant": {
          "description": "A public constant name.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/constants"
        }
      },
      "additionalProperties": false
    },
    "Constraint": {
      "title": "Constraint",
      "description": "A condition on shapes, written as text: for example N <= 4096, rank(x) == 2, x.shape[0] == y.shape[0], or steps > 0. Terms are shape symbols, rank(port), port.shape[axis], a rank-zero integer input named by its port, integers, and + - *. Comparisons are == != < <= > >=, joined with and, or, not, and parentheses. Section 8 of the semantics document defines the grammar.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_ .,\\[\\]()+*<>=!-]+$",
      "examples": [
        "N <= 4096",
        "rank(x) == 2"
      ],
      "x-runlocal-form": "a condition over shape terms with == != < <= > >= and, or, not"
    },
    "Contract": {
      "title": "Contract",
      "description": "The terms under which a replacement for this function is judged. Every term has a default, and the defaults together are the base contract: a pure computation on logical values judged against its mathematical meaning. Write a term only to change it or to say it is unknown.",
      "type": "object",
      "properties": {
        "numerics": {
          "default": "as_written",
          "$ref": "#/$defs/Numerics"
        },
        "reference": {
          "default": "math",
          "$ref": "#/$defs/Reference"
        },
        "layout": {
          "default": "any",
          "$ref": "#/$defs/Layout"
        },
        "observe": {
          "default": "outputs",
          "$ref": "#/$defs/Observe"
        }
      },
      "additionalProperties": false
    },
    "Count": {
      "title": "Count",
      "description": "A quantity written as a constraint term: a shape symbol such as N, port.shape[axis], rank(port), or a graph value named as value.shape[axis]. Its measured value is the map entry.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_ .,\\[\\]()+*<>=!-]+$",
      "examples": [
        "N",
        "points.shape[0]"
      ],
      "x-runlocal-form": "a shape term"
    },
    "Digest": {
      "title": "Digest",
      "description": "\"sha256:\" followed by 64 lowercase hexadecimal digits over exact bytes.",
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$",
      "examples": [
        "sha256:0000000000000000000000000000000000000000000000000000000000000000"
      ],
      "x-runlocal-form": "\"sha256:\" followed by 64 lowercase hexadecimal digits"
    },
    "Dimension": {
      "title": "Dimension",
      "description": "A dimension of one function: a shape symbol such as S in the type float16[1,S,4096], with the range of extents that a call can have. Its range, multiple, and sum relation apply to every call, including calls from steps. Declare each symbol whose extent can change between calls. An example then binds it to one extent or a narrower range. A dimension with min equal to max is a fixed extent with a name, which a sum relation can then use.",
      "type": "object",
      "required": [
        "min",
        "max"
      ],
      "properties": {
        "min": {
          "description": "The smallest extent that a call can have, inclusive. It can be 0.",
          "$ref": "#/$defs/Nat"
        },
        "max": {
          "description": "The largest extent that a call can have, inclusive.",
          "$ref": "#/$defs/Nat"
        },
        "multiple_of": {
          "description": "Every value must be a multiple of this number. The range must contain at least one such value.",
          "type": "integer",
          "minimum": 1,
          "maximum": 9007199254740991,
          "default": 1
        },
        "equals": {
          "description": "A sum relation, or null.",
          "anyOf": [
            {
              "description": "This dimension equals the sum. Dependencies must have no cycle.",
              "type": "object",
              "required": [
                "sum"
              ],
              "properties": {
                "sum": {
                  "description": "Dimensions of this function to add. Repeated names are counted each time. A number is not a member. For a fixed increment, declare a dimension with min and max equal to that number, and add it: a cache that grows by one token has S with min 1 and max 1, the read extent T, and the written extent T1 with equals {sum: [T, S]}.",
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 64,
                  "items": {
                    "$ref": "#/$defs/DimensionName"
                  }
                }
              },
              "additionalProperties": false
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "DimensionName": {
      "title": "DimensionName",
      "description": "A shape symbol, scoped to one function, for example B, S, or cached_tokens.",
      "type": "string",
      "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
      "maxLength": 128
    },
    "DimensionRange": {
      "title": "DimensionRange",
      "description": "An inclusive range of whole numbers. min must not exceed max.",
      "type": "object",
      "required": [
        "min",
        "max"
      ],
      "properties": {
        "min": {
          "description": "The smallest extent, inclusive.",
          "$ref": "#/$defs/Nat"
        },
        "max": {
          "description": "The largest extent, inclusive.",
          "$ref": "#/$defs/Nat"
        }
      },
      "additionalProperties": false
    },
    "DynamicQuantizationParameters": {
      "title": "DynamicQuantizationParameters",
      "description": "Compute scale and zero point for each call with the checked ONNX DynamicQuantizeLinear rule.",
      "type": "object",
      "required": [
        "kind",
        "rule",
        "schema_version"
      ],
      "properties": {
        "kind": {
          "description": "Always \"dynamic\". Selects this alternative.",
          "type": "string",
          "const": "dynamic"
        },
        "rule": {
          "description": "The standard ONNX DynamicQuantizeLinear rule.",
          "type": "string",
          "const": "onnx_dynamic_quantize_linear"
        },
        "schema_version": {
          "description": "The exact checked DynamicQuantizeLinear since_version.",
          "$ref": "#/$defs/Nat"
        }
      },
      "additionalProperties": false
    },
    "Entrypoint": {
      "title": "Entrypoint",
      "description": "A way to call the model, keyed by the name the source uses for it. Inputs come from a call or from an example. The weights are the weight ports of the function, and the weight slots that its steps bind. A function with a steps body can have no weight port of its own, when each step binds a slot.",
      "type": "object",
      "required": [
        "function"
      ],
      "properties": {
        "function": {
          "description": "The function this entrypoint calls.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/functions"
        },
        "state": {
          "description": "Binds every state of the function to a slot in state.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "description": "A slot in state.",
            "$ref": "#/$defs/Id",
            "x-runlocal-ref": "/state"
          },
          "default": {}
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "EvidenceKnowledge": {
      "title": "EvidenceKnowledge",
      "description": "Evidence about this document. The kind names the method and the outcome states the result.",
      "type": "object",
      "required": [
        "kind",
        "purpose",
        "subjects",
        "outcome",
        "tool",
        "claim",
        "procedure"
      ],
      "properties": {
        "kind": {
          "description": "The method of this evidence. claimed: a named tool asserts it. observed: about recorded runs or inspected files. tested: checked over a finite set of cases by a named procedure, for example a comparison of two implementations on 200 inputs. proved: established by a named proof procedure under its premises. These are not a confidence ladder.",
          "type": "string",
          "enum": [
            "claimed",
            "observed",
            "tested",
            "proved"
          ]
        },
        "purpose": {
          "$ref": "#/$defs/KnowledgePurpose"
        },
        "subjects": {
          "description": "What this entry is about. Members are unique and sorted by their canonical JSON bytes.",
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "$ref": "#/$defs/Pointer"
          }
        },
        "depends_on": {
          "description": "Knowledge entries this one relies on. The graph is acyclic.",
          "type": "array",
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "description": "A knowledge entry name.",
            "$ref": "#/$defs/Id",
            "x-runlocal-ref": "/knowledge"
          },
          "default": []
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        },
        "outcome": {
          "description": "The result of this evidence. The method name does not imply its outcome.",
          "type": "string",
          "enum": [
            "supports",
            "refutes",
            "inconclusive"
          ]
        },
        "tool": {
          "$ref": "#/$defs/Tool"
        },
        "claim": {
          "description": "The proposition, in words.",
          "type": "string"
        },
        "procedure": {
          "description": "How it was checked, in words: the tool, the reference, the comparison.",
          "type": "string"
        },
        "contract_digest": {
          "description": "The contract digest of the computation that this evidence assessed. It is not a digest of a file. Observed, tested, and proved evidence must state it; claimed evidence can leave it null. You do not compute it: the report of POST /api/v1/requests/check returns it as contract_digest, and a finding on this field states it in its repair. Knowledge is outside the contract digest, so writing the digest here does not change it. Write it as the last step, after each change of a function, a file, or an operator, because such a change gives a new digest.",
          "anyOf": [
            {
              "$ref": "#/$defs/Digest"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "cases": {
          "description": "How many cases were run, when tested.",
          "anyOf": [
            {
              "$ref": "#/$defs/Nat"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "passed": {
          "description": "How many of those cases passed.",
          "anyOf": [
            {
              "$ref": "#/$defs/Nat"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "tolerance": {
          "description": "The accepted difference, when the comparison was numerical, as text with its metric, for example max_abs <= 1e-5. The user decides it. Put the measured difference in procedure. A request has no other tolerance field: a tolerance belongs to a recorded comparison, not to the contract of a function.",
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "artifacts": {
          "description": "Evidence or sample files that support the claim.",
          "type": "array",
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "description": "A file name.",
            "$ref": "#/$defs/Id",
            "x-runlocal-ref": "/files"
          },
          "default": []
        },
        "confidence": {
          "description": "The submitting tool's subjective, uncalibrated estimate that this claim holds. null means not estimated, never complete confidence.",
          "anyOf": [
            {
              "$ref": "#/$defs/Confidence"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "assumptions": {
          "description": "Assumptions this evidence uses. They do not narrow accepted inputs. Any required input restriction belongs in the function contract.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "default": []
        },
        "fidelity": {
          "description": "Structured baseline fidelity evidence, or null.",
          "anyOf": [
            {
              "$ref": "#/$defs/FidelityEvidence"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "ExactPackageVersion": {
      "title": "ExactPackageVersion",
      "description": "An exact installed package version in canonical Python package form. Version ranges, wildcards, URLs, paths, and environment markers are not allowed.",
      "type": "string",
      "pattern": "^(?:[1-9][0-9]*!)?(?:0|[1-9][0-9]*)(?:\\.(?:0|[1-9][0-9]*))*(?:(?:a|b|rc)(?:0|[1-9][0-9]*))?(?:\\.post(?:0|[1-9][0-9]*))?(?:\\.dev(?:0|[1-9][0-9]*))?(?:\\+[a-z0-9]+(?:\\.[a-z0-9]+)*)?(?![\\s\\S])",
      "maxLength": 128,
      "minLength": 1
    },
    "Example": {
      "title": "Example",
      "description": "A situation the model should be optimized for: which entrypoint, which inputs and weights, what holds, and what was measured. Supplying a sample never narrows the legal runs and never authorizes folding a value.",
      "type": "object",
      "required": [
        "entrypoint",
        "inputs"
      ],
      "properties": {
        "entrypoint": {
          "description": "The entrypoint this example calls.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/entrypoints"
        },
        "dimensions": {
          "description": "The extents of this situation: each declared dimension of the entrypoint function, with one exact extent or a narrower range, for example {\"S\": 2048}. This is the field that states a batch size or a sequence length that can change between calls. An extent that never changes is a number in the type, and it needs no dimension and no binding. Omitted dimensions keep the function's domain. These are promises about calls, not sample measurements. Two situations are two examples.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/DimensionName"
          },
          "additionalProperties": {
            "description": "An exact extent or a narrower inclusive range.",
            "anyOf": [
              {
                "$ref": "#/$defs/Nat"
              },
              {
                "$ref": "#/$defs/DimensionRange"
              }
            ]
          },
          "default": {}
        },
        "inputs": {
          "description": "Every input of the entrypoint's function, exactly once, except an input that is the read side of a state pair: the state field binds that one, by its slot. Each entry is a binding with a source, for example {\"source\": {\"kind\": \"none\"}}. Use the source none when you supply no value: work that depends only on shapes needs no value.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ValueBinding"
          }
        },
        "weights": {
          "description": "Weight sources, keyed by an entrypoint weight port name, /functions/<entrypoint function>/weights/<port>, /weights/<slot>, or a group key. The group key * applies one source to every entrypoint weight port that has no source of its own, and the group key /weights/* does the same for every program slot, with the slot name in the place of the port name. So one checkpoint can supply each slot with one entry. For a group: a local group gives the port the binding <binding>.<port>, and a generated group gives the port a seed derived from the group seed and the port name. A file group names one container file, such as a public checkpoint, and gives each weight the tensor key of its port name or slot name. A weight whose tensor has another name needs an entry of its own, with its key. Examples share nothing, so each example repeats its weight sources. A weight with no source has the source none. It is not zero.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/ExampleWeightKey"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ValueBinding"
          },
          "default": {},
          "patternProperties": {
            "^/weights/\\*$": {
              "$ref": "#/$defs/WeightGroupBinding"
            },
            "^\\*$": {
              "$ref": "#/$defs/WeightGroupBinding"
            }
          }
        },
        "state": {
          "description": "Each session slot that supplies the read side of a state pair of the entrypoint function, exactly once, keyed by the slot name. It is required for such a slot, also with the source none. A slot that the entrypoint only writes, as a prefill does, has no entry.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ValueBinding"
          },
          "default": {}
        },
        "outputs": {
          "description": "What the source produced for each output of the entrypoint's function on the values of this example, keyed by the output name. Write it when the service can make every value of the call: each input, state value, and weight is a generated value or a file that the service can read, and each open dimension is bound. Then the service can run the computation on the same values and compare each output with its reference, which finds a graph that is well formed but computes another thing. Absent: no reference. An output with no entry has no reference.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/OutputBinding"
          },
          "x-runlocal-absent": true
        },
        "constraints": {
          "description": "Conditions that hold for every run this example stands for, beyond the function's own. The example's domain is the conjunction of both.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Constraint"
          },
          "default": []
        },
        "counts": {
          "description": "Omit this field when the example supplies no sample: an extent of the situation belongs in dimensions. Quantities measured on the supplied samples, keyed by a term such as N, points.shape[0], or active_voxels.shape[0]. A count is a measurement of these samples, never a promise about other runs; write a constraint for that. A count never encodes a relation: indices, segment lengths, and sparse pairs are inputs, state, or constants.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Count"
          },
          "additionalProperties": {
            "$ref": "#/$defs/Nat"
          },
          "default": {}
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "ExampleValueSource": {
      "title": "ExampleValueSource",
      "description": "How an example supplies one input, state value, or weight.",
      "oneOf": [
        {
          "$ref": "#/$defs/NoValueSource"
        },
        {
          "$ref": "#/$defs/LocalValueSource"
        },
        {
          "$ref": "#/$defs/FileValueSource"
        },
        {
          "$ref": "#/$defs/GeneratedValue"
        },
        {
          "$ref": "#/$defs/ConstantValueSource"
        }
      ],
      "discriminator": {
        "mapping": {
          "none": "#/$defs/NoValueSource",
          "local": "#/$defs/LocalValueSource",
          "file": "#/$defs/FileValueSource",
          "generated": "#/$defs/GeneratedValue",
          "constant": "#/$defs/ConstantValueSource"
        },
        "propertyName": "kind"
      }
    },
    "ExampleWeightKey": {
      "title": "ExampleWeightKey",
      "description": "The weight an example source supplies: an entrypoint weight port name, /functions/<entrypoint function>/weights/<port>, /weights/<slot>, the group key * for every entrypoint weight port that has no source of its own, or the group key /weights/* for every program slot that has no source of its own.",
      "type": "string",
      "pattern": "^(?:\\*|/weights/\\*|[A-Za-z][A-Za-z0-9_.-]{0,127}|/weights/[A-Za-z][A-Za-z0-9_.-]{0,127}|/functions/[A-Za-z][A-Za-z0-9_.-]{0,127}/weights/[A-Za-z][A-Za-z0-9_.-]{0,127})$"
    },
    "Extension": {
      "title": "Extension",
      "description": "Uses an extension in one slot. An unsupported extension blocks only the scopes that depend on it.",
      "type": "object",
      "required": [
        "kind",
        "extension",
        "payload"
      ],
      "properties": {
        "kind": {
          "description": "Always \"extension\". Selects this alternative.",
          "type": "string",
          "const": "extension"
        },
        "extension": {
          "description": "The entry in extensions that defines this payload.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/extensions"
        },
        "payload": {
          "description": "The payload, written inline. It must satisfy the extension's schema."
        }
      },
      "additionalProperties": false
    },
    "ExtensionDefinition": {
      "title": "ExtensionDefinition",
      "description": "A versioned extension: a feature the base document does not express. Runlocal supports an extension only when it recognizes the exact slot, name, version, schema digest, and specification digest. Nothing is fetched to interpret one.",
      "type": "object",
      "required": [
        "slot",
        "name",
        "version",
        "schema",
        "specification"
      ],
      "properties": {
        "slot": {
          "description": "Which part of the document this extension may fill.",
          "type": "string",
          "enum": [
            "body",
            "operator",
            "type",
            "constant",
            "constraint",
            "layout",
            "state",
            "numerics",
            "quantization",
            "reference",
            "observe",
            "target"
          ]
        },
        "name": {
          "description": "The extension's name. A name alone never identifies an extension.",
          "type": "string"
        },
        "version": {
          "description": "The extension's version.",
          "type": "string"
        },
        "schema": {
          "description": "A json file with role extension holding the JSON Schema draft 2020-12 that payloads must satisfy.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/files"
        },
        "specification": {
          "description": "A file with role extension holding the extension's specification. It is data, not permission to run code.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/files"
        },
        "depends_on": {
          "description": "Extensions this one builds on. The graph is acyclic and every schema reference resolves inside it.",
          "type": "array",
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "description": "An extension name.",
            "$ref": "#/$defs/Id",
            "x-runlocal-ref": "/extensions"
          },
          "default": []
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "ExternalData": {
      "title": "ExternalData",
      "description": "One external-data location the model uses, mapped to a file. Each used location appears exactly once.",
      "type": "object",
      "required": [
        "location",
        "file"
      ],
      "properties": {
        "location": {
          "description": "The ONNX external-data location key. It is a lookup key, never resolved as a path or URL.",
          "type": "string"
        },
        "file": {
          "description": "The model file holding those bytes.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/files"
        }
      },
      "additionalProperties": false
    },
    "FidelityEvidence": {
      "title": "FidelityEvidence",
      "description": "Evidence that compares a quantized model with a baseline model. Private artifacts stay local; stable local identifiers bind the recorded run to both checkpoints.",
      "type": "object",
      "required": [
        "current_contract",
        "baseline_contract",
        "current_checkpoint",
        "baseline_checkpoint",
        "evaluation_data",
        "runtime",
        "interfaces",
        "metrics"
      ],
      "properties": {
        "current_contract": {
          "description": "The quantized model contract digest.",
          "$ref": "#/$defs/Digest"
        },
        "baseline_contract": {
          "description": "The baseline model contract digest.",
          "$ref": "#/$defs/Digest"
        },
        "current_checkpoint": {
          "description": "The local identifier for the quantized checkpoint.",
          "type": "string",
          "minLength": 1
        },
        "baseline_checkpoint": {
          "description": "The local identifier for the baseline checkpoint.",
          "type": "string",
          "minLength": 1
        },
        "evaluation_data": {
          "description": "The evaluation data identifier and immutable version or digest.",
          "type": "string",
          "minLength": 1
        },
        "runtime": {
          "description": "The runtime used for both sides of the comparison.",
          "type": "object",
          "required": [
            "name",
            "version",
            "device"
          ],
          "properties": {
            "name": {
              "description": "The runtime name.",
              "type": "string",
              "minLength": 1
            },
            "version": {
              "description": "The exact runtime version.",
              "type": "string",
              "minLength": 1
            },
            "device": {
              "description": "The device and relevant execution settings.",
              "type": "string",
              "minLength": 1
            }
          },
          "additionalProperties": false
        },
        "interfaces": {
          "description": "Compared public entrypoints.",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/FidelityInterface"
          }
        },
        "metrics": {
          "description": "Measured fidelity results and limits.",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/FidelityMetric"
          }
        }
      },
      "additionalProperties": false
    },
    "FidelityInterface": {
      "title": "FidelityInterface",
      "description": "A compared public interface. Internal weight ports are intentionally absent.",
      "type": "object",
      "required": [
        "current_entrypoint",
        "baseline_entrypoint",
        "inputs",
        "outputs"
      ],
      "properties": {
        "current_entrypoint": {
          "description": "The current public entrypoint.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/entrypoints"
        },
        "baseline_entrypoint": {
          "description": "The baseline public entrypoint.",
          "$ref": "#/$defs/Id"
        },
        "inputs": {
          "description": "Public input types shared by both entrypoints.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/TensorType"
          }
        },
        "outputs": {
          "description": "Public output types shared by both entrypoints.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/TensorType"
          }
        }
      },
      "additionalProperties": false
    },
    "FidelityMetric": {
      "title": "FidelityMetric",
      "description": "One measured fidelity result and its acceptance limit.",
      "type": "object",
      "required": [
        "name",
        "value",
        "comparison",
        "limit",
        "unit"
      ],
      "properties": {
        "name": {
          "description": "The metric name.",
          "type": "string",
          "minLength": 1
        },
        "value": {
          "description": "The measured value.",
          "type": "number"
        },
        "comparison": {
          "description": "How value is compared with limit.",
          "type": "string",
          "enum": [
            "at_least",
            "at_most"
          ]
        },
        "limit": {
          "description": "The acceptance limit.",
          "type": "number"
        },
        "unit": {
          "description": "The metric unit, or an empty string for a unitless value.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "File": {
      "title": "File",
      "description": "A file of the request, keyed by its name, for example encoder.json. A file states its bytes in one of two ways: content, which writes the value of a json file in the request itself, or size_bytes and digest, which name bytes that travel under objects or that sit at a location. Missing bytes or a wrong size or digest are invalid content, never a private value.",
      "type": "object",
      "required": [
        "role",
        "format"
      ],
      "properties": {
        "role": {
          "description": "model: part of what is being asked, in the contract digest: the JSON graph document, an optional native source artifact, a public constant, and a public quantization tensor file. It is not a checkpoint. sample: values that an example binds to inputs, state, or weights, in the digest of the examples that use it. A public checkpoint whose tensors an example binds to weights is a sample file. evidence: an artifact a knowledge entry refers to. extension: a schema or specification an extension names.",
          "type": "string",
          "enum": [
            "model",
            "sample",
            "evidence",
            "extension"
          ]
        },
        "format": {
          "$ref": "#/$defs/Format"
        },
        "content": {
          "description": "The value of the file, written here. Only a json file whose bytes travel with the request can state it, and such a file has no entry under objects. Write it so that a reader of the request sees the whole file: a graph, a quantization tensor file, or an extension schema belongs here rather than in base64. The bytes of the file are the canonical JSON of this value under RFC 8785, so this value states them exactly and size_bytes and digest are absent.",
          "x-runlocal-absent": true
        },
        "size_bytes": {
          "description": "The exact byte length before parsing. Absent when content states the value: the canonical JSON of that value gives the bytes.",
          "$ref": "#/$defs/Nat",
          "x-runlocal-absent": true
        },
        "digest": {
          "description": "SHA-256 of the exact bytes before parsing. Absent when content states the value: the canonical JSON of that value gives the bytes.",
          "$ref": "#/$defs/Digest",
          "x-runlocal-absent": true
        },
        "location": {
          "description": "Where the bytes are, when they do not travel with the request. Absent: the bytes are in the transport, under content or under objects. The location is not part of the contract digest or of an example digest. GET /api/v1 states which locations the service accepts.",
          "$ref": "#/$defs/FileLocation",
          "x-runlocal-absent": true
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "FileLocation": {
      "title": "FileLocation",
      "description": "A place of file bytes other than the request.",
      "oneOf": [
        {
          "$ref": "#/$defs/UrlFileLocation"
        },
        {
          "$ref": "#/$defs/StoredFileLocation"
        }
      ],
      "discriminator": {
        "mapping": {
          "url": "#/$defs/UrlFileLocation",
          "stored": "#/$defs/StoredFileLocation"
        },
        "propertyName": "kind"
      }
    },
    "FileQuantizationTensor": {
      "title": "FileQuantizationTensor",
      "description": "A public tensor with exact values in a bundled quantization-tensor document. It is public also when the weight port is private: private covers the values of the weight and its local tensors, and the user decides to publish this one tensor, for example a scale.",
      "type": "object",
      "required": [
        "kind",
        "file",
        "tensor",
        "type"
      ],
      "properties": {
        "kind": {
          "description": "Always \"file\". Selects this alternative.",
          "type": "string",
          "const": "file"
        },
        "file": {
          "description": "A file with role model and format json that holds a runlocal.quantization-tensors/1.0 document. Its bytes are the exact RFC 8785 canonical JSON form: keys sorted, no whitespace, and no final newline. This is the one file of a request that needs the canonical form, and another form has the finding QUANTIZATION.FILE_INVALID. It travels with the request.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/files"
        },
        "tensor": {
          "description": "A tensor name in that document.",
          "$ref": "#/$defs/NativeName"
        },
        "type": {
          "$ref": "#/$defs/TensorType"
        }
      },
      "additionalProperties": false
    },
    "FileValueSource": {
      "title": "FileValueSource",
      "description": "A value in a file. The location of the file states where its bytes are: in the request, at a URL, or in the object store. A file gives its value to the service, so the receiver must state private false.",
      "type": "object",
      "required": [
        "kind",
        "file"
      ],
      "properties": {
        "kind": {
          "description": "Always \"file\". Selects this alternative.",
          "type": "string",
          "const": "file"
        },
        "file": {
          "description": "The file that holds the value. For an example value the file has role sample. For a public constant the file has role model or extension.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/files"
        },
        "key": {
          "description": "The name of one tensor in a file that holds many, such as a safetensors or npz file. Absent: the file holds the complete value, or this is a group source, where each port takes its port name as the key.",
          "type": "string",
          "maxLength": 512,
          "minLength": 1,
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "FixedGeneratedValue": {
      "title": "FixedGeneratedValue",
      "description": "A fixed synthetic source for a float, double, float16, bfloat16, or integer port. It can supply a known zero point or a counter that starts at zero.",
      "type": "object",
      "required": [
        "kind",
        "generator",
        "version",
        "seed",
        "value"
      ],
      "properties": {
        "kind": {
          "description": "Always \"generated\". Selects this alternative.",
          "type": "string",
          "const": "generated"
        },
        "generator": {
          "description": "One synthetic value repeated for every logical element.",
          "type": "string",
          "const": "fixed"
        },
        "version": {
          "description": "The fixed-v1 algorithm in SEMANTICS.md.",
          "type": "string",
          "const": "1"
        },
        "seed": {
          "description": "The unsigned 32-bit seed. It is retained so a group source has the same shape as other generated sources.",
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "value": {
          "description": "The value before conversion to the port element type. For an integer port it is an integer that fits the port, with a magnitude of at most 2^53 - 1.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "Format": {
      "title": "Format",
      "description": "How to parse the file's bytes. onnx/<message>@<release>: a serialized ONNX protobuf message under that exact ONNX release, for example onnx/ModelProto@1.23.0. Its ir_version and opset_import describe that artifact. json: a UTF-8 JSON document parsed under the same strict rules as the request. bytes/<media type>: anything else, for example bytes/application/x-npz or bytes/application/x-safetensors. The service does not parse such a file, so the media type is a label for people and tools.",
      "type": "string",
      "pattern": "^(onnx/(ModelProto|TypeProto|TensorProto|SparseTensorProto|AttributeProto)@[0-9]+\\.[0-9]+\\.[0-9]+|json|bytes/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*/[A-Za-z0-9][A-Za-z0-9!#$&^_.+-]*)$",
      "examples": [
        "onnx/ModelProto@1.23.0",
        "json",
        "bytes/application/x-npz",
        "bytes/application/x-safetensors"
      ],
      "x-runlocal-form": "onnx/<message>@<release>, json, or bytes/<media type>"
    },
    "Function": {
      "title": "Function",
      "description": "One function of the model: its interface, quantization overlay, terms for judging a replacement, and float body. A conflict between interface and body is invalid. Inputs and outputs are exact: no implicit cast, broadcast, reshape, or layout change happens at the boundary.",
      "type": "object",
      "required": [
        "inputs",
        "outputs",
        "body"
      ],
      "properties": {
        "inputs": {
          "description": "Inputs by name, with their shared value policies.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/InputPort"
          }
        },
        "outputs": {
          "description": "Outputs by name. Each value is a bare type text such as float[N,10], and not a record as an input is, because an output has no value policy. In a steps body, an output dimension that comes from a step is one of three forms: a number, a symbol of an input of this function when the called function binds it, or a new symbol. A new symbol is one that no input or weight port of this function has. It stands for the output dimension of one step only, so two outputs from two steps need two symbols, for example Q0 and Q1. Declare it in dimensions with a range that contains the range of the called function.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/TypeFact"
          }
        },
        "dimensions": {
          "description": "Dimension declarations, scoped to this function. An empty map adds no restrictions to existing shape symbols.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/DimensionName"
          },
          "additionalProperties": {
            "$ref": "#/$defs/Dimension"
          },
          "default": {}
        },
        "weights": {
          "description": "The logical weight ports of the function. This is the only weight interface. Omitted means the function has no weights. In a graph body, each port is a main-graph input and never an initializer. A native export such as ONNX keeps trained weights as initializers, so in the graph document move each trained initializer to the graph inputs, and keep as initializers only the constants of the model.",
          "default": {},
          "$ref": "#/$defs/WeightPorts"
        },
        "state": {
          "description": "Pairs of ordinary input and output ports that an entrypoint can bind to session slots.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/StatePair"
          },
          "default": {}
        },
        "constraints": {
          "description": "Conditions every call must satisfy. A caller never narrows them silently.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Constraint"
          },
          "default": []
        },
        "contract": {
          "description": "The terms for judging a replacement. Omitted means the base contract.",
          "default": {
            "layout": "any",
            "numerics": "as_written",
            "observe": "outputs",
            "reference": "math"
          },
          "$ref": "#/$defs/Contract"
        },
        "quantization": {
          "description": "Quantization substitutions outside the float body. Omitted means the function is not quantized.",
          "default": {
            "storage": null,
            "values": {},
            "weights": {}
          },
          "$ref": "#/$defs/QuantizationOverlay"
        },
        "body": {
          "$ref": "#/$defs/Body"
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "GeneratedValue": {
      "title": "GeneratedValue",
      "description": "A reproducible synthetic source. The generator selects the exact versioned algorithm.",
      "anyOf": [
        {
          "$ref": "#/$defs/UniformGeneratedValue"
        },
        {
          "$ref": "#/$defs/IntegerGeneratedValue"
        },
        {
          "$ref": "#/$defs/FixedGeneratedValue"
        }
      ]
    },
    "GraphBody": {
      "title": "GraphBody",
      "description": "A pure computation defined by an authoritative runlocal.graph JSON document. An optional source artifact records provenance only. Standard operators, local functions, If, Loop, and Scan keep their stated meaning and defaults. Nodes and values use the names in the graph, or graph paths such as /graph/node/17 when they have none.",
      "type": "object",
      "required": [
        "kind",
        "graph"
      ],
      "properties": {
        "kind": {
          "description": "Always \"graph\". Selects this alternative.",
          "type": "string",
          "const": "graph"
        },
        "graph": {
          "description": "A json file with role model holding the authoritative runlocal.graph document. The graph defines the computation.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/files"
        },
        "source": {
          "description": "An optional source artifact from which the graph was made. It is provenance only and does not define the computation. Do not attach a native model file whose initializers hold private weights: an ordinary ONNX export of a trained model does.",
          "anyOf": [
            {
              "description": "A source file name.",
              "$ref": "#/$defs/Id",
              "x-runlocal-ref": "/files"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "inputs": {
          "description": "Function input name to main-graph input name, for inputs whose names differ. An input not listed maps to the graph input with the same name.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "description": "The main-graph input name.",
            "type": "string"
          },
          "default": {}
        },
        "outputs": {
          "description": "Function output name to main-graph output name, for outputs whose names differ.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "description": "The main-graph output name.",
            "type": "string"
          },
          "default": {}
        },
        "weights": {
          "description": "Graph-input name overrides for weight ports whose public names differ. A port not listed uses the graph input with the same name. Each graph input takes at most one port. A replaceable weight input must not also be an initializer. An initializer is a model constant, and its bytes stay in the graph or an external data file. A graph input that no weight port binds is data.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/WeightLocation"
          },
          "default": {}
        },
        "external_data": {
          "description": "Every external-data location the model uses, sorted by location.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExternalData"
          },
          "default": []
        }
      },
      "additionalProperties": false
    },
    "Id": {
      "title": "Id",
      "description": "A name: a letter followed by up to 127 letters, digits, underscores, dots, or hyphens. Map keys and references are names. Each map is its own namespace, so a file and a function may share a name.",
      "type": "string",
      "pattern": "^[A-Za-z][A-Za-z0-9_.-]{0,127}$",
      "examples": [
        "detect",
        "lidar.onnx"
      ],
      "x-runlocal-form": "a letter followed by up to 127 letters, digits, underscores, dots, or hyphens"
    },
    "IdOrDefaults": {
      "title": "IdOrDefaults",
      "description": "A map key: a name, or * for the entry that gives defaults to every other entry of the map. The * entry is written-form shorthand and does not remain after elaboration.",
      "type": "string",
      "pattern": "^(?:\\*|[A-Za-z][A-Za-z0-9_.-]{0,127})$",
      "examples": [
        "fc1.weight",
        "*"
      ],
      "x-runlocal-form": "a name, or * for the defaults of every entry in this map"
    },
    "InputPort": {
      "title": "InputPort",
      "description": "One function input. Its type, privacy, and value domain apply to every binding path.",
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "$ref": "#/$defs/TypeFact"
        },
        "private": {
          "description": "Whether actual values must stay local and must not appear in the request. The default is true. A private receiver takes a local, generated, or none source, never a file or a constant. For a public value, such as a weight of a public checkpoint, write false on each declaration of it: the function port, and the slot when one exists. Synthetic generated values are not actual client values.",
          "type": "boolean",
          "default": true
        },
        "domain": {
          "description": "The value domain: restrictions that every call obeys, such as finite values and bounds. It holds no value of the tensor. Omitted means no restriction.",
          "default": {
            "minimum": null,
            "maximum": null,
            "distinct": null,
            "finite": false
          },
          "$ref": "#/$defs/ValueDomain"
        }
      },
      "additionalProperties": false
    },
    "IntegerGeneratedValue": {
      "title": "IntegerGeneratedValue",
      "description": "A reproducible unbiased source for one int4, uint4, int8, uint8, int16, uint16, int32, uint32, int64, or uint64 port.",
      "type": "object",
      "required": [
        "kind",
        "generator",
        "version",
        "seed",
        "lower",
        "upper"
      ],
      "properties": {
        "kind": {
          "description": "Always \"generated\". Selects this alternative.",
          "type": "string",
          "const": "generated"
        },
        "generator": {
          "description": "Unbiased synthetic integer values. This does not establish model accuracy.",
          "type": "string",
          "const": "integer"
        },
        "version": {
          "description": "The integer-v1 algorithm in SEMANTICS.md.",
          "type": "string",
          "const": "1"
        },
        "seed": {
          "description": "The unsigned 32-bit seed, including zero.",
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "lower": {
          "description": "The inclusive lower integer. It fits the port element type, and its magnitude is at most 2^53 - 1.",
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "upper": {
          "description": "The inclusive upper integer. It fits the port element type, its magnitude is at most 2^53 - 1, and the span upper - lower + 1 is at most 4294967296.",
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        }
      },
      "additionalProperties": false
    },
    "KnowledgeEntry": {
      "title": "KnowledgeEntry",
      "description": "An unanswered question or evidence with an explicit outcome.",
      "anyOf": [
        {
          "$ref": "#/$defs/UnknownKnowledge"
        },
        {
          "$ref": "#/$defs/EvidenceKnowledge"
        }
      ]
    },
    "KnowledgePurpose": {
      "title": "KnowledgePurpose",
      "description": "Why this knowledge exists. fact: a fact about the model, its values, or its source. An inline {unknown}, a missing body, and an incomplete source can name only an unknown entry with this purpose. source_equivalence: the request agrees with the customer's source. replacement_equivalence: a replacement agrees with the request. baseline_fidelity: a quantized or changed model stays faithful to a baseline request. other: each other purpose.",
      "type": "string",
      "enum": [
        "fact",
        "source_equivalence",
        "replacement_equivalence",
        "baseline_fidelity",
        "other"
      ]
    },
    "Layout": {
      "title": "Layout",
      "description": "The memory interface. An extension states layout, strides, alignment, address space, ownership, lifetime, and readiness, separating restrictions from freedoms.",
      "anyOf": [
        {
          "description": "any: inputs and outputs are logical values. Memory layout, strides, padding, addresses, and aliasing are neither promised nor observed.",
          "type": "string",
          "const": "any"
        },
        {
          "$ref": "#/$defs/Extension"
        },
        {
          "$ref": "#/$defs/UnknownRef"
        }
      ]
    },
    "LocalQuantizationTensor": {
      "title": "LocalQuantizationTensor",
      "description": "A private tensor in the local weight source that the example selects for this weight. Its full binding is <weight source binding>.<binding>. With the group source checkpoint, the binding layer1.qweight names checkpoint.layer1.qweight: the group binding is the prefix, not the derived binding of the port. So under one group, give each tensor a binding of its own. With a source of its own, the binding of that source is the prefix.",
      "type": "object",
      "required": [
        "kind",
        "binding",
        "type"
      ],
      "properties": {
        "kind": {
          "description": "Always \"local\". Selects this alternative.",
          "type": "string",
          "const": "local"
        },
        "binding": {
          "description": "The tensor name relative to the selected local weight source.",
          "$ref": "#/$defs/NativeName"
        },
        "type": {
          "$ref": "#/$defs/TensorType"
        }
      },
      "additionalProperties": false
    },
    "LocalValueSource": {
      "title": "LocalValueSource",
      "description": "A value that stays on the customer's machine. A digest identifies its exact bytes without sending them.",
      "type": "object",
      "required": [
        "kind",
        "binding"
      ],
      "properties": {
        "kind": {
          "description": "Always \"local\". Selects this alternative.",
          "type": "string",
          "const": "local"
        },
        "binding": {
          "description": "A name for a value on the customer's machine. The service never follows it.",
          "$ref": "#/$defs/Id"
        },
        "digest": {
          "description": "The SHA-256 of the exact local bytes, or null. In a group source it is the digest of the one local container, for example the checkpoint file, and each port of the group keeps it. In a source of one value it identifies the exact local bytes that the binding names.",
          "anyOf": [
            {
              "$ref": "#/$defs/Digest"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "Missing": {
      "title": "Missing",
      "description": "No body is supplied yet. Names at least one fact-purpose unknown knowledge entry.",
      "type": "object",
      "required": [
        "kind",
        "unknowns"
      ],
      "properties": {
        "kind": {
          "description": "Always \"missing\". Selects this alternative.",
          "type": "string",
          "const": "missing"
        },
        "unknowns": {
          "description": "Fact-purpose unknown knowledge names. Members are unique and sorted by their canonical JSON bytes.",
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "description": "An unknown knowledge name.",
            "$ref": "#/$defs/Id",
            "x-runlocal-ref": "/knowledge"
          }
        }
      },
      "additionalProperties": false
    },
    "Nat": {
      "title": "Nat",
      "description": "A whole number from 0 to 2^53 - 1, written as a JSON integer.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "NativeName": {
      "title": "NativeName",
      "description": "A non-empty native tensor name, including spaces, slashes, or dots.",
      "type": "string",
      "minLength": 1
    },
    "NoValueSource": {
      "title": "NoValueSource",
      "description": "No value is supplied. A later caller must supply it.",
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "description": "Always \"none\". Selects this alternative.",
          "type": "string",
          "const": "none"
        }
      },
      "additionalProperties": false
    },
    "Note": {
      "title": "Note",
      "description": "Free text for the people reviewing this document. Notes are part of the revision digest and excluded from the contract and example digests, so they never change what is being asked.",
      "type": "string"
    },
    "Numerics": {
      "title": "Numerics",
      "description": "The numerical terms. Keep the default as_written unless the customer states other terms. A tolerance is not written here: it belongs to the evidence entry of a comparison. When the user has decided no tolerance, keep as_written and write no unknown. An extension states product, accumulator, intermediate and output precision, rounding, overflow, reassociation, exceptional values, and approximation beyond the body as written.",
      "anyOf": [
        {
          "description": "as_written: the body's own operations define the permitted numerical outcomes. Nothing narrower, such as one runtime's bits, and nothing wider, such as reassociation, is granted.",
          "type": "string",
          "const": "as_written"
        },
        {
          "$ref": "#/$defs/Extension"
        },
        {
          "$ref": "#/$defs/UnknownRef"
        }
      ]
    },
    "Observe": {
      "title": "Observe",
      "description": "What counts as an observable result of a call.",
      "anyOf": [
        {
          "description": "outputs: what counts is the outputs as logical values, black-box effects in their required order, and whether the call terminates. Timings, addresses, and debug values are not observations.",
          "type": "string",
          "const": "outputs"
        },
        {
          "$ref": "#/$defs/Extension"
        },
        {
          "$ref": "#/$defs/UnknownRef"
        }
      ]
    },
    "OnnxAffineQuantization": {
      "title": "OnnxAffineQuantization",
      "description": "The exact affine relation from checked ONNX QuantizeLinear and DequantizeLinear schemas. The pinned schemas define rounding, saturation, attributes, output types, and the full range of the code type.",
      "type": "object",
      "required": [
        "kind",
        "domain",
        "opset",
        "quantize_schema_version",
        "dequantize_schema_version",
        "code_type",
        "granularity"
      ],
      "properties": {
        "kind": {
          "description": "Always \"onnx_affine\". Selects this alternative.",
          "type": "string",
          "const": "onnx_affine"
        },
        "domain": {
          "description": "The standard ONNX domain.",
          "type": "string",
          "const": ""
        },
        "opset": {
          "description": "The imported ONNX opset used to resolve the two schemas. Use the opset that the graph of the function imports.",
          "$ref": "#/$defs/Nat"
        },
        "quantize_schema_version": {
          "description": "The since_version of QuantizeLinear at that opset. Read it from the operator route: GET /api/v1/operators/onnx/QuantizeLinear with the opset, then definition.since_version. Do not add QuantizeLinear or DequantizeLinear to operators when no graph node applies them.",
          "$ref": "#/$defs/Nat"
        },
        "dequantize_schema_version": {
          "description": "The since_version of DequantizeLinear at that opset, from the operator route.",
          "$ref": "#/$defs/Nat"
        },
        "code_type": {
          "description": "The stored or transient code type.",
          "type": "string",
          "enum": [
            "int2",
            "uint2",
            "int4",
            "uint4",
            "int8",
            "uint8",
            "int16",
            "uint16",
            "float8e4m3fn"
          ]
        },
        "granularity": {
          "$ref": "#/$defs/QuantizationGranularity"
        }
      },
      "additionalProperties": false
    },
    "OnnxOperator": {
      "title": "OnnxOperator",
      "description": "An ONNX operator. Domain, op_type, overload, and opset identify it. The request-local map key is the name graph nodes use.",
      "type": "object",
      "required": [
        "kind",
        "domain",
        "op_type",
        "opset",
        "semantics",
        "uses"
      ],
      "properties": {
        "kind": {
          "description": "Always \"onnx\". Selects this alternative.",
          "type": "string",
          "const": "onnx"
        },
        "domain": {
          "description": "The operator domain as the graphs spell it; empty for the standard operators.",
          "type": "string"
        },
        "op_type": {
          "description": "The operator type name.",
          "type": "string"
        },
        "overload": {
          "description": "The overload, when the model uses one.",
          "type": "string",
          "default": ""
        },
        "opset": {
          "description": "The opset version the graphs import for this domain where the operator is applied, for example 18. It is not the since_version of the operator, which the operator route also returns.",
          "$ref": "#/$defs/Nat"
        },
        "semantics": {
          "$ref": "#/$defs/OperatorSemantics"
        },
        "uses": {
          "description": "How many nodes apply this operator, counted across every graph body, including subgraphs and local function bodies. A validator checks it against the graphs.",
          "$ref": "#/$defs/Nat"
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "Operator": {
      "title": "Operator",
      "description": "One operator used by graph nodes. A graph uses either Torch operators or ONNX operators, never both. Torch is the default for a model that is written in PyTorch: the graph states the Torch operators that the program calls, in a pinned environment, so nothing is converted. ONNX is for a model that the customer already has as ONNX. To export a PyTorch model to ONNX is a conversion and a trace, which can change the computation, so do not make an export only for a request.",
      "oneOf": [
        {
          "$ref": "#/$defs/TorchOperator"
        },
        {
          "$ref": "#/$defs/OnnxOperator"
        }
      ],
      "discriminator": {
        "mapping": {
          "torch": "#/$defs/TorchOperator",
          "onnx": "#/$defs/OnnxOperator"
        },
        "propertyName": "kind"
      }
    },
    "OperatorSemantics": {
      "title": "OperatorSemantics",
      "description": "What defines the operator: the checked-in ONNX catalog, a local function, a versioned operator extension, or an explicit unknown. A link never defines an operator. An unknown operator is never read as Identity or as an unspecified pure operation.",
      "anyOf": [
        {
          "description": "onnx: the checked-in ONNX catalog defines the operator at this opset. Only an operator in a standard domain may use it.",
          "type": "string",
          "const": "onnx"
        },
        {
          "description": "local_function: a function in each graph document defines the operator. The function and every operator it reaches must resolve.",
          "type": "string",
          "const": "local_function"
        },
        {
          "$ref": "#/$defs/Extension"
        },
        {
          "$ref": "#/$defs/UnknownRef"
        }
      ]
    },
    "OutputBinding": {
      "title": "OutputBinding",
      "description": "What the source produced for one output when it ran on the values of this example: a reference for a comparison. The service never builds it into the computation. A reference file gives its value to the service, so write one only when the user accepts that.",
      "type": "object",
      "required": [
        "source"
      ],
      "properties": {
        "source": {
          "$ref": "#/$defs/OutputValueSource"
        },
        "statistics": {
          "description": "Observations about the reference value, or null. They give the service a summary to compare against when the file itself stays local or is not written.",
          "anyOf": [
            {
              "$ref": "#/$defs/ValueStatistics"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "tolerance": {
          "description": "The accepted difference between the output of the computation on the values of this example and this reference, as text with its metric, for example max_abs <= 1e-5. The user decides it. Absent: the service measures the difference and states it, and judges nothing.",
          "type": "string",
          "minLength": 1,
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "OutputValueSource": {
      "title": "OutputValueSource",
      "description": "Where the reference value of one output is: no value, a value that stays on the customer's machine, or a file with role sample that the service can read.",
      "oneOf": [
        {
          "$ref": "#/$defs/NoValueSource"
        },
        {
          "$ref": "#/$defs/LocalValueSource"
        },
        {
          "$ref": "#/$defs/FileValueSource"
        }
      ],
      "discriminator": {
        "mapping": {
          "none": "#/$defs/NoValueSource",
          "local": "#/$defs/LocalValueSource",
          "file": "#/$defs/FileValueSource"
        },
        "propertyName": "kind"
      }
    },
    "PackageName": {
      "title": "PackageName",
      "description": "A valid Python package name. A semantic rule requires its normalized lowercase form with hyphens.",
      "type": "string",
      "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?(?![\\s\\S])",
      "maxLength": 128
    },
    "ParentWeight": {
      "title": "ParentWeight",
      "description": "The weight port of the enclosing function. Binding the same port more than once shares one logical weight.",
      "type": "object",
      "required": [
        "port"
      ],
      "properties": {
        "port": {
          "$ref": "#/$defs/Id"
        }
      },
      "additionalProperties": false
    },
    "Pointer": {
      "title": "Pointer",
      "description": "An RFC 6901 JSON Pointer. Into this request, it resolves against the request with each default filled in, so it can name a field that you omitted, for example /functions/detect/contract/reference. Into a graph document of the request, it starts with /objects and the file name, for example /objects/encoder.graph.json/graph/nodes/17. It is not the node path of a target selection, which has the form /graph/node/17.",
      "type": "string",
      "pattern": "^(?:/(?:[^~]|~[01])*)*$",
      "examples": [
        "/functions/detect/contract/reference",
        "/objects/encoder.graph.json/graph/nodes/17"
      ],
      "x-runlocal-form": "an RFC 6901 JSON Pointer"
    },
    "PythonName": {
      "title": "PythonName",
      "description": "A Python parameter, interface value, or top-level callable name.",
      "type": "string",
      "pattern": "^[A-Za-z_][A-Za-z0-9_]*(?![\\s\\S])"
    },
    "QuantizationBlocked": {
      "title": "QuantizationBlocked",
      "description": "One scale and zero point apply to each block on one axis.",
      "type": "object",
      "required": [
        "kind",
        "axis",
        "block_size"
      ],
      "properties": {
        "kind": {
          "description": "Always \"blocked\". Selects this alternative.",
          "type": "string",
          "const": "blocked"
        },
        "axis": {
          "description": "The blocked axis. A negative value counts from the end.",
          "type": "integer"
        },
        "block_size": {
          "description": "The number of adjacent values in a block. The final block may be shorter.",
          "type": "integer",
          "minimum": 1
        }
      },
      "additionalProperties": false
    },
    "QuantizationGranularity": {
      "title": "QuantizationGranularity",
      "description": "How scale and zero point broadcast over the logical tensor.",
      "oneOf": [
        {
          "$ref": "#/$defs/QuantizationPerTensor"
        },
        {
          "$ref": "#/$defs/QuantizationPerAxis"
        },
        {
          "$ref": "#/$defs/QuantizationBlocked"
        }
      ],
      "discriminator": {
        "mapping": {
          "per_tensor": "#/$defs/QuantizationPerTensor",
          "per_axis": "#/$defs/QuantizationPerAxis",
          "blocked": "#/$defs/QuantizationBlocked"
        },
        "propertyName": "kind"
      }
    },
    "QuantizationImplicitZeroPoint": {
      "title": "QuantizationImplicitZeroPoint",
      "description": "No stored zero point: ONNX then takes an all-zero zero point. Use it only when the pinned QuantizeLinear schema can give the code type with no zero point input. Before schema version 21, QuantizeLinear has no output_dtype attribute, so an absent zero point gives uint8 codes only. For int8 or another code type under such a schema, also for symmetric quantization, write a stored zero point of the code type with each value 0.",
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "description": "Always \"implicit_zero\". Selects this alternative.",
          "type": "string",
          "const": "implicit_zero"
        }
      },
      "additionalProperties": false
    },
    "QuantizationOverlay": {
      "title": "QuantizationOverlay",
      "description": "The only quantization statement for a function. The float body stays authoritative. Entries substitute effective values without adding quantization operators to the body.",
      "type": "object",
      "properties": {
        "weights": {
          "description": "Logical weight port names and their stored quantized forms. The key * gives the scheme that every entry shares.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/IdOrDefaults"
          },
          "additionalProperties": {
            "$ref": "#/$defs/QuantizedWeight"
          },
          "default": {},
          "patternProperties": {
            "^\\*$": {
              "$ref": "#/$defs/QuantizedWeightDefaults"
            }
          },
          "x-runlocal-defaults": true
        },
        "values": {
          "description": "Named values and their quantize-dequantize substitutions.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/NativeName"
          },
          "additionalProperties": {
            "$ref": "#/$defs/QuantizedValue"
          },
          "default": {}
        },
        "storage": {
          "description": "No packing or other storage extension.",
          "anyOf": [
            {
              "$ref": "#/$defs/Extension"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "QuantizationPerAxis": {
      "title": "QuantizationPerAxis",
      "description": "One scale and zero point apply to each position on one axis.",
      "type": "object",
      "required": [
        "kind",
        "axis"
      ],
      "properties": {
        "kind": {
          "description": "Always \"per_axis\". Selects this alternative.",
          "type": "string",
          "const": "per_axis"
        },
        "axis": {
          "description": "The axis of the logical weight or value that the parameters follow. A negative value counts from the end. The scale has one element for each index of this axis, so a weight float[64,32] with axis 1 has the scale float[32].",
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "QuantizationPerTensor": {
      "title": "QuantizationPerTensor",
      "description": "One scale and zero point apply to the whole tensor.",
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "description": "Always \"per_tensor\". Selects this alternative.",
          "type": "string",
          "const": "per_tensor"
        }
      },
      "additionalProperties": false
    },
    "QuantizationStoredTensor": {
      "title": "QuantizationStoredTensor",
      "description": "Where a quantization tensor comes from. Local values remain private. File values are public and exact.",
      "oneOf": [
        {
          "$ref": "#/$defs/LocalQuantizationTensor"
        },
        {
          "$ref": "#/$defs/FileQuantizationTensor"
        }
      ],
      "discriminator": {
        "mapping": {
          "local": "#/$defs/LocalQuantizationTensor",
          "file": "#/$defs/FileQuantizationTensor"
        },
        "propertyName": "kind"
      }
    },
    "QuantizationStoredZeroPoint": {
      "title": "QuantizationStoredZeroPoint",
      "description": "A stored zero-point tensor. It has the code type and the shape of the scale. Symmetric int8 quantization under a QuantizeLinear schema before version 21 uses this form, with each value 0. Such a tensor of zeros states only that the quantization is symmetric, so it can be a public file tensor when the user agrees; a local tensor needs that tensor in the local weight source. This kind stored is not the file location stored.",
      "type": "object",
      "required": [
        "kind",
        "tensor"
      ],
      "properties": {
        "kind": {
          "description": "Always \"stored\". Selects this alternative.",
          "type": "string",
          "const": "stored"
        },
        "tensor": {
          "$ref": "#/$defs/QuantizationStoredTensor"
        }
      },
      "additionalProperties": false
    },
    "QuantizationZeroPoint": {
      "title": "QuantizationZeroPoint",
      "description": "How the affine zero point is supplied.",
      "oneOf": [
        {
          "$ref": "#/$defs/QuantizationImplicitZeroPoint"
        },
        {
          "$ref": "#/$defs/QuantizationStoredZeroPoint"
        }
      ],
      "discriminator": {
        "mapping": {
          "implicit_zero": "#/$defs/QuantizationImplicitZeroPoint",
          "stored": "#/$defs/QuantizationStoredZeroPoint"
        },
        "propertyName": "kind"
      }
    },
    "QuantizedValue": {
      "title": "QuantizedValue",
      "description": "A substitution for one named float value. Its effective value is dequantize(quantize(value)).",
      "type": "object",
      "required": [
        "scheme",
        "parameters"
      ],
      "properties": {
        "scheme": {
          "$ref": "#/$defs/OnnxAffineQuantization"
        },
        "parameters": {
          "$ref": "#/$defs/ValueQuantizationParameters"
        }
      },
      "additionalProperties": false
    },
    "QuantizedWeight": {
      "title": "QuantizedWeight",
      "description": "A substitution for one logical float weight port. Its effective value is (codes - zero_point) * scale. The scheme may come from the * entry of the map. After elaboration every entry has a scheme.",
      "type": "object",
      "required": [
        "codes",
        "scale",
        "zero_point"
      ],
      "properties": {
        "scheme": {
          "$ref": "#/$defs/OnnxAffineQuantization"
        },
        "codes": {
          "$ref": "#/$defs/QuantizationStoredTensor"
        },
        "scale": {
          "$ref": "#/$defs/QuantizationStoredTensor"
        },
        "zero_point": {
          "$ref": "#/$defs/QuantizationZeroPoint"
        }
      },
      "additionalProperties": false,
      "x-runlocal-shared": [
        "scheme"
      ]
    },
    "QuantizedWeightDefaults": {
      "title": "QuantizedWeightDefaults",
      "description": "The scheme that every entry of the map shares, written once under the key *. An entry's own scheme wins. Stored tensors are never shared. This entry exists only in the written form.",
      "type": "object",
      "properties": {
        "scheme": {
          "$ref": "#/$defs/OnnxAffineQuantization"
        }
      },
      "additionalProperties": false,
      "x-runlocal-defaults": true
    },
    "Reference": {
      "title": "Reference",
      "description": "What a correctness claim compares against. An extension pins a runtime: framework, library, compiler, driver, and device.",
      "anyOf": [
        {
          "description": "math: correctness is judged against the mathematical meaning of the body, including the nondeterminism it permits, not against one runtime.",
          "type": "string",
          "const": "math"
        },
        {
          "$ref": "#/$defs/Extension"
        },
        {
          "$ref": "#/$defs/UnknownRef"
        }
      ]
    },
    "RequestLink": {
      "title": "RequestLink",
      "description": "External reference material. It is not computation, verified evidence, a source of required settings, or instructions to execute. Include required settings in source.configuration and exact evidence snapshots in files.",
      "type": "object",
      "required": [
        "url",
        "kind",
        "title"
      ],
      "properties": {
        "url": {
          "description": "An absolute HTTPS URL without credentials or access tokens. Validation never fetches it. Prefer a commit-pinned URL for configuration or implementation.",
          "type": "string",
          "minLength": 1
        },
        "kind": {
          "description": "The purpose of this external reference.",
          "type": "string",
          "enum": [
            "configuration",
            "model_card",
            "implementation",
            "paper",
            "documentation",
            "other"
          ]
        },
        "title": {
          "description": "A short display label.",
          "type": "string",
          "maxLength": 200,
          "minLength": 1
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        },
        "scope": {
          "description": "The location this link describes. Omitted, null, or an empty pointer means the whole request.",
          "anyOf": [
            {
              "$ref": "#/$defs/Pointer"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "Select": {
      "title": "Select",
      "description": "Which part of the body a target selects.",
      "anyOf": [
        {
          "description": "body: the whole body of the selected function.",
          "type": "string",
          "const": "body"
        },
        {
          "description": "A convex set of steps in a steps body: no path between selected steps passes through an unselected one.",
          "type": "object",
          "required": [
            "steps"
          ],
          "properties": {
            "steps": {
              "description": "Step names. Members are unique and sorted by their canonical JSON bytes.",
              "type": "array",
              "uniqueItems": true,
              "x-runlocal-set": true,
              "items": {
                "$ref": "#/$defs/Id"
              }
            }
          },
          "additionalProperties": false
        },
        {
          "description": "A convex set of nodes in a graph body: no path between selected nodes passes through an unselected one. One node is always convex. A selected control-flow node includes its nested graphs; a selection inside a loop or local function applies to every execution. A selection does not select a part of the quantization overlay: the report of a target lists each quantization entry of each function that the target reaches.",
          "type": "object",
          "required": [
            "nodes"
          ],
          "properties": {
            "nodes": {
              "description": "Node names or paths. Members are unique and sorted by their canonical JSON bytes.",
              "type": "array",
              "uniqueItems": true,
              "x-runlocal-set": true,
              "items": {
                "description": "A graph node name, or the node path /graph/node/<index> for a node whose name is empty or not unique, for example /graph/node/17. The index is the position in the nodes list of the graph. It is a path of this protocol, not a JSON Pointer.",
                "type": "string"
              }
            }
          },
          "additionalProperties": false
        },
        {
          "$ref": "#/$defs/Extension"
        }
      ]
    },
    "SideEffects": {
      "title": "SideEffects",
      "description": "What an opaque black box may touch beyond its inputs and outputs. Unknown is never treated as none.",
      "anyOf": [
        {
          "description": "declared: the black box touches only the session state pairs in its function interface. Read and write ports state each access. With no state pair it has no session-state effects.",
          "type": "string",
          "const": "declared"
        },
        {
          "$ref": "#/$defs/UnknownRef"
        }
      ]
    },
    "Source": {
      "title": "Source",
      "description": "Where the model comes from and whether this document covers it completely. Complete coverage of one entrypoint is never a claim about the whole application.",
      "type": "object",
      "required": [
        "name",
        "version",
        "coverage"
      ],
      "properties": {
        "name": {
          "description": "A short name for the customer's program or repository, for example lidar-detector. It is a name, not a URL: put the URL of the repository in links, with kind implementation.",
          "$ref": "#/$defs/Id"
        },
        "version": {
          "$ref": "#/$defs/SourceVersion"
        },
        "configuration": {
          "description": "The resolved model configuration, or null. Omit it for a model with no configuration system, because null is the default: the types of the request already state its sizes. Do not put the identity of a checkpoint here; an example weight source states it.",
          "anyOf": [
            {
              "$ref": "#/$defs/Configuration"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "coverage": {
          "$ref": "#/$defs/SourceCoverage"
        }
      },
      "additionalProperties": false
    },
    "SourceCoverage": {
      "title": "SourceCoverage",
      "description": "Whether this request describes every source behavior in scope. The scope is the computation of the entrypoints of this request. Training code, data loading, and processing outside the entrypoints are not in scope.",
      "anyOf": [
        {
          "description": "Every source behavior in scope is described. An open question about a value, such as whether an input can hold NaN, does not make the source incomplete.",
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "description": "Always \"complete\". Selects this alternative.",
              "type": "string",
              "const": "complete"
            }
          },
          "additionalProperties": false
        },
        {
          "description": "Some source behavior is not described. Each missing fact has a knowledge entry.",
          "type": "object",
          "required": [
            "kind",
            "unknowns"
          ],
          "properties": {
            "kind": {
              "description": "Always \"incomplete\". Selects this alternative.",
              "type": "string",
              "const": "incomplete"
            },
            "unknowns": {
              "description": "Unknown knowledge names. Members are unique and sorted by their canonical JSON bytes.",
              "type": "array",
              "minItems": 1,
              "uniqueItems": true,
              "x-runlocal-set": true,
              "items": {
                "description": "A fact-purpose unknown knowledge entry.",
                "$ref": "#/$defs/Id",
                "x-runlocal-ref": "/knowledge"
              }
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "SourceVersion": {
      "title": "SourceVersion",
      "description": "The version of the source: a full Git commit, a tag, or a release. Write it as the source states it, for example a 40-character commit.",
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.+-]{0,127}$",
      "examples": [
        "0123456789abcdef0123456789abcdef01234567",
        "v1.4.2",
        "2.8.0+cu128"
      ],
      "x-runlocal-form": "a letter or digit followed by up to 127 letters, digits, underscores, dots, plus signs, or hyphens"
    },
    "StateInitialSource": {
      "title": "StateInitialSource",
      "description": "How state starts: no value, a public constant, or an extension.",
      "anyOf": [
        {
          "$ref": "#/$defs/NoValueSource"
        },
        {
          "$ref": "#/$defs/ConstantValueSource"
        },
        {
          "$ref": "#/$defs/Extension"
        }
      ]
    },
    "StatePair": {
      "title": "StatePair",
      "description": "One session-state pairing. A read names an ordinary input. A write names an ordinary output. A write-only pair initializes a slot, as a prefill does for a cache. A read-write pair can change its shape across the call, as a decode does: the read input has one extent, such as P, and the write output has another. Each extent that the write permits must fit the range of the read on the next call.",
      "type": "object",
      "properties": {
        "read": {
          "description": "The input port that receives the value before the call, or null.",
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "write": {
          "description": "The output port that returns the value after the call, or null.",
          "anyOf": [
            {
              "$ref": "#/$defs/Id"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false,
      "minProperties": 1
    },
    "StateSlot": {
      "title": "StateSlot",
      "description": "A persistent logical value such as a cache or a counter, keyed by name. Its bound function input and output ports state its type before and after each call. Separate sessions have separate instances.",
      "type": "object",
      "required": [
        "lives",
        "initial",
        "reset"
      ],
      "properties": {
        "private": {
          "description": "Whether actual values must stay local and must not appear in the request. The default is true. A private receiver takes a local, generated, or none source, never a file or a constant. For a public value, such as a weight of a public checkpoint, write false on each declaration of it: the function port, and the slot when one exists. Synthetic generated values are not actual client values.",
          "type": "boolean",
          "default": true
        },
        "domain": {
          "description": "The value domain: restrictions that every call obeys, such as finite values and bounds. It holds no value of the tensor. Omitted means no restriction.",
          "default": {
            "minimum": null,
            "maximum": null,
            "distinct": null,
            "finite": false
          },
          "$ref": "#/$defs/ValueDomain"
        },
        "lives": {
          "description": "per_call: the instance lives for one call. per_session: it persists across calls in one session.",
          "type": "string",
          "enum": [
            "per_call",
            "per_session"
          ]
        },
        "initial": {
          "$ref": "#/$defs/StateInitialSource"
        },
        "reset": {
          "description": "How the state is reset. Reset is never an implicit event between benchmark runs; a reset inside the model is an explicit state effect.",
          "anyOf": [
            {
              "description": "new_instance: reset only by ending this instance and creating a new one.",
              "type": "string",
              "const": "new_instance"
            },
            {
              "description": "reinitialize: apply the initializer again once dependent calls complete.",
              "type": "string",
              "const": "reinitialize"
            },
            {
              "$ref": "#/$defs/Extension"
            }
          ]
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "StaticQuantizationParameters": {
      "title": "StaticQuantizationParameters",
      "description": "Stored scale and zero point for a value overlay.",
      "type": "object",
      "required": [
        "kind",
        "scale",
        "zero_point"
      ],
      "properties": {
        "kind": {
          "description": "Always \"static\". Selects this alternative.",
          "type": "string",
          "const": "static"
        },
        "scale": {
          "$ref": "#/$defs/QuantizationStoredTensor"
        },
        "zero_point": {
          "$ref": "#/$defs/QuantizationZeroPoint"
        }
      },
      "additionalProperties": false
    },
    "Step": {
      "title": "Step",
      "description": "One call of another function. It runs exactly once per call of the enclosing function, after the steps it depends on complete.",
      "type": "object",
      "required": [
        "call",
        "inputs"
      ],
      "properties": {
        "call": {
          "description": "The function this step calls.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/functions"
        },
        "inputs": {
          "description": "Binds every input of the called function exactly once. The types must agree for every permitted extent. A dimension symbol belongs to one function, so the check binds each symbol of the called function to the dimension of the source: a number, or a symbol of this function. The range of the source must be inside the range of the called symbol. A symbol that only an output of the called function has becomes a new symbol of this step.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ValueRef"
          }
        },
        "weights": {
          "description": "Binds every weight port of the called function exactly once, to a slot in weights or to a port of the enclosing function. No weight is inherited: a * entry is an explicit statement that lifts the called ports. Two steps that name one slot or one parent port share one logical weight.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/IdOrDefaults"
          },
          "additionalProperties": {
            "description": "A program slot or an enclosing function weight port.",
            "anyOf": [
              {
                "description": "A slot in weights.",
                "$ref": "#/$defs/Id",
                "x-runlocal-ref": "/weights"
              },
              {
                "$ref": "#/$defs/ParentWeight"
              }
            ]
          },
          "default": {},
          "patternProperties": {
            "^\\*$": {
              "$ref": "#/$defs/WeightLift"
            }
          },
          "x-runlocal-lift": true
        },
        "after": {
          "description": "Steps that must complete before this one, beyond what the data edges imply. A step never names itself.",
          "type": "array",
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "$ref": "#/$defs/Id"
          },
          "default": []
        }
      },
      "additionalProperties": false
    },
    "StepsBody": {
      "title": "StepsBody",
      "description": "A composition of other functions: the steps, the values between them, and their order. It has no tensor operators, types, branches, or loops. The union of data and after edges is acyclic.",
      "type": "object",
      "required": [
        "kind",
        "steps",
        "outputs"
      ],
      "properties": {
        "kind": {
          "description": "Always \"steps\". Selects this alternative.",
          "type": "string",
          "const": "steps"
        },
        "steps": {
          "description": "Steps by name. Map order carries no ordering.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/Step"
          }
        },
        "outputs": {
          "description": "Binds every output of the enclosing function exactly once.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/Id"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ValueRef"
          }
        }
      },
      "additionalProperties": false
    },
    "StoredFileLocation": {
      "title": "StoredFileLocation",
      "description": "The bytes are in the Runlocal object store. The digest of the file finds them.",
      "type": "object",
      "required": [
        "kind"
      ],
      "properties": {
        "kind": {
          "description": "Always \"stored\". Selects this alternative.",
          "type": "string",
          "const": "stored"
        }
      },
      "additionalProperties": false
    },
    "Target": {
      "title": "Target",
      "description": "Something to optimize. A target selects computation; it never prescribes fusion, a schedule, or a lowering stage. Boundary facts are derived from the document, never declared.",
      "type": "object",
      "required": [
        "where"
      ],
      "properties": {
        "where": {
          "$ref": "#/$defs/Where"
        },
        "select": {
          "description": "Which part of the body. Omitted means the whole body.",
          "default": "body",
          "$ref": "#/$defs/Select"
        },
        "wants": {
          "description": "The kinds of work that this target asks for. Each one is a kind of the published work table, and the request must provide what that kind needs: a want that is not met rejects an upload. Omitted means that the target asks for no kind by name, and then no result of the work menu rejects an upload. The list has no empty spelling.",
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "$ref": "#/$defs/WorkKind"
          },
          "x-runlocal-absent": true
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "TensorType": {
      "title": "TensorType",
      "description": "A tensor type in the ONNX text format: an element type, then the shape in square brackets with no spaces, for example float16[N,512], int64[], or float[?,3]. Element types are the ONNX names (float, double, float16, bfloat16, float8e4m3fn, float8e4m3fnuz, float8e5m2, float8e5m2fnuz, float8e8m0, float4e2m1, int2, int4, int8, int16, int32, int64, uint4, uint2, uint8, uint16, uint32, uint64, bool, string, complex64, complex128); float is 32-bit. A dimension is a whole number, a symbol such as N that names the same extent wherever it appears in one function, or ? for an extent with no name. A shape with a symbol or ? varies at run time; a shape of numbers only is fixed. This format matches an ONNX TypeProto. It is not a second type vocabulary.",
      "type": "string",
      "pattern": "^(float|double|float16|bfloat16|float8e4m3fn|float8e4m3fnuz|float8e5m2|float8e5m2fnuz|float8e8m0|float4e2m1|int2|int4|int8|int16|int32|int64|uint4|uint2|uint8|uint16|uint32|uint64|bool|string|complex64|complex128)\\[((\\?|0|[1-9][0-9]*|[A-Za-z_][A-Za-z0-9_]*)(,(\\?|0|[1-9][0-9]*|[A-Za-z_][A-Za-z0-9_]*))*)?\\]$",
      "examples": [
        "float16[N,512]",
        "int64[]",
        "float[?,3]"
      ],
      "x-runlocal-form": "the ONNX text format, an element type then the shape in square brackets with no spaces; float is the 32-bit float"
    },
    "TiedPair": {
      "title": "TiedPair",
      "description": "Two different weights that hold the same values, for example an embedding slot and an output head slot that the source keeps as two tensors. When the source uses one tensor in two places, do not write a pair: bind one slot in both steps, and that slot is one logical weight.",
      "type": "object",
      "required": [
        "first",
        "second"
      ],
      "properties": {
        "first": {
          "description": "A reference to one function weight port or one weight slot.",
          "$ref": "#/$defs/WeightName"
        },
        "second": {
          "description": "Another weight holding the same values.",
          "$ref": "#/$defs/WeightName"
        }
      },
      "additionalProperties": false
    },
    "Tool": {
      "title": "Tool",
      "description": "The tool that produced one evidence entry.",
      "type": "object",
      "required": [
        "name",
        "version"
      ],
      "properties": {
        "name": {
          "description": "The name of the tool or script that did the work, for example onnxruntime or compare_outputs.py. When an agent did the work by hand, write the name of the agent.",
          "type": "string"
        },
        "version": {
          "description": "The version of that tool, as it reports it. Write unknown when it has none.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TorchApiDefinition": {
      "title": "TorchApiDefinition",
      "description": "A public Torch callable. A top-level operator that resolves to a module class must use a module definition. Its behavior comes from the exact torch package version in the environment.",
      "type": "object",
      "required": [
        "kind",
        "callable"
      ],
      "properties": {
        "kind": {
          "description": "Always \"api\". Selects this alternative.",
          "type": "string",
          "const": "api"
        },
        "callable": {
          "$ref": "#/$defs/TorchCallable"
        }
      },
      "additionalProperties": false
    },
    "TorchCallable": {
      "title": "TorchCallable",
      "description": "A fully qualified public Torch callable, such as torch.matmul or torch.nn.functional.gelu.",
      "type": "string",
      "pattern": "^torch(?:\\.[A-Za-z_][A-Za-z0-9_]*)+(?![\\s\\S])"
    },
    "TorchConfiguration": {
      "title": "TorchConfiguration",
      "description": "Fixed module constructor arguments by parameter name. Values are literal JSON and are never evaluated. A JSON array states a Python tuple or list. A cataloged constructor takes only the JSON types that the catalog states, which never include an object.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/PythonName"
      },
      "additionalProperties": {
        "$ref": "#/$defs/ConfigurationValue"
      }
    },
    "TorchDefinition": {
      "title": "TorchDefinition",
      "description": "What defines a Torch operator: a pinned public API, an eval-only module, or an inline Python callable.",
      "oneOf": [
        {
          "$ref": "#/$defs/TorchApiDefinition"
        },
        {
          "$ref": "#/$defs/TorchModuleDefinition"
        },
        {
          "$ref": "#/$defs/TorchSourceDefinition"
        }
      ],
      "discriminator": {
        "mapping": {
          "api": "#/$defs/TorchApiDefinition",
          "module": "#/$defs/TorchModuleDefinition",
          "source": "#/$defs/TorchSourceDefinition"
        },
        "propertyName": "kind"
      }
    },
    "TorchEnvironment": {
      "title": "TorchEnvironment",
      "description": "A pinned Python environment for Torch operators. The exact package code defines public Torch API behavior.",
      "type": "object",
      "required": [
        "kind",
        "python",
        "packages"
      ],
      "properties": {
        "kind": {
          "description": "Always \"torch\". Selects this alternative.",
          "type": "string",
          "const": "torch"
        },
        "python": {
          "$ref": "#/$defs/ExactPackageVersion"
        },
        "packages": {
          "description": "The exact installed Python packages. This map must contain torch.",
          "type": "object",
          "propertyNames": {
            "$ref": "#/$defs/PackageName"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ExactPackageVersion"
          }
        }
      },
      "additionalProperties": false
    },
    "TorchModuleDefinition": {
      "title": "TorchModuleDefinition",
      "description": "An eval-only torch.nn.Module class and its constructor settings. The module has no hidden state: each node supplies each parameter and buffer.",
      "type": "object",
      "required": [
        "kind",
        "implementation",
        "constructor",
        "training",
        "parameters",
        "buffers"
      ],
      "properties": {
        "kind": {
          "description": "Always \"module\". Selects this alternative.",
          "type": "string",
          "const": "module"
        },
        "implementation": {
          "$ref": "#/$defs/TorchModuleImplementation"
        },
        "constructor": {
          "$ref": "#/$defs/TorchConfiguration"
        },
        "training": {
          "description": "Torch modules are supported only in evaluation mode. This value is always false.",
          "type": "boolean",
          "const": false
        },
        "parameters": {
          "description": "The qualified module parameter names, in named_parameters order. Each node that applies the module supplies each one.",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/TorchStateName"
          }
        },
        "buffers": {
          "description": "The qualified persistent module buffer names, in named_buffers order. Each node that applies the module supplies each one.",
          "type": "array",
          "uniqueItems": true,
          "items": {
            "$ref": "#/$defs/TorchStateName"
          }
        }
      },
      "additionalProperties": false
    },
    "TorchModuleImplementation": {
      "title": "TorchModuleImplementation",
      "description": "The nn.Module class implementation: a public Torch class or an inline top-level class.",
      "oneOf": [
        {
          "$ref": "#/$defs/TorchApiDefinition"
        },
        {
          "$ref": "#/$defs/TorchSourceDefinition"
        }
      ],
      "discriminator": {
        "mapping": {
          "api": "#/$defs/TorchApiDefinition",
          "source": "#/$defs/TorchSourceDefinition"
        },
        "propertyName": "kind"
      }
    },
    "TorchOperator": {
      "title": "TorchOperator",
      "description": "A Torch operator. It is an identity: the pinned environment and the public callable, module class, or inline source. It states no call. Each graph node carries its own arguments, and each graph value carries its own type.",
      "type": "object",
      "required": [
        "kind",
        "environment",
        "definition",
        "uses"
      ],
      "properties": {
        "kind": {
          "description": "Always \"torch\". Selects this alternative.",
          "type": "string",
          "const": "torch"
        },
        "environment": {
          "description": "The pinned Torch environment name.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/environments"
        },
        "definition": {
          "$ref": "#/$defs/TorchDefinition"
        },
        "uses": {
          "description": "How many graph nodes reference this operator entry.",
          "$ref": "#/$defs/Nat"
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "TorchSourceDefinition": {
      "title": "TorchSourceDefinition",
      "description": "An inline Python callable. Its source and pinned dependencies define its behavior, not its name.",
      "type": "object",
      "required": [
        "kind",
        "callable",
        "code"
      ],
      "properties": {
        "kind": {
          "description": "Always \"source\". Selects this alternative.",
          "type": "string",
          "const": "source"
        },
        "callable": {
          "$ref": "#/$defs/PythonName"
        },
        "code": {
          "description": "UTF-8 Python source that defines the top-level callable. It is authoritative request data. Validation does not parse, import, or execute it.",
          "type": "string",
          "minLength": 1
        }
      },
      "additionalProperties": false
    },
    "TorchStateName": {
      "title": "TorchStateName",
      "description": "A parameter or buffer name from named_parameters or named_buffers. Dots separate nested module names.",
      "type": "string",
      "pattern": "^[^.\\u0000-\\u001F\\u007F]+(?:\\.[^.\\u0000-\\u001F\\u007F]+)*(?![\\s\\S])",
      "maxLength": 512
    },
    "TypeFact": {
      "title": "TypeFact",
      "description": "A type: a tensor type string, an extension for other value kinds, or {unknown}. A type says nothing about memory layout, accumulation precision, or tolerance; those are contract terms.",
      "anyOf": [
        {
          "$ref": "#/$defs/TensorType"
        },
        {
          "$ref": "#/$defs/Extension"
        },
        {
          "$ref": "#/$defs/UnknownRef"
        }
      ]
    },
    "UniformGeneratedValue": {
      "title": "UniformGeneratedValue",
      "description": "A reproducible synthetic source for one float, double, float16, or bfloat16 port. The source runs locally and does not upload generated values.",
      "type": "object",
      "required": [
        "kind",
        "generator",
        "version",
        "seed",
        "lower",
        "upper"
      ],
      "properties": {
        "kind": {
          "description": "Always \"generated\". Selects this alternative.",
          "type": "string",
          "const": "generated"
        },
        "generator": {
          "description": "Uniform synthetic values. This does not establish model accuracy.",
          "type": "string",
          "const": "uniform"
        },
        "version": {
          "description": "The uniform-v1 algorithm in SEMANTICS.md.",
          "type": "string",
          "const": "1"
        },
        "seed": {
          "description": "The unsigned 32-bit seed, including zero.",
          "type": "integer",
          "minimum": 0,
          "maximum": 4294967295
        },
        "lower": {
          "description": "The inclusive lower endpoint before conversion to the port element type.",
          "type": "number"
        },
        "upper": {
          "description": "The exclusive upper endpoint before conversion to the port element type. Rounding can produce this endpoint.",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "UnknownKnowledge": {
      "title": "UnknownKnowledge",
      "description": "An explicit unanswered question about a fact. It grants no permission and makes no claim. A scope that depends on its subject is not ready for work on its structure, and that includes a target further down the same computation. So record one only for a real open fact. A choice that the user has not made, such as a tolerance, is not an unknown fact: ask the user, and write nothing until they decide.",
      "type": "object",
      "required": [
        "kind",
        "purpose",
        "subjects",
        "question",
        "why"
      ],
      "properties": {
        "kind": {
          "description": "Always \"unknown\". Selects this alternative.",
          "type": "string",
          "const": "unknown"
        },
        "purpose": {
          "$ref": "#/$defs/KnowledgePurpose"
        },
        "subjects": {
          "description": "What this entry is about. Members are unique and sorted by their canonical JSON bytes.",
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "$ref": "#/$defs/Pointer"
          }
        },
        "depends_on": {
          "description": "Knowledge entries this one relies on. The graph is acyclic.",
          "type": "array",
          "uniqueItems": true,
          "x-runlocal-set": true,
          "items": {
            "description": "A knowledge entry name.",
            "$ref": "#/$defs/Id",
            "x-runlocal-ref": "/knowledge"
          },
          "default": []
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        },
        "question": {
          "description": "The question that remains unanswered.",
          "type": "string",
          "minLength": 1
        },
        "why": {
          "description": "Why the fact is not known. not_checked: the material is available, and nobody looked yet. not_seen: it was looked for and not found. private: the customer withholds it. cannot_tell: it cannot be derived from the material that is available, for example because it depends on a system outside the request.",
          "type": "string",
          "enum": [
            "not_checked",
            "not_seen",
            "private",
            "cannot_tell"
          ]
        }
      },
      "additionalProperties": false
    },
    "UnknownRef": {
      "title": "UnknownRef",
      "description": "A fact the author does not know, naming a fact-purpose knowledge entry. Writing unknown never grants freedom; it records a gap.",
      "type": "object",
      "required": [
        "unknown"
      ],
      "properties": {
        "unknown": {
          "description": "A fact-purpose unknown knowledge entry.",
          "$ref": "#/$defs/Id",
          "x-runlocal-ref": "/knowledge"
        }
      },
      "additionalProperties": false
    },
    "UrlFileLocation": {
      "title": "UrlFileLocation",
      "description": "The bytes are public at a URL. The size_bytes and the digest of the file pin them, so other bytes at the URL are not this file.",
      "type": "object",
      "required": [
        "kind",
        "url"
      ],
      "properties": {
        "kind": {
          "description": "Always \"url\". Selects this alternative.",
          "type": "string",
          "const": "url"
        },
        "url": {
          "description": "A public https URL of the exact bytes. It needs no credentials, because a request is stored: never write a signed URL or a token. Use a URL that names one revision, so that the bytes do not change.",
          "type": "string",
          "pattern": "^https://[^\\s/?#@]+(?:[/?][^\\s#]*)?$",
          "examples": [
            "https://huggingface.co/org/model/resolve/0123abc/model.safetensors"
          ],
          "maxLength": 2048,
          "x-runlocal-form": "an https URL with no user information and no fragment"
        }
      },
      "additionalProperties": false
    },
    "ValueBinding": {
      "title": "ValueBinding",
      "description": "One example binding, how long its value holds, and observations about it.",
      "type": "object",
      "required": [
        "source"
      ],
      "properties": {
        "source": {
          "$ref": "#/$defs/ExampleValueSource"
        },
        "holds": {
          "description": "How far the service can rely on this exact value. example: one representative value; a result must stay correct for other values. every_run: this exact value exists before every call that this example stands for, so work that uses the values can rely on it. The customer decides: a checkpoint that they can train again or replace without a new request is example. It needs an identified source: a digest on a local source, a file, a generated value, or a constant.",
          "type": "string",
          "enum": [
            "example",
            "every_run"
          ],
          "default": "example"
        },
        "statistics": {
          "description": "Observations about this source, or null. A source of kind none can have them: they describe the values that the customer has, although the request supplies none. They disclose facts about a private value, so the user must approve them.",
          "anyOf": [
            {
              "$ref": "#/$defs/ValueStatistics"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "ValueDomain": {
      "title": "ValueDomain",
      "description": "Restrictions on logical values. Bounds apply to every element. A distinct count applies to the whole tensor. These are requirements, not observations.",
      "type": "object",
      "properties": {
        "finite": {
          "description": "Whether every element must be finite: no NaN and no infinity. false means that the request states nothing. When nobody knows whether a value can be NaN, leave false and record a fact-purpose unknown whose subject is this port.",
          "type": "boolean",
          "default": false
        },
        "minimum": {
          "description": "An inclusive lower bound on every element, or null. A bound also excludes NaN, so write one only when each call obeys it. A range that the customer only observed belongs in the statistics of an example binding.",
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "maximum": {
          "description": "An inclusive upper bound on every element, or null. A bound also excludes NaN.",
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "distinct": {
          "description": "The required number of distinct tensor elements, or null when no count is required.",
          "anyOf": [
            {
              "$ref": "#/$defs/Nat"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "ValueQuantizationParameters": {
      "title": "ValueQuantizationParameters",
      "description": "How a value overlay gets scale and zero point.",
      "oneOf": [
        {
          "$ref": "#/$defs/StaticQuantizationParameters"
        },
        {
          "$ref": "#/$defs/DynamicQuantizationParameters"
        }
      ],
      "discriminator": {
        "mapping": {
          "static": "#/$defs/StaticQuantizationParameters",
          "dynamic": "#/$defs/DynamicQuantizationParameters"
        },
        "propertyName": "kind"
      }
    },
    "ValueRef": {
      "title": "ValueRef",
      "description": "Where a value comes from. There is no positional guessing, implicit capture, or automatic conversion.",
      "anyOf": [
        {
          "description": "An input of the enclosing function.",
          "type": "object",
          "required": [
            "input"
          ],
          "properties": {
            "input": {
              "description": "An input name.",
              "$ref": "#/$defs/Id"
            }
          },
          "additionalProperties": false
        },
        {
          "description": "An output of another step. It also orders this step after that one.",
          "type": "object",
          "required": [
            "step",
            "output"
          ],
          "properties": {
            "step": {
              "description": "A step name.",
              "$ref": "#/$defs/Id"
            },
            "output": {
              "description": "An output name of that step's function.",
              "$ref": "#/$defs/Id"
            }
          },
          "additionalProperties": false
        },
        {
          "description": "A constant from constants.",
          "type": "object",
          "required": [
            "constant"
          ],
          "properties": {
            "constant": {
              "description": "A constant name.",
              "$ref": "#/$defs/Id",
              "x-runlocal-ref": "/constants"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "ValueStatistics": {
      "title": "ValueStatistics",
      "description": "Observations about this source. They do not promise facts about another run.",
      "type": "object",
      "properties": {
        "minimum": {
          "description": "The smallest measured element, or null.",
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "maximum": {
          "description": "The largest measured element, or null.",
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "nonzero_fraction": {
          "description": "The fraction of measured elements that are not zero, or null.",
          "anyOf": [
            {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "distinct": {
          "description": "The number of different measured values across the recorded samples, or null. It is not a per-tensor count and is not compared with domain.distinct.",
          "anyOf": [
            {
              "$ref": "#/$defs/Nat"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "WeightDefaults": {
      "title": "WeightDefaults",
      "description": "Weight terms that every entry of one map shares, written once under the key *. An entry's own term wins. A type is never shared. This entry exists only in the written form: elaboration merges it under each entry and removes it.",
      "type": "object",
      "properties": {
        "private": {
          "description": "Whether actual values must stay local and must not appear in the request. The default is true. A private receiver takes a local, generated, or none source, never a file or a constant. For a public value, such as a weight of a public checkpoint, write false on each declaration of it: the function port, and the slot when one exists. Synthetic generated values are not actual client values.",
          "type": "boolean"
        },
        "domain": {
          "description": "The value domain: restrictions that every call obeys, such as finite values and bounds. It holds no value of the tensor. Omitted means no restriction.",
          "$ref": "#/$defs/ValueDomain"
        },
        "access": {
          "description": "Weights are read-only. Use paired input and output ports for values changed by a call.",
          "type": "string",
          "const": "read"
        },
        "supplied": {
          "description": "When the value of the weight is ready. at_runtime: a caller gives the value when the model runs. prepared_locally: the customer prepares the value on their machine before use, for example with a local packing step; no packed format is implied. The service records this term, and each declaration of one weight must agree on it: a port, the slot that a step binds to it, and a tied weight. It changes no other check. Keep the default unless the source prepares the weight first.",
          "type": "string",
          "enum": [
            "at_runtime",
            "prepared_locally"
          ]
        },
        "lives": {
          "description": "How long one value of the weight stays fixed. per_session: the value is the same for each call of a session, as a loaded checkpoint is. per_call: a caller can give another value at each call.",
          "type": "string",
          "enum": [
            "per_call",
            "per_session"
          ]
        }
      },
      "additionalProperties": false,
      "x-runlocal-defaults": true
    },
    "WeightGroupBinding": {
      "title": "WeightGroupBinding",
      "description": "One group binding for entrypoint weight ports.",
      "type": "object",
      "required": [
        "source"
      ],
      "properties": {
        "source": {
          "$ref": "#/$defs/WeightGroupSource"
        },
        "holds": {
          "description": "How long each derived source value holds.",
          "type": "string",
          "enum": [
            "example",
            "every_run"
          ],
          "default": "example"
        },
        "statistics": {
          "description": "Observations about this group, or null.",
          "anyOf": [
            {
              "$ref": "#/$defs/ValueStatistics"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "additionalProperties": false
    },
    "WeightGroupSource": {
      "title": "WeightGroupSource",
      "description": "How one example source supplies each weight of a group that has no source of its own: under the key *, the weight ports of the entrypoint function, and under the key /weights/*, the slots of the program. A file source names one container file, such as a public checkpoint.",
      "oneOf": [
        {
          "$ref": "#/$defs/NoValueSource"
        },
        {
          "$ref": "#/$defs/LocalValueSource"
        },
        {
          "$ref": "#/$defs/FileValueSource"
        },
        {
          "$ref": "#/$defs/GeneratedValue"
        }
      ],
      "discriminator": {
        "mapping": {
          "none": "#/$defs/NoValueSource",
          "local": "#/$defs/LocalValueSource",
          "file": "#/$defs/FileValueSource",
          "generated": "#/$defs/GeneratedValue"
        },
        "propertyName": "kind"
      }
    },
    "WeightLift": {
      "title": "WeightLift",
      "description": "Written-form shorthand for the weight bindings of one step. It binds each unbound port p of the called function to the enclosing port <lift>.p. When the enclosing function does not declare that port, the port is declared with the called port's record: its type and terms. The type must have numbers only, because a symbol belongs to the called function. Elaboration writes each binding and each declaration and removes this entry.",
      "type": "object",
      "required": [
        "lift"
      ],
      "properties": {
        "lift": {
          "description": "The prefix of the enclosing port names. The step binds each called port p that it does not bind itself to the enclosing port <lift>.p, or to p when lift is empty.",
          "type": "string",
          "pattern": "^(?:[A-Za-z][A-Za-z0-9_.-]{0,127})?$",
          "examples": [
            "model.layers.10",
            ""
          ],
          "x-runlocal-form": "a name that comes before each called port name, or empty text for no prefix"
        }
      },
      "additionalProperties": false
    },
    "WeightLocation": {
      "title": "WeightLocation",
      "description": "A graph-input name that differs from the public weight-port name. Omit the mapping when the names match. A replaceable weight is never an initializer.",
      "type": "object",
      "required": [
        "graph_input"
      ],
      "properties": {
        "graph_input": {
          "description": "A main-graph input name.",
          "$ref": "#/$defs/NativeName"
        }
      },
      "additionalProperties": false
    },
    "WeightName": {
      "title": "WeightName",
      "description": "A weight reference: /weights/<slot> or /functions/<function>/weights/<port>. An example can also use the short name of an entrypoint weight port. A reference never contains a native tensor name.",
      "type": "string",
      "pattern": "^(?:[A-Za-z][A-Za-z0-9_.-]{0,127}|/weights/[A-Za-z][A-Za-z0-9_.-]{0,127}|/functions/[A-Za-z][A-Za-z0-9_.-]{0,127}/weights/[A-Za-z][A-Za-z0-9_.-]{0,127})$"
    },
    "WeightPort": {
      "title": "WeightPort",
      "description": "Metadata for a replaceable weight supplied through a normal graph input. Its checked type, disclosure, lifetime, and value domain are part of the function contract. A client can replace its values between the declared lifetimes. The body may map the public port name to a different graph-input name.",
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "description": "The expected graph-input tensor type. The graph input defines the execution type, and validation requires an exact match.",
          "$ref": "#/$defs/TensorType"
        },
        "private": {
          "description": "Whether actual values must stay local and must not appear in the request. The default is true. A private receiver takes a local, generated, or none source, never a file or a constant. For a public value, such as a weight of a public checkpoint, write false on each declaration of it: the function port, and the slot when one exists. Synthetic generated values are not actual client values.",
          "type": "boolean",
          "default": true
        },
        "domain": {
          "description": "The value domain: restrictions that every call obeys, such as finite values and bounds. It holds no value of the tensor. Omitted means no restriction.",
          "default": {
            "minimum": null,
            "maximum": null,
            "distinct": null,
            "finite": false
          },
          "$ref": "#/$defs/ValueDomain"
        },
        "access": {
          "description": "Weights are read-only. Use paired input and output ports for values changed by a call.",
          "type": "string",
          "const": "read",
          "default": "read"
        },
        "supplied": {
          "description": "When the value of the weight is ready. at_runtime: a caller gives the value when the model runs. prepared_locally: the customer prepares the value on their machine before use, for example with a local packing step; no packed format is implied. The service records this term, and each declaration of one weight must agree on it: a port, the slot that a step binds to it, and a tied weight. It changes no other check. Keep the default unless the source prepares the weight first.",
          "type": "string",
          "enum": [
            "at_runtime",
            "prepared_locally"
          ],
          "default": "at_runtime"
        },
        "lives": {
          "description": "How long one value of the weight stays fixed. per_session: the value is the same for each call of a session, as a loaded checkpoint is. per_call: a caller can give another value at each call.",
          "type": "string",
          "enum": [
            "per_call",
            "per_session"
          ],
          "default": "per_session"
        }
      },
      "additionalProperties": false
    },
    "WeightPorts": {
      "title": "WeightPorts",
      "description": "Logical weight ports by stable public name. The key * gives terms that every port shares.",
      "type": "object",
      "propertyNames": {
        "$ref": "#/$defs/IdOrDefaults"
      },
      "additionalProperties": {
        "$ref": "#/$defs/WeightPort"
      },
      "patternProperties": {
        "^\\*$": {
          "$ref": "#/$defs/WeightDefaults"
        }
      },
      "x-runlocal-defaults": true
    },
    "WeightSlot": {
      "title": "WeightSlot",
      "description": "A named weight at program scope. It states the same contract as a function weight port. Steps bind called ports to it, so functions in different steps, and in different entrypoints, can share one logical weight. Use slots when several entrypoints use the same weights. A step names a slot by its bare name, for example embed.weight. An example and a tied pair name it as /weights/embed.weight.",
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "description": "The expected graph-input tensor type. The graph input defines the execution type, and validation requires an exact match.",
          "$ref": "#/$defs/TensorType"
        },
        "private": {
          "description": "Whether actual values must stay local and must not appear in the request. The default is true. A private receiver takes a local, generated, or none source, never a file or a constant. For a public value, such as a weight of a public checkpoint, write false on each declaration of it: the function port, and the slot when one exists. Synthetic generated values are not actual client values.",
          "type": "boolean",
          "default": true
        },
        "domain": {
          "description": "The value domain: restrictions that every call obeys, such as finite values and bounds. It holds no value of the tensor. Omitted means no restriction.",
          "default": {
            "minimum": null,
            "maximum": null,
            "distinct": null,
            "finite": false
          },
          "$ref": "#/$defs/ValueDomain"
        },
        "access": {
          "description": "Weights are read-only. Use paired input and output ports for values changed by a call.",
          "type": "string",
          "const": "read",
          "default": "read"
        },
        "supplied": {
          "description": "When the value of the weight is ready. at_runtime: a caller gives the value when the model runs. prepared_locally: the customer prepares the value on their machine before use, for example with a local packing step; no packed format is implied. The service records this term, and each declaration of one weight must agree on it: a port, the slot that a step binds to it, and a tied weight. It changes no other check. Keep the default unless the source prepares the weight first.",
          "type": "string",
          "enum": [
            "at_runtime",
            "prepared_locally"
          ],
          "default": "at_runtime"
        },
        "lives": {
          "description": "How long one value of the weight stays fixed. per_session: the value is the same for each call of a session, as a loaded checkpoint is. per_call: a caller can give another value at each call.",
          "type": "string",
          "enum": [
            "per_call",
            "per_session"
          ],
          "default": "per_session"
        },
        "constraints": {
          "description": "Conditions on the value, written over the single term value.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Constraint"
          },
          "default": []
        },
        "note": {
          "$ref": "#/$defs/Note",
          "x-runlocal-absent": true
        }
      },
      "additionalProperties": false
    },
    "Where": {
      "title": "Where",
      "description": "Which calls a target applies to: every call of one function, or one entrypoint and the call sites below it.",
      "anyOf": [
        {
          "description": "Every call of this function, from each entrypoint and each step. Use it for a shared function, such as one layer that the model calls many times.",
          "type": "object",
          "required": [
            "function"
          ],
          "properties": {
            "function": {
              "description": "A function name.",
              "$ref": "#/$defs/Id",
              "x-runlocal-ref": "/functions"
            }
          },
          "additionalProperties": false
        },
        {
          "description": "One entrypoint, or one call site below it. With no path, it is the whole entrypoint: prefer this form to select a whole entrypoint. With a path, it is the one call that the step names reach.",
          "type": "object",
          "required": [
            "entrypoint"
          ],
          "properties": {
            "entrypoint": {
              "description": "An entrypoint name.",
              "$ref": "#/$defs/Id",
              "x-runlocal-ref": "/entrypoints"
            },
            "path": {
              "description": "Step names followed from the entrypoint's function through steps bodies. Empty means the entrypoint's own body.",
              "type": "array",
              "items": {
                "$ref": "#/$defs/Id"
              },
              "default": []
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "WorkKind": {
      "title": "WorkKind",
      "description": "The name of a kind of work, as the work table of the service states it (GET /api/v1/work). A kind is a class of changes that the service can make to a model, and the table states what each kind means, what it needs, and what holds without it. The request schema does not list the kinds, because the service owns the table and it changes with no change of this protocol.",
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{0,63}$",
      "examples": [
        "shape",
        "input_values"
      ],
      "x-runlocal-form": "the name of a kind of work of the published work table"
    }
  },
  "x-runlocal-rules": {
    "CONSTRAINTS.REFERENCE_INVALID": "Every constraint name and shape axis must exist in its scope.",
    "CONSTRAINTS.SYNTAX_INVALID": "A constraint must follow the published expression grammar.",
    "CONSTRAINTS.UNPROVED": "A constraint result must stay explicit when the known facts do not prove it. The runtime must check the constraint at each call.",
    "CONSTRAINTS.VIOLATION": "A constraint must be satisfiable with the known facts.",
    "ENVIRONMENTS.PACKAGE_NAME_INVALID": "Python package names must use their normalized lowercase form.",
    "ENVIRONMENTS.TORCH_REQUIRED": "A Torch environment must pin the torch package.",
    "EXAMPLES.COUNT_TERM_INVALID": "A measured term must follow the grammar and name a known ranked port, dimension, or rank-zero integer input.",
    "EXAMPLES.COUNT_VALUE_MISMATCH": "A measured count must agree with a value fixed by the function type and dimensions.",
    "EXAMPLES.DIMENSION_COUNT_MISMATCH": "A measured dimension must satisfy the function and example domains.",
    "EXAMPLES.DIMENSION_NOT_FOUND": "An example can bind only dimensions declared by its entrypoint function.",
    "EXAMPLES.DIMENSION_RANGE_INVALID": "An example dimension must select a nonempty subset of the function's range and multiples.",
    "EXAMPLES.DIMENSION_RELATION_INVALID": "Example dimension bindings must permit the function's sum relations.",
    "EXAMPLES.INPUT_BINDING_INVALID": "An example must bind every call input exactly once. Session-state reads come from entrypoint slots.",
    "EXAMPLES.OUTPUT_BINDING_INVALID": "An example output reference must name an output of the entrypoint's function.",
    "EXAMPLES.PIN_IDENTITY_REQUIRED": "A pinned source must identify an exact non-none value.",
    "EXAMPLES.SOURCE_FILE_INVALID": "A file source must name a file with role sample.",
    "EXAMPLES.SOURCE_GENERATOR_INVALID": "A generated source must have valid bounds and a supported element type.",
    "EXAMPLES.SOURCE_PRIVATE": "A file or constant source cannot supply a private value. A file gives its value to the service at each location: in the request, at a URL, or in the object store.",
    "EXAMPLES.SOURCE_STATISTICS_INVALID": "Measured bounds and distinct counts must be possible for the element type and agree with one another.",
    "EXAMPLES.SOURCE_TYPE_MISMATCH": "A constant source must have the receiving declaration's type.",
    "EXAMPLES.SOURCE_VALUE_MISMATCH": "The example shape, generated value range, and measured statistics must satisfy the receiver's value restrictions.",
    "EXAMPLES.STATE_BINDING_INVALID": "An example must bind every session slot that the entrypoint reads exactly once.",
    "EXAMPLES.WEIGHT_BINDING_DUPLICATE": "An example must supply each logical weight at most once.",
    "EXAMPLES.WEIGHT_SOURCE_INVALID": "A weight source must bind one entrypoint weight port, one reachable slot, the entrypoint port group, or the slot group.",
    "EXTENSIONS.DEPENDENCY_CYCLE": "Extension dependencies must be acyclic.",
    "EXTENSIONS.FILE_INVALID": "An extension schema, specification, implementation, or test file must have the required role and format.",
    "EXTENSIONS.PAYLOAD_INVALID": "An extension payload must match its bundled schema.",
    "EXTENSIONS.SCHEMA_INVALID": "An extension schema must be a supported local JSON Schema draft 2020-12 document.",
    "EXTENSIONS.SLOT_INVALID": "An extension use must match the slot its definition fills.",
    "FILES.BYTES_NOT_STATED": "A file must state its bytes, as content or as size_bytes and digest.",
    "FILES.CONSTANT_ROLE_INVALID": "A constant must use a model or extension file.",
    "FILES.CONSTANT_SIZE_MISMATCH": "A constant file holds exactly the bytes of the declared tensor type.",
    "FILES.CONTENT_NOT_PERMITTED": "Only a json file whose bytes travel with the request may state content.",
    "FILES.EXTERNAL_DATA_FILE_INVALID": "An external tensor-data location must use a model file.",
    "FILES.EXTERNAL_DATA_MISMATCH": "External data locations must match the graph.",
    "FILES.LOCATION_UNSUPPORTED": "A file must be at a location that the service accepts.",
    "FUNCTIONS.ALIAS_PAIR_INVALID": "An alias pair must name two different state pairs of its function in ASCII order, and the list must be sorted with no repeated pair.",
    "FUNCTIONS.CALL_CYCLE": "Function calls must not form a cycle.",
    "FUNCTIONS.DIMENSION_CYCLE": "Dimension sum dependencies must have no cycle.",
    "FUNCTIONS.DIMENSION_NOT_FOUND": "A dimension sum must name dimensions declared by this function.",
    "FUNCTIONS.DIMENSION_RANGE_INVALID": "A dimension range must contain at least one permitted multiple.",
    "FUNCTIONS.DIMENSION_RELATION_INVALID": "A dimension range must overlap the range of its sum.",
    "FUNCTIONS.GRAPH_BINDING_INVALID": "Function ports must map to graph ports exactly once.",
    "FUNCTIONS.GRAPH_TYPE_MISMATCH": "Function and graph port types must agree.",
    "FUNCTIONS.GRAPH_TYPE_UNRESOLVED": "A graph value needs a full type before its interface can be checked.",
    "FUNCTIONS.INPUT_BINDING_INVALID": "A step must bind every called function input exactly once.",
    "FUNCTIONS.INPUT_NOT_FOUND": "An input binding must name an input of its function.",
    "FUNCTIONS.OUTPUT_BINDING_INVALID": "A steps body must bind every function output exactly once.",
    "FUNCTIONS.OUTPUT_NOT_FOUND": "A step output reference must name an output of the called function.",
    "FUNCTIONS.STATE_BINDING_INVALID": "An entrypoint must bind every function state pair to a session slot.",
    "FUNCTIONS.STATE_DOMAIN_MISMATCH": "Every value written by a state pair must fit its read input on the next call.",
    "FUNCTIONS.STATE_INITIAL_TYPE_MISMATCH": "A constant state initializer must fit every bound read input's element type, rank, and known extents.",
    "FUNCTIONS.STATE_PAIR_INVALID": "A state pair must name one input or output port, and each port can belong to only one pair.",
    "FUNCTIONS.STATE_READ_REUSED": "A value bound to a state read port must have no other consumer in a steps body.",
    "FUNCTIONS.STEP_CYCLE": "Data and after edges must not form a cycle.",
    "FUNCTIONS.STEP_NOT_FOUND": "A step reference must name a step in its body.",
    "FUNCTIONS.STEP_TYPE_MISMATCH": "A value at a step must have the type its destination declares, for every permitted dimension.",
    "FUNCTIONS.STEP_TYPE_UNPROVED": "A value at a step must be proved to have the type its destination declares.",
    "FUNCTIONS.VALUE_POLICY_MISMATCH": "A source declaration must satisfy the receiving declaration's privacy and value domain.",
    "GRAPH.ATTRIBUTE_REFERENCE_INVALID": "An attribute reference must name an enclosing function attribute with the same type.",
    "GRAPH.CALL_ATTRIBUTES_INVALID": "A local function call must supply its required attributes with the declared types.",
    "GRAPH.CYCLE": "Node dataflow must not form a cycle.",
    "GRAPH.FILE_INVALID": "An authoritative graph must be a JSON file with role model.",
    "GRAPH.FUNCTION_ATTRIBUTES_INVALID": "A local function must have distinct attribute names and literal defaults.",
    "GRAPH.LOCAL_FUNCTION_DUPLICATE": "Each local function must have a distinct domain, name, and overload.",
    "GRAPH.NAME_DUPLICATE": "Each boundary list must contain unique value names.",
    "GRAPH.SOURCE_INVALID": "An optional graph source must be a file with role model.",
    "GRAPH.SPARSE_SHAPE_INVALID": "Sparse values and indices must agree with the dense shape.",
    "GRAPH.TENSOR_BYTE_SIZE_MISMATCH": "A tensor's data byte count must match its type and source.",
    "GRAPH.TENSOR_COUNT_MISMATCH": "The number of tensor values must match its shape.",
    "GRAPH.TENSOR_DATA_CONFLICT": "A public tensor must have only one data source.",
    "GRAPH.TENSOR_DATA_REQUIRED": "Every public tensor must have exact inline values or an exact bundled-data slice.",
    "GRAPH.TENSOR_EXTERNAL_RANGE_INVALID": "An external tensor-data slice must fit its bundled file.",
    "GRAPH.TENSOR_SHAPE_INVALID": "An initializer or attribute tensor must have numeric dimensions and at most 2^53 - 1 elements.",
    "GRAPH.TENSOR_VALUE_INVALID": "Every inline tensor value must fit its declared element type.",
    "GRAPH.TYPE_CONFLICT": "Two declarations of one graph value must state the same type.",
    "GRAPH.VALUE_NOT_FOUND": "A graph value must be defined before use.",
    "GRAPH.VALUE_REDEFINED": "Each graph value must be defined once.",
    "KNOWLEDGE.ARTIFACT_ROLE_INVALID": "An evidence artifact must be a sample or evidence file.",
    "KNOWLEDGE.BASELINE_MISMATCH": "Baseline fidelity evidence must name the selected baseline contract.",
    "KNOWLEDGE.CONTENT_MISMATCH": "Observed, tested, and proved evidence must name the assessed computation's contract digest.",
    "KNOWLEDGE.CURRENT_CONTRACT_MISMATCH": "Baseline fidelity evidence must name this request's contract digest.",
    "KNOWLEDGE.DEPENDENCY_CYCLE": "Knowledge dependencies must be acyclic.",
    "KNOWLEDGE.FIDELITY_INTERFACE_MISMATCH": "A fidelity interface must equal the current public entrypoint interface.",
    "KNOWLEDGE.FIDELITY_REQUIRED": "Baseline fidelity evidence must carry evidence bound to both contracts.",
    "KNOWLEDGE.REFERENCE_INVALID": "An inline unknown, missing body, or incomplete source must name a fact-purpose unknown knowledge entry.",
    "KNOWLEDGE.RESULT_INVALID": "Evidence counts and the explicit outcome must agree.",
    "KNOWLEDGE.SOURCE_REFUTED": "Source-equivalence evidence about this computation must not refute it.",
    "KNOWLEDGE.SUBJECT_NOT_FOUND": "A knowledge subject must point to the request or a bundled graph.",
    "LINKS.ACCESS_TOKEN_PRESENT": "A link must not contain access-token or signed-access parameters.",
    "LINKS.CREDENTIALS_PRESENT": "A link must not contain URL credentials.",
    "LINKS.SCOPE_NOT_FOUND": "A link scope must point to a location in the written request.",
    "LINKS.URL_INVALID": "A link must be a valid absolute HTTPS URL.",
    "OPERATORS.ATTRIBUTES_INVALID": "A standard operator's attributes must match its ONNX schema.",
    "OPERATORS.COUNT_MISMATCH": "An operator use count must match the graphs.",
    "OPERATORS.DEFINITION_INVALID": "A local or extension operator definition must be complete and internally valid.",
    "OPERATORS.DUPLICATE": "An operator must have exactly one registry entry.",
    "OPERATORS.INPUTS_INVALID": "A standard operator's inputs must match its ONNX schema.",
    "OPERATORS.LOCAL_FUNCTION_CYCLE": "Local function definitions must not depend on themselves through operator calls.",
    "OPERATORS.LOCAL_FUNCTION_NOT_FOUND": "Every local operator must have a function definition.",
    "OPERATORS.NODE_INVALID": "A node must follow its operator definition.",
    "OPERATORS.NOT_REGISTERED": "Every applied operator must have a registry entry.",
    "OPERATORS.OPSET_UNSUPPORTED": "A standard operator must use an opset in the checked ONNX catalog.",
    "OPERATORS.OUTPUTS_INVALID": "A standard operator's outputs must match its ONNX schema.",
    "OPERATORS.SCHEMA_NOT_FOUND": "A standard operator must resolve to an ONNX schema.",
    "OPERATORS.SEMANTICS_INVALID": "An operator meaning must agree with its domain.",
    "OPERATORS.SYSTEM_INVALID": "Every node in a graph must use its declared operator system and environment.",
    "OPERATORS.TORCH_STATE_INVALID": "Torch module parameters and buffers must read private weight ports.",
    "OPTIMIZE.BODY_KIND_INVALID": "A target selection must match the body kind.",
    "OPTIMIZE.NOT_CONVEX": "A path between selected nodes or steps must stay inside the selection.",
    "OPTIMIZE.PATH_NOT_FOUND": "A target path must name existing steps.",
    "OPTIMIZE.SELECTION_NOT_FOUND": "A selected node or step must exist.",
    "OPTIMIZE.WORK_UNAVAILABLE": "A target can want a kind of work only when the request provides what that kind needs.",
    "OPTIMIZE.WORK_UNKNOWN": "A target can want only a kind of work of the published work table.",
    "QUANTIZATION.BINDING_CONFLICT": "One stored tensor binding cannot have conflicting roles or types.",
    "QUANTIZATION.DYNAMIC_INVALID": "Dynamic quantization must follow the resolved ONNX DynamicQuantizeLinear form.",
    "QUANTIZATION.FILE_INVALID": "A file quantization tensor must use a valid canonical quantization-tensor document.",
    "QUANTIZATION.SCHEMA_INVALID": "An affine scheme must name compatible schemas from the pinned ONNX catalog.",
    "QUANTIZATION.SCHEME_REQUIRED": "After the * entry is merged, every quantized weight must have a scheme.",
    "QUANTIZATION.SHAPE_INVALID": "Stored tensor shapes must agree with the target and granularity.",
    "QUANTIZATION.SOURCE_INVALID": "An example weight source must supply every private tensor used by its quantization overlay.",
    "QUANTIZATION.STORAGE_INVALID": "A quantization storage extension must fill the quantization slot.",
    "QUANTIZATION.TARGET_NESTED": "A value overlay cannot target a value inside a nested graph.",
    "QUANTIZATION.TARGET_OVERLAP": "Weight and value overlays must not target the same logical value.",
    "QUANTIZATION.TARGET_TYPE_INVALID": "A quantization overlay target must have a supported floating-point logical type.",
    "QUANTIZATION.TYPE_INVALID": "Code, scale, zero-point, target, and output types must satisfy both ONNX schemas.",
    "QUANTIZATION.VALUE_BODY_INVALID": "A value overlay can name a value only in a graph body.",
    "QUANTIZATION.VALUE_INVALID": "Public scale, code, and zero-point values must satisfy their declared types and ranges.",
    "QUANTIZATION.VALUE_NOT_FOUND": "A value overlay must name a value in its function's main graph.",
    "QUANTIZATION.WEIGHT_NOT_FOUND": "A weight overlay must name a logical weight port of its function.",
    "VALUES.DOMAIN_INVALID": "A value domain must permit the required range and distinct element count.",
    "WEIGHTS.DEFAULT_NOT_ALLOWED": "A replaceable weight graph input must not also be an initializer.",
    "WEIGHTS.GRAPH_BINDING_INVALID": "Each native graph tensor must bind to at most one weight port.",
    "WEIGHTS.GRAPH_TYPE_MISMATCH": "A logical weight port must match its graph tensor type.",
    "WEIGHTS.LIFT_INVALID": "A lift entry must give each called port a valid enclosing name and a type with numbers only, within the limit on lifted ports.",
    "WEIGHTS.PORT_BINDING_INVALID": "Every called weight port must be bound exactly once.",
    "WEIGHTS.PORT_CONTRACT_MISMATCH": "A weight binding must satisfy the called port's type, disclosure, supply, lifetime, and value restrictions.",
    "WEIGHTS.PORT_DIMENSION_INVALID": "Weight dimensions must be numeric or declared by the owning function.",
    "WEIGHTS.PORT_NOT_FOUND": "A parent binding must name an enclosing weight port.",
    "WEIGHTS.REFERENCE_NOT_FOUND": "A weight reference must name a weight port or slot.",
    "WEIGHTS.TENSOR_NOT_FOUND": "A weight port location must name a tensor of the graph.",
    "WEIGHTS.TIED_CONTRACT_MISMATCH": "Tied weights must have compatible declarations."
  }
}
