DATA & AI
Export a model with an inference contract
Describe shapes, preprocessing, output meaning, and runtime checks alongside an exported model.
An export is an integration step
The PyTorch ONNX tutorial explains exporting a model and working with the exported representation. Moving a model into another runtime is part of application integration. The exported graph does not, by itself, explain the data preparation or the meaning of the outputs. Those parts need a documented contract that accompanies the artifact. [1]
Write the input and output schema
Describe the input shape, data type, ordering, units, and preprocessing. For an image model, include the channel arrangement and normalization used in the experiment. For a table model, preserve feature names and ordering. Explain whether an output is a score, probability, class identifier, or numerical estimate. Keep the mapping to labels or other meanings with the release.
Choose a small set of reference inputs and compare the original and exported inference paths within an appropriate tolerance. Test malformed inputs and any supported range of shapes. Record the exporter and runtime versions. A discrepancy should be investigated before the exported artifact is placed behind an application interface.
Check the application boundary
Measure the behavior under the expected workload, including startup, batching if relevant, and failure responses. Keep the model version linked to the evaluation report and preprocessing configuration. Decide how an unsupported input reaches the user and how a later model update is identified. This gives a desktop app or API an inspectable inference contract instead of a file whose behavior has to be inferred from its name.