testing library
Test support for code that uses core_ml.
Replace CoreMLBindings.instance with bindings backed by fake CoreMLHostApi and CoreMLPlatformApi implementations to exercise the Dart API without a device.
Classes
- BatchPredictionRequestMessage
- BatchPredictionResultMessage
- ComputeDeviceMessage
-
Mirrors a case of
MLComputeDevice. - CoreMLBindings
- The platform APIs the core_ml library talks to.
- CoreMLHostApi
- Only registered when Core ML's iOS 18 / macOS 15 surface is available.
- CoreMLPlatformApi
- Always available, on every OS version.
- DictionaryConstraintMessage
-
Mirrors
MLDictionaryConstraint. - DictionaryValueMessage
-
An
MLFeatureValueholding a dictionary. Exactly one map is set. - DoubleValueMessage
-
An
MLFeatureValueholding a double. - EncodedImageMessage
-
An image input given as encoded bytes or a file path. The native side
decodes it and resizes it to the feature's
MLImageConstraintunless width, height or pixelFormatType override it. - FeatureDescriptionMessage
-
Mirrors
MLFeatureDescription. - FeatureMapMessage
- A named set of feature values, so nested maps stay off the wire.
- FeatureValueMessage
-
Any
MLFeatureValue. - ImageConstraintMessage
-
Mirrors
MLImageConstraintand itsMLImageSizeConstraint. - ImageSizeMessage
-
A width/height pair from
MLImageSize. - Int64ValueMessage
-
An
MLFeatureValueholding an int64. - ModelConfigurationMessage
-
Mirrors
MLModelConfiguration. - ModelDescriptionMessage
-
Mirrors
MLModelDescription. - ModelInfoMessage
-
A loaded
MLModel. - ModelMetadataMessage
-
The
metadatadictionary of anMLModelDescription. - MultiArrayConstraintMessage
-
Mirrors
MLMultiArrayConstraintand itsMLMultiArrayShapeConstraint. - MultiArrayMessage
-
An
MLMultiArray, transferred by value as raw storage bytes. - PixelBufferMessage
-
A
CVPixelBufferimage feature, transferred by value. - PixelBufferPlaneMessage
- One plane of a PixelBufferMessage.
- PredictionRequestMessage
- PredictionResultMessage
- SequenceConstraintMessage
-
Mirrors
MLSequenceConstraint. - SequenceValueMessage
-
An
MLSequence. Exactly one list is set. - ShapeMessage
- One multi-array shape, so nested lists stay off the wire.
- StateConstraintMessage
-
Mirrors
MLStateConstraint. - StringValueMessage
-
An
MLFeatureValueholding a string. - UndefinedValueMessage
-
An undefined
MLFeatureValueof a given type, used for optional inputs.
Enums
- ComputeDeviceKindMessage
-
Which case of
MLComputeDevicea device is. - ComputeUnitsMessage
-
Mirrors
MLComputeUnits. - FeatureTypeMessage
-
Mirrors
MLFeatureType. The order matches the public Dart enum. - ImageEncodingMessage
- Encoded image formats for pixel-buffer export.
- ImageSizeConstraintTypeMessage
-
Mirrors
MLImageSizeConstraintType. - MultiArrayDataTypeMessage
-
Mirrors
MLMultiArrayDataType. The order matches the public Dart enum. - ReshapeFrequencyMessage
-
Mirrors
MLOptimizationHints.ReshapeFrequency. - ShapeConstraintTypeMessage
-
Mirrors
MLMultiArrayShapeConstraintType. - SpecializationStrategyMessage
-
Mirrors
MLOptimizationHints.SpecializationStrategy.