Datasets:

Modalities:
Text
Languages:
English
ArXiv:
Libraries:
Datasets
License:
lewtun HF staff commited on
Commit
3fe19b3
1 Parent(s): 2a7d439

Convert ID type to int

Browse files
Files changed (3) hide show
  1. .gitignore +141 -0
  2. README.md +1 -1
  3. raft.py +4 -19
.gitignore ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98
+ __pypackages__/
99
+
100
+ # Celery stuff
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath parsed files
105
+ *.sage.py
106
+
107
+ # Environments
108
+ .env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder project settings
117
+ .spyderproject
118
+ .spyproject
119
+
120
+ # Rope project settings
121
+ .ropeproject
122
+
123
+ # mkdocs documentation
124
+ /site
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
133
+
134
+ # pytype static type analyzer
135
+ .pytype/
136
+
137
+ # Cython debug symbols
138
+ cython_debug/
139
+
140
+ # Datasets locks
141
+ *.lock
README.md CHANGED
@@ -11,7 +11,7 @@ licenses:
11
  - other-individual-licenses
12
  multilinguality:
13
  - monolingual
14
- pretty_name: ''
15
  size_categories:
16
  - unknown
17
  source_datasets:
 
11
  - other-individual-licenses
12
  multilinguality:
13
  - monolingual
14
+ pretty_name: 'Real-world Annotated Few-shot Tasks: RAFT'
15
  size_categories:
16
  - unknown
17
  source_datasets:
raft.py CHANGED
@@ -44,7 +44,7 @@ _HOMEPAGE = "https://raft.elicit.org"
44
  # TODO: Add the licence for the dataset here if you can find it
45
  _LICENSE = ""
46
 
47
- DATA_DIR_URL = "data/"
48
  TASKS = {
49
  "ade_corpus_v2": {
50
  "name": "ade_corpus_v2",
@@ -203,25 +203,12 @@ TASKS = {
203
  },
204
  }
205
 
206
- _URLs = {s: {"train": f"{DATA_DIR_URL}{s}/train.csv", "test": f"{DATA_DIR_URL}{s}/test_unlabeled.csv"} for s in TASKS}
207
 
208
 
209
  class Raft(datasets.GeneratorBasedBuilder):
210
- """RAFT Dataset."""
211
-
212
  VERSION = datasets.Version("1.1.0")
213
-
214
- # This is an example of a dataset with multiple configurations.
215
- # If you don't want/need to define several sub-sets in your dataset,
216
- # just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
217
-
218
- # If you need to make complex sub-parts in the datasets with configurable options
219
- # You can create your own builder configuration class to store attribute, inheriting from datasets.BuilderConfig
220
- # BUILDER_CONFIG_CLASS = MyBuilderConfig
221
-
222
- # You will be able to load one or the other configurations in the following list with
223
- # data = datasets.load_dataset('my_dataset', 'first_domain')
224
- # data = datasets.load_dataset('my_dataset', 'second_domain')
225
  BUILDER_CONFIGS = []
226
 
227
  for key in TASKS:
@@ -235,12 +222,10 @@ class Raft(datasets.GeneratorBasedBuilder):
235
  )
236
 
237
  def _info(self):
238
- # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
239
  DEFAULT_LABEL_NAME = "Unlabeled"
240
 
241
  task = TASKS[self.config.name]
242
- # TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
243
- data_columns = {col_name: datasets.Value("string") for col_name in task["data_columns"]}
244
 
245
  label_columns = {}
246
  for label_name in task["label_columns"]:
 
44
  # TODO: Add the licence for the dataset here if you can find it
45
  _LICENSE = ""
46
 
47
+ DATA_DIR = "data/"
48
  TASKS = {
49
  "ade_corpus_v2": {
50
  "name": "ade_corpus_v2",
 
203
  },
204
  }
205
 
206
+ _URLs = {s: {"train": f"{DATA_DIR}{s}/train.csv", "test": f"{DATA_DIR}{s}/test_unlabeled.csv"} for s in TASKS}
207
 
208
 
209
  class Raft(datasets.GeneratorBasedBuilder):
210
+ """RAFT Dataset"""
 
211
  VERSION = datasets.Version("1.1.0")
 
 
 
 
 
 
 
 
 
 
 
 
212
  BUILDER_CONFIGS = []
213
 
214
  for key in TASKS:
 
222
  )
223
 
224
  def _info(self):
 
225
  DEFAULT_LABEL_NAME = "Unlabeled"
226
 
227
  task = TASKS[self.config.name]
228
+ data_columns = {col_name: (datasets.Value("string") if col_name != "ID" else datasets.Value("int32")) for col_name in task["data_columns"]}
 
229
 
230
  label_columns = {}
231
  for label_name in task["label_columns"]: