Supported Tasks

Each task has an associated Dataset Type, Query Format and Prediction Format.

A task’s Dataset Type specifies the format of the data sources train_dataset_uri and test_dataset_uri point to. Datasets are prepared by Application Developers when they create Train Jobs and received by Model Developers when they define rafiki.model.BaseModel.train() and rafiki.model.BaseModel.evaluate().

A task’s Query Format specifies the format of queries when they are passed to models. Queries are generated by Application Users when they send queries to Inference Jobs and received by Model Developers when they define rafiki.model.BaseModel.predict().

A task’s Prediction Format specifies the format of predictions made by models. Predictions are generated by Model Developers when they define rafiki.model.BaseModel.predict() and received by App Users as predictions to their queries sent to Inference Jobs

IMAGE_CLASSIFICATION

Dataset Type

IMAGE_FILES

The train & test dataset’s images should be have the same dimensions W x H.

Query Format

A W x H 2D list representing the grayscale version of the query image.

Prediction Format

A size-k list of floats, representing the probabilities of each class from 0 to k - 1.

POS_TAGGING

Dataset Type

CORPUS, such that:

  • Sentences are delimited by \n tokens.
  • There is only 1 tag column of tag corresponding to the POS tag of the token as an integer from 0 to k - 1.

Query Format

A list of strings representing a sentence as a list of tokens in that sentence.

Prediction Format

A list of integers representing the list of predicted tag for each token, in sequence, for the sentence.