Add SQA
{'login': 'NielsRogge', 'id': 48327001, 'node_id': 'MDQ6VXNlcjQ4MzI3MDAx', 'avatar_url': 'https://avatars.githubusercontent.com/u/48327001?v=4', 'gravatar_id': '', 'url': 'https://api.github.com/users/NielsRogge', 'html_url': 'https://github.com/NielsRogge', 'followers_url': 'https://api.github.com/users/NielsRogge/followers', 'following_url': 'https://api.github.com/users/NielsRogge/following{/other_user}', 'gists_url': 'https://api.github.com/users/NielsRogge/gists{/gist_id}', 'starred_url': 'https://api.github.com/users/NielsRogge/starred{/owner}{/repo}', 'subscriptions_url': 'https://api.github.com/users/NielsRogge/subscriptions', 'organizations_url': 'https://api.github.com/users/NielsRogge/orgs', 'repos_url': 'https://api.github.com/users/NielsRogge/repos', 'events_url': 'https://api.github.com/users/NielsRogge/events{/privacy}', 'received_events_url': 'https://api.github.com/users/NielsRogge/received_events', 'type': 'User', 'site_admin': False}
[{'id': 2067376369, 'node_id': 'MDU6TGFiZWwyMDY3Mzc2MzY5', 'url': 'https://api.github.com/repos/huggingface/datasets/labels/dataset%20request', 'name': 'dataset request', 'color': 'e99695', 'default': False, 'description': 'Requesting to add a new dataset'}]
[]
['I’ll take this one to test the workflow for the sprint next week cc @yjernite @lhoestq '
 '@thomwolf here\'s a slightly adapted version of the code from the [official Tapas repository](https://github.com/google-research/tapas/blob/master/tapas/utils/interaction_utils.py) that is used to turn the `answer_coordinates` and `answer_texts` columns into true Python lists of tuples/strings:\r\n\r\n```\r\nimport pandas as pd\r\nimport ast\r\n\r\ndata = pd.read_csv("/content/sqa_data/random-split-1-dev.tsv", sep=\'\\t\')\r\n\r\ndef _parse_answer_coordinates(answer_coordinate_str):\r\n  """Parses the answer_coordinates of a question.\r\n  Args:\r\n    answer_coordinate_str: A string representation of a Python list of tuple\r\n      strings.\r\n      For example: "[\'(1, 4)\',\'(1, 3)\', ...]"\r\n  """\r\n\r\n  try:\r\n    answer_coordinates = []\r\n    # make a list of strings\r\n    coords = ast.literal_eval(answer_coordinate_str)\r\n    # parse each string as a tuple\r\n    for row_index, column_index in sorted(\r\n        ast.literal_eval(coord) for coord in coords):\r\n      answer_coordinates.append((row_index, column_index))\r\n  except SyntaxError:\r\n    raise ValueError(\'Unable to evaluate %s\' % answer_coordinate_str)\r\n  \r\n  return answer_coordinates\r\n\r\n\r\ndef _parse_answer_text(answer_text):\r\n  """Populates the answer_texts field of `answer` by parsing `answer_text`.\r\n  Args:\r\n    answer_text: A string representation of a Python list of strings.\r\n      For example: "[u\'test\', u\'hello\', ...]"\r\n  """\r\n  try:\r\n    answer = []\r\n    for value in ast.literal_eval(answer_text):\r\n      answer.append(value)\r\n  except SyntaxError:\r\n    raise ValueError(\'Unable to evaluate %s\' % answer_text)\r\n\r\n  return answer\r\n\r\ndata[\'answer_coordinates\'] = data[\'answer_coordinates\'].apply(lambda coords_str: _parse_answer_coordinates(coords_str))\r\ndata[\'answer_text\'] = data[\'answer_text\'].apply(lambda txt: _parse_answer_text(txt))\r\n```\r\n\r\nHere I\'m using Pandas to read in one of the TSV files (the dev set). \r\n\r\n'
 'Closing since SQA was added in #1566 ']
## Adding a Dataset
- **Name:** SQA (Sequential Question Answering) by Microsoft. 
- **Description:** The SQA dataset was created to explore the task of answering sequences of inter-related questions on HTML tables. It has 6,066 sequences with 17,553 questions in total.
- **Paper:** https://www.microsoft.com/en-us/research/publication/search-based-neural-structured-learning-sequential-question-answering/
- **Data:** https://www.microsoft.com/en-us/download/details.aspx?id=54253
- **Motivation:** currently, the [Tapas](https://ai.googleblog.com/2020/04/using-neural-networks-to-find-answers.html) algorithm by Google AI is being added to the Transformers library (see https://github.com/huggingface/transformers/pull/8113). It would be great to use that model in combination with this dataset, on which it achieves SOTA results (average question accuracy of 0.71).

Note 1: this dataset actually consists of 2 types of files: 
1) TSV files, containing the questions, answer coordinates and answer texts (for training, dev and test)
2) a folder of csv files, which contain the actual tabular data

Note 2: if you download the dataset straight from the download link above, then you will see that the `answer_coordinates` and `answer_text` columns are string lists of string tuples and strings respectively, which is not ideal. It would be better to make them true Python lists of tuples and strings respectively (using `ast.literal_eval`), before uploading them to the HuggingFace hub.

Adding this would be great! Then we could possibly also add [WTQ (WikiTable Questions)](https://github.com/ppasupat/WikiTableQuestions) and [TabFact (Tabular Fact Checking)](https://github.com/wenhuchen/Table-Fact-Checking) on which TAPAS also achieves state-of-the-art results. Note that the TAPAS algorithm requires these datasets to first be converted into the SQA format.

Instructions to add a new dataset can be found [here](https://huggingface.co/docs/datasets/share_dataset.html).

{'url': 'https://api.github.com/repos/huggingface/datasets/issues/880/reactions', 'total_count': 0, '+1': 0, '-1': 0, 'laugh': 0, 'hooray': 0, 'confused': 0, 'heart': 0, 'rocket': 0, 'eyes': 0}