Class MLModelError


  • public final class MLModelError
    extends java.lang.Object
    MLModelError defines the set of MLModel related error codes. The framework communicates the error code to the application through NSError's code property. The application could use the error code to present an helpful error message to the user or to diagnose the problem. See also NSError's localizedDescription property, which often contains more detailed information.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long CustomLayer
      Core ML throws/returns this error when the framework encounters an error in the custom layer subsystem.
      static long CustomModel
      Core ML throws/returns this error when the framework encounters an error in the custom model subsystem.
      static long FeatureType
      Core ML throws/returns this error when the model client, typically an application, sends the wrong feature type to a model's input.
      static long Generic
      Core ML throws/returns this error when the framework encounters an generic error.
      static long IO
      Core ML throws/returns this error when the framework encounters some I/O problem, most likely a file I/O problem.
      static long ModelCollection
      Core ML throws/returns this error when the framework encounters an error in the model collection deployment subsystem.
      static long ModelDecryption
      Core ML throws/returns this error when the framework encounters an error in the model decryption subsystem.
      static long ModelDecryptionKeyFetch
      Core ML throws/returns this error when the framework fails to download the model decryption key.
      static long Parameters
      Core ML throws/returns this error when the model client, typically an application, queries an unsupported model parameter (see MLParameterKey).
      static long Update
      Core ML throws/returns this error when the framework encounters an error while performing the on-device model update.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Generic

        public static final long Generic
        Core ML throws/returns this error when the framework encounters an generic error. The typical cause for this error is an unexpected framework level problem.
        See Also:
        Constant Field Values
      • FeatureType

        public static final long FeatureType
        Core ML throws/returns this error when the model client, typically an application, sends the wrong feature type to a model's input. The typical cause for this error is a programming mistake. For example, a prediction method will throw/return the error when the caller passes an image to a model's input that expects an `MLMultiArray`.
        See Also:
        Constant Field Values
      • IO

        public static final long IO
        Core ML throws/returns this error when the framework encounters some I/O problem, most likely a file I/O problem. For example, a model loading will throw/return the error when the caller requests a non-existing model URL.
        See Also:
        Constant Field Values
      • CustomLayer

        public static final long CustomLayer
        Core ML throws/returns this error when the framework encounters an error in the custom layer subsystem. The typical cause for this error is a programming mistake. For example, a prediction method will throw/return the error when it fails to find the custom layer implementation.
        See Also:
        Constant Field Values
      • CustomModel

        public static final long CustomModel
        Core ML throws/returns this error when the framework encounters an error in the custom model subsystem. The typical cause for this error is a programming mistake. For example, a prediction method will throw/return the error when it fails to find the custom model implementation.
        See Also:
        Constant Field Values
      • Update

        public static final long Update
        Core ML throws/returns this error when the framework encounters an error while performing the on-device model update. For example, the framework will throw/return the error when it fails to save the updated model.
        See Also:
        Constant Field Values
      • Parameters

        public static final long Parameters
        Core ML throws/returns this error when the model client, typically an application, queries an unsupported model parameter (see MLParameterKey). The typical cause for this error is a programming mistake.
        See Also:
        Constant Field Values
      • ModelDecryptionKeyFetch

        public static final long ModelDecryptionKeyFetch
        Core ML throws/returns this error when the framework fails to download the model decryption key. The typical cause for this error is a network connection issue to the key server.
        See Also:
        Constant Field Values
      • ModelDecryption

        public static final long ModelDecryption
        Core ML throws/returns this error when the framework encounters an error in the model decryption subsystem. The typical cause for this error is in the key server configuration and the client application cannot do much about it. For example, a model loading method will throw/return the error when it uses incorrect model decryption key.
        See Also:
        Constant Field Values
      • ModelCollection

        public static final long ModelCollection
        Core ML throws/returns this error when the framework encounters an error in the model collection deployment subsystem. The typical cause for this error is the network connectability issue to the model deployment server.
        See Also:
        Constant Field Values