Datasets documentation

Task templates

You are viewing v2.16.1 version. A newer version v3.1.0 is available.
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Task templates

The Task API is deprecated in favor of train-eval-index and will be removed in the next major release.

The tasks supported by Dataset.prepare_for_task() and DatasetDict.prepare_for_task().

class datasets.AutomaticSpeechRecognition

< >

( task: str = 'automatic-speech-recognition' audio_column: str = 'audio' transcription_column: str = 'transcription' )

class datasets.AudioClassification

< >

( task: str = 'audio-classification' audio_column: str = 'audio' label_column: str = 'labels' )

class datasets.ImageClassification

< >

( task: str = 'image-classification' image_column: str = 'image' label_column: str = 'labels' )

align_with_features

< >

( features )

class datasets.LanguageModeling

< >

( task: str = 'language-modeling' text_column: str = 'text' )

class datasets.QuestionAnsweringExtractive

< >

( task: str = 'question-answering-extractive' question_column: str = 'question' context_column: str = 'context' answers_column: str = 'answers' )

class datasets.Summarization

< >

( task: str = 'summarization' text_column: str = 'text' summary_column: str = 'summary' )

class datasets.TextClassification

< >

( task: str = 'text-classification' text_column: str = 'text' label_column: str = 'labels' )

align_with_features

< >

( features )