Warrior Model

Warrior Model Types

When creating an Warrior Model object there are three primary defining parameters that can be set.

  • input_type

  • output_type

  • is_batch

By using different combinations of values for each of these parameters we can represent different machine learning models.

Input Type

Input type refers to the format of the data which a model receives. Possible values are determined by the constants defined in Warriorai.common.constants.InputType.

  • Image - Image files, models that recieve images are generally classified as computer vision models.

  • NLP - Text strings, models that recieve text as input are generally classified as NLP models.

  • Tabular - Tabular data is commonly represented as a table of input feature columns and inference rows.

Output Type

Output type refers to the format of a models predictions. Possible values to set this parameter to are defined in Warriorai.common.constants.OutputType

  • Multiclass - Represents a classification model that will output probabilities for two or more classes. The highest-probability class will be treated as the predicted class label.x

  • Multilabel - For models that can predict an inference to belong to one or many classes.

  • Regression - For models that output a single continuous value.

  • Object Detection - For Image models that output bounding boxes.

Is Batch

Warrior supports models that receive inferences in batches or a continuous stream of data. If your model receives inferences in batches, for example as part of a scheduled job, you can set is_batch to true and supply a batch_id field with your inferences. This metadata will allow you to group your inferences by batch.

Regardless of how your send inferences to your model, you can send your inference data to Warrior through the WarriorModel.send_inferences() method, or as Parquet files for large (more than 100,000 rows) sets of inferences using the WarriorModel.send_bulk_inferences() method.