v2.5.0
Datasets ⭐
EXAMPLE CODE
CoQA Dataset
Load CoQA dataset in Python fast. 127,000+ questions with answers collected from 8000+ conversations. Stream CoQA while training models in PyTorch & TensorFlow.

CoQA dataset

What is CoQA Dataset?

The CoQA (Conversational Question Answering) dataset is a large-scale dataset for developing conversational question answering systems. CoQA has over 127,000 questions and answers from over 8000 discussions. The CoQA challenge aims to assess machines' capacity to comprehend a written passage and respond to a series of interconnected questions that emerge during a conversation.

Download CoQA Dataset in Python

Instead of downloading the MNIST dataset in Python, you can effortlessly load it in Python via our open-source package Hub with just one line of code.

Load CoQA Dataset Training Subset in Python

1
import hub
2
ds = hub.load("hub://activeloop/coqa-train")
Copied!

Load CoQA Dataset Validation Subset in Python

1
import hub
2
ds = hub.load("hub://activeloop/coqa-val")
Copied!

CoQA Dataset Structure

CoQA Data Fields

  • id : tensors containing id
  • sources : tensors containing sources
  • filenames : tensor that contains filenames
  • stories : tensor that contain stories
  • questions : tensors containing questions
  • turnids : tensors containing turnids
  • ans_start : tensors containing starting index of answers
  • ans_end :tensor that contain ending index of answers
  • span_text answers: tensor that contain answers

CoQA Data Splits

How to use CoQA Dataset with PyTorch and TensorFlow in Python

Train a model on CoQA dataset with PyTorch in Python

Let's use Hub's built-in PyTorch one-line dataloader to connect the data to the compute:
1
dataloader = ds.pytorch(num_workers=0, batch_size=4, shuffle=False)
Copied!

Train a model on CoQA dataset with TensorFlow in Python

1
dataloader = ds.tensorflow()
Copied!

CoQA Dataset Creation

Additional Information about CoQA Dataset

CoQA Dataset Description

CoQA Dataset Curators

Siva Reddy, Danqi Chen, Christopher D. Manning

CoQA Dataset Licensing Information

Hub users may have access to a variety of publicly available datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have a license to use the datasets. It is your responsibility to determine whether you have permission to use the datasets under their license.
If you're a dataset owner and do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thank you for your contribution to the ML community!

CoQA Dataset Citation Information

1
@article{reddy2019coqa,
2
title={Coqa: A conversational question answering challenge},
3
author={Reddy, Siva and Chen, Danqi and Manning, Christopher D},
4
journal={Transactions of the Association for Computational Linguistics},
5
volume={7},
6
pages={249--266},
7
year={2019},
8
publisher={MIT Press}
9
}
Copied!

CoQA Dataset FAQs

What is CoQA dataset for Python?
CoQA has 127,000+ questions and answers from 8000+ discussions. Conversations are between two people and are in the form of questions and answers regarding a passage. The questions are conversational, the answers can be free-form text, and each answer includes an evidence subsequence marked in the passage and the passages from seven different domains.

What is the CoQA dataset used for?

The CoQA challenge aims to assess machines' capacity to comprehend a written passage and respond to a series of interconnected questions that emerge during a conversation. This dataset is often used in the field of natural language processing.

How to use and download the CoQA dataset in Python?

Using the open-source package Activeloop Hub the CoQA dataset can quickly be loaded with just one line of code. See detailed instructions on how to load the CoQA dataset training subset and how to load the validation subset in Python.