Task templates

The tasks supported by datasets.Dataset.prepare_for_task and datasets.DatasetDict.prepare_for_task.

class datasets.tasks.AutomaticSpeechRecognition(task: str = 'automatic-speech-recognition', audio_file_path_column: str = 'audio_file_path', transcription_column: str = 'transcription')[source]
class datasets.tasks.ImageClassification(task: str = 'image-classification', image_column: str = 'image', label_column: str = 'labels')[source]
align_with_features(features)[source]

Align features with the task template.

class datasets.tasks.LanguageModeling(task: str = 'language-modeling', text_column: str = 'text')[source]
class datasets.tasks.QuestionAnsweringExtractive(task: str = 'question-answering-extractive', question_column: str = 'question', context_column: str = 'context', answers_column: str = 'answers')[source]
class datasets.tasks.Summarization(task: str = 'summarization', text_column: str = 'text', summary_column: str = 'summary')[source]
class datasets.tasks.TextClassification(task: str = 'text-classification', text_column: str = 'text', label_column: str = 'labels')[source]
align_with_features(features)[source]

Align features with the task template.