task_categories:question-answering size_categories:1K<n<10K language:en license:cc-by-4.0 code arxiv:1910.02216 region:us
JuICe, a corpus of 1.5 million examples with a curated test set of 3.7K instances based on online programming assignments.
@article{DBLP:journals/corr/abs-1910-02216,
  author    = {Rajas Agashe and
               Srinivasan Iyer and
               Luke Zettlemoyer},
  title     = {JuICe: {A} Large Scale Distantly Supervised Dataset for Open Domain
               Context-based Code Generation},
  journal   = {CoRR},
  volume    = {abs/1910.02216},
  year      = {2019},
  url       = {http://arxiv.org/abs/1910.02216},
  eprinttype = {arXiv},
  eprint    = {1910.02216},
  timestamp = {Wed, 09 Oct 2019 14:07:58 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-1910-02216.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}
---
dataset_info:
  features:
  - name: question
    dtype: string
  - name: answer
    dtype: string
  - name: notebook
    sequence:
    - name: text
      dtype: string
    - name: cell_type
      dtype: string
  splits:
  - name: validation
    num_bytes: 19578995
    num_examples: 1831
  - name: test
    num_bytes: 21651420
    num_examples: 2115
  download_size: 155457826
  dataset_size: 41230415
license: cc-by-4.0
task_categories:
- question-answering
language:
- en
tags:
- code
pretty_name: juice
size_categories:
- 1K<n<10K
---

# Dataset Card for JuICe (A Large Scale Distantly Supervised Dataset for Open Domain Context-based Code Generation)

## Dataset Description

- **Homepage: [GitHub](https://github.com/rajasagashe/juice)** 
- **Paper: [JuICe: A Large Scale Distantly Supervised Dataset for Open Domain Context-based Code Generation](https://arxiv.org/abs/1910.02216)** 

### Dataset Summary

The JuICe dataset was developed to study code generation conditioned on a long context history. For that purpose, the authors collected data from interactive coding environements (ICE) in Jupyter notebooks (JuICE). Since these notebooks contain interleaved code snippet cells and natural language markdown they are particularly useful for this task.

While the original [dataset](https://github.com/rajasagashe/juice) also contains a corpus of 1.5 million jupyter notebook examples, this version (redistributed on the hub for easier access), contains only the curated test set of 3.7K instances based on online programming assignments.

### Supported Tasks and Leaderboards

This dataset can be used for Natural Language to Code Generation tasks. 

### Languages

Python, English


### Data Instances

```python
dataset = load_dataset("koutch/JuICe")
DatasetDict({
    validation: Dataset({
        features: ['question', 'answer', 'notebook'],
        num_rows: 1831
    })
    test: Dataset({
        features: ['question', 'answer', 'notebook'],
        num_rows: 2115
    })
})
```

### Data Fields

In short, each data row contains a programming `question` and an code `answer` to that programming question, answer which might require contextualized information in previous cells in the `notebook`

- `question`: Contextualized programming exercise/question to be answerred in the last cell of the jupyter notebook
- `notebook`: The ordered sequence of jupyter notebook cells which forms the full exercise context
  - `text`: the raw content of the cell
  - `cell_type`: code, markdown, or raw
- `answer`: The code implementation which answers to the question

### Data Splits

* validation: the dev split in the original paper
* test: the test split in the original paper 



## Additional Information

### Citation Information

If you use the dataset or the code in your research, please cite the following paper:

```
@article{DBLP:journals/corr/abs-1910-02216,
  author    = {Rajas Agashe and
               Srinivasan Iyer and
               Luke Zettlemoyer},
  title     = {JuICe: {A} Large Scale Distantly Supervised Dataset for Open Domain
               Context-based Code Generation},
  journal   = {CoRR},
  volume    = {abs/1910.02216},
  year      = {2019},
  url       = {http://arxiv.org/abs/1910.02216},
  eprinttype = {arXiv},
  eprint    = {1910.02216},
  timestamp = {Wed, 09 Oct 2019 14:07:58 +0200},
  biburl    = {https://dblp.org/rec/journals/corr/abs-1910-02216.bib},
  bibsource = {dblp computer science bibliography, https://dblp.org}
}
```