MLModelDataclass is more versatile than simply loading models. Usually, supplemental data is needed to properly use an ML model. For example, when using a classification model, you will need a list of class labels which correspond to the model's output probabilities. The
MLModelDataclass encapsulates all of the information needed to both load a model, and make predictions with it.
MLModelDataclass can provide these class labels, depending on how it is fetched:
MLImageFeaturewhen creating input data for a model: