<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/ModelCompatibilityError",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents23ModelCompatibilityErrorO"
  },
  "title" : "ModelCompatibilityError"
}
-->

# ModelCompatibilityError

Errors related to CoreML model compatibility.

```
enum ModelCompatibilityError
```

## Topics

### Analyzing the error

[`case incompatibleInputCount(expected: Int, actual: Int)`](/documentation/CreateMLComponents/ModelCompatibilityError/incompatibleInputCount(expected:actual:))

An error that indicates that the number of model inputs is wrong.

[`case incompatibleInputDataFormat(expected: MLFeatureType, actual: MLFeatureType)`](/documentation/CreateMLComponents/ModelCompatibilityError/incompatibleInputDataFormat(expected:actual:))

An error that indicates that the input data has the wrong format.

[`case incompatibleInputMultiArrayDataType(MLMultiArrayDataType)`](/documentation/CreateMLComponents/ModelCompatibilityError/incompatibleInputMultiArrayDataType(_:))

An error that indicates that the input multi array has the wrong value type.

[`case incompatibleLabelType`](/documentation/CreateMLComponents/ModelCompatibilityError/incompatibleLabelType)

An error that indicates that the label has the wrong type.

[`case incompatibleMetadataKey(name: String)`](/documentation/CreateMLComponents/ModelCompatibilityError/incompatibleMetadataKey(name:))

An error that indicates that the metadata key has the wrong type.

[`case incompatibleOutputCount(expected: Int, actual: Int)`](/documentation/CreateMLComponents/ModelCompatibilityError/incompatibleOutputCount(expected:actual:))

An error that indicates that the number of model outputs is wrong.

[`case incompatibleOutputDataFormat(expected: MLFeatureType, actual: MLFeatureType)`](/documentation/CreateMLComponents/ModelCompatibilityError/incompatibleOutputDataFormat(expected:actual:))

An error that indicates that the output data has the wrong format.

[`case missingInput(name: String)`](/documentation/CreateMLComponents/ModelCompatibilityError/missingInput(name:))

An error that indicates that the input is missing from the model.

[`case missingLabel`](/documentation/CreateMLComponents/ModelCompatibilityError/missingLabel)

An error that indicates that the label output is missing from the model.

[`case missingLabelProbabilities`](/documentation/CreateMLComponents/ModelCompatibilityError/missingLabelProbabilities)

An error that indicates that the label probabilities output is missing from the model.

[`case missingOutput(name: String)`](/documentation/CreateMLComponents/ModelCompatibilityError/missingOutput(name:))

An error that indicates that the output is missing from the model.

[`case missingPredictedFeature`](/documentation/CreateMLComponents/ModelCompatibilityError/missingPredictedFeature)

An error that indicates that the regressor model output is missing.

### Getting the debug description

[`var debugDescription: String`](/documentation/CreateMLComponents/ModelCompatibilityError/debugDescription)

A text representation of the error.

### Default Implementations

[CustomDebugStringConvertible Implementations](/documentation/CreateMLComponents/ModelCompatibilityError/CustomDebugStringConvertible-Implementations)

## Relationships

### Conforms To

[`LocalizedError`](/documentation/Foundation/LocalizedError)

[`Error`](/documentation/Swift/Error)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Copyable`](/documentation/Swift/Copyable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

[`Equatable`](/documentation/Swift/Equatable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)