# piqa

<br />

- **Description**:

Physical IQa: Physical Interaction QA, a new commonsense QA benchmark for naive
physics reasoning focusing on how we interact with everyday objects in everyday
situations. This dataset focuses on affordances of objects, i.e., what actions
each physical object affords (e.g., it is possible to use a shoe as a doorstop),
and what physical interactions a group of objects afford (e.g., it is possible
to place an apple on top of a book, but not the other way around). The dataset
requires reasoning about both the prototypical use of objects (e.g., shoes are
used for walking) and non-prototypical but practically plausible use of objects
(e.g., shoes can be used as a doorstop). The dataset includes 20,000 QA pairs
that are either multiple-choice or true/false questions.

- **Additional Documentation** :
  [Explore on Papers With Code](https://paperswithcode.com/dataset/piqa)

- **Homepage** :
  <https://leaderboard.allenai.org/physicaliqa/submissions/get-started>

- **Source code** :
  [`tfds.datasets.piqa.Builder`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/datasets/piqa/piqa_dataset_builder.py)

- **Versions**:

  - **`1.0.0`** (default): No release notes.
- **Download size** : `1.74 MiB`

- **Dataset size** : `5.92 MiB`

- **Auto-cached**
  ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
  Yes

- **Splits**:

| Split | Examples |
|---|---|
| `'train'` | 16,113 |
| `'validation'` | 1,838 |

- **Feature structure**:

    FeaturesDict({
        'goal': Text(shape=(), dtype=string),
        'id': Text(shape=(), dtype=string),
        'label': ClassLabel(shape=(), dtype=int64, num_classes=2),
        'sol1': Text(shape=(), dtype=string),
        'sol2': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| goal | Text |   | string |   |
| id | Text |   | string |   |
| label | ClassLabel |   | int64 |   |
| sol1 | Text |   | string |   |
| sol2 | Text |   | string |   |

- **Supervised keys** (See
  [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):
  `None`

- **Figure**
  ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
  Not supported.

- **Examples**
  ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):

<button id="displaydataframe">Display examples...</button>

- **Citation**:

    @inproceedings{Bisk2020,
      author = {Yonatan Bisk and Rowan Zellers and
                Ronan Le Bras and Jianfeng Gao
                and Yejin Choi},
      title = {PIQA: Reasoning about Physical Commonsense in
               Natural Language},
      booktitle = {Thirty-Fourth AAAI Conference on
                   Artificial Intelligence},
      year = {2020},
    }