lewtun
HF staff
commited on
Commit
2dcd69b
1 Parent(s): 45fe48a

Refactor submission instructions

Browse files
Files changed (34) hide show
  1. LICENSE +201 -0
  2. README.md +196 -0
  3. cookiecutter.json +5 -0
  4. hooks/post_gen_project.py +5 -0
  5. hooks/pre_gen_project.py +16 -0
  6. requirements.txt +4 -0
  7. validation.py +28 -0
  8. {{cookiecutter.repo_name}}/LICENSE +201 -0
  9. {{cookiecutter.repo_name}}/README.md +94 -0
  10. {{cookiecutter.repo_name}}/cli.py +115 -0
  11. {{cookiecutter.repo_name}}/data/ade_corpus_v2/predictions.csv +0 -0
  12. {{cookiecutter.repo_name}}/data/ade_corpus_v2/task.json +1 -0
  13. {{cookiecutter.repo_name}}/data/banking_77/predictions.csv +0 -0
  14. {{cookiecutter.repo_name}}/data/banking_77/task.json +1 -0
  15. {{cookiecutter.repo_name}}/data/neurips_impact_statement_risks/predictions.csv +151 -0
  16. {{cookiecutter.repo_name}}/data/neurips_impact_statement_risks/task.json +1 -0
  17. {{cookiecutter.repo_name}}/data/one_stop_english/predictions.csv +519 -0
  18. {{cookiecutter.repo_name}}/data/one_stop_english/task.json +1 -0
  19. {{cookiecutter.repo_name}}/data/overruling/predictions.csv +2351 -0
  20. {{cookiecutter.repo_name}}/data/overruling/task.json +1 -0
  21. {{cookiecutter.repo_name}}/data/semiconductor_org_types/predictions.csv +450 -0
  22. {{cookiecutter.repo_name}}/data/semiconductor_org_types/task.json +1 -0
  23. {{cookiecutter.repo_name}}/data/systematic_review_inclusion/predictions.csv +2245 -0
  24. {{cookiecutter.repo_name}}/data/systematic_review_inclusion/task.json +1 -0
  25. {{cookiecutter.repo_name}}/data/tai_safety_research/predictions.csv +1640 -0
  26. {{cookiecutter.repo_name}}/data/tai_safety_research/task.json +1 -0
  27. {{cookiecutter.repo_name}}/data/terms_of_service/predictions.csv +0 -0
  28. {{cookiecutter.repo_name}}/data/terms_of_service/task.json +1 -0
  29. {{cookiecutter.repo_name}}/data/tweet_eval_hate/predictions.csv +2967 -0
  30. {{cookiecutter.repo_name}}/data/tweet_eval_hate/task.json +1 -0
  31. {{cookiecutter.repo_name}}/data/twitter_complaints/predictions.csv +3400 -0
  32. {{cookiecutter.repo_name}}/data/twitter_complaints/task.json +1 -0
  33. {{cookiecutter.repo_name}}/requirements.txt +2 -0
  34. {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}.py +304 -0
LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # RAFT Submission Template
2
+
3
+ Welcome to the RAFT benchmark! RAFT is a few-shot classification benchmark that tests language models:
4
+
5
+ - across multiple domains (lit review, tweets, customer interaction, etc.)
6
+ - on economically valuable classification tasks (someone inherently cares about the task)
7
+ - in a setting that mirrors deployment (50 examples per task, info retrieval allowed, hidden test set)
8
+
9
+ This repository can be used to generate a template so you can submit your predictions for evaluation on [the leaderboard](https://huggingface.co/spaces/ought/raft-leaderboard).
10
+
11
+ ## Quickstart
12
+
13
+ ### 1. Create an account and repository on the Hugging Face Hub
14
+
15
+ First create an account on the Hugging Face Hub and you can sign up [here](https://huggingface.co/join) if you haven't already!
16
+
17
+ ### 2. Create a template repository on your machine
18
+
19
+ The next step is to create a template repository on your local machine that contains various files and a CLI to help you validate and submit your predictions. You can run the following commands to create the repository:
20
+
21
+ ```bash
22
+ # Install the following libraries if you don't have them
23
+ pip install cookiecutter huggingface-hub==0.0.16
24
+ # Create the template repository
25
+ cookiecutter https://github.com/oughtinc/raft_submission.git
26
+ ```
27
+
28
+ This will ask you to specify your Hugging Face Hub username, password, and the name of the repository:
29
+
30
+ ```
31
+ hf_hub_username [<huggingface>]:
32
+ hf_hub_password [<password>]:
33
+ repo_name [<my-raft-submissions>]:
34
+ ```
35
+
36
+ This will trigger the following steps:
37
+
38
+ 1. Create a private dataset repository on the Hugging Face Hub under `{hf_hub_username}/{repo_name}`
39
+ 2. Clone the repository to your local machine
40
+ 3. Add various template files and commit them locally to the repository
41
+
42
+ The resulting repository should have the following structure:
43
+
44
+ ```
45
+ my-raft-submission
46
+ ├── LICENSE
47
+ ├── README.md <- The top-level README with submission instructions
48
+ ├── cli.py <- The CLI for installing dependencies, validating predictions, and making submissions
49
+ ├── data
50
+ │   ├── ade_corpus_v2 <- The predictions for each task are stored in their corresponding directory
51
+ │   │   ├── predictions.csv <- A CSV file of the predictions with `ID` and `Label` columns
52
+ │   │   └── task.json <- Configuration file for loading the predictions. Do not edit!
53
+ │   ├── banking_77
54
+ │   │   ├── predictions.csv
55
+ │   │   └── task.json
56
+ │   ├── neurips_impact_statement_risks
57
+ │   │   ├── predictions.csv
58
+ │   │   └── task.json
59
+ │   ├── one_stop_english
60
+ │   │   ├── predictions.csv
61
+ │   │   └── task.json
62
+ │   ├── overruling
63
+ │   │   ├── predictions.csv
64
+ │   │   └── task.json
65
+ │   ├── semiconductor_org_types
66
+ │   │   ├── predictions.csv
67
+ │   │   └── task.json
68
+ │   ├── systematic_review_inclusion
69
+ │   │   ├── predictions.csv
70
+ │   │   └── task.json
71
+ │   ├── tai_safety_research
72
+ │   │   ├── predictions.csv
73
+ │   │   └── task.json
74
+ │   ├── terms_of_service
75
+ │   │   ├── predictions.csv
76
+ │   │   └── task.json
77
+ │   ├── tweet_eval_hate
78
+ │   │   ├── predictions.csv
79
+ │   │   └── task.json
80
+ │   └── twitter_complaints
81
+ │   ├── predictions.csv
82
+ │   └── task.json
83
+ ├── my-raft-submission.py <- Script to load predictions during evaluation. Do not edit!
84
+ └── requirements.txt <- The requirements file for the submissions
85
+ ```
86
+
87
+ ### 3. Install the dependencies
88
+
89
+ The final step is to install the project's dependencies. We recommend creating a Python virtual environment for the project, e.g. with Anaconda:
90
+
91
+ ```bash
92
+ # Navigate to the template repository
93
+ cd my-raft-submissions
94
+ # Create and activate a virtual environment
95
+ conda create -n raft python=3.8 && conda activate raft
96
+ # Install dependencies
97
+ python cli.py install
98
+ ```
99
+
100
+ That's it! You're now all set to start generating predictions - see the instructions below on how to submit them to the Hub.
101
+
102
+ ## Submitting to the leaderboard
103
+
104
+ To make a submission to the [leaderboard](https://huggingface.co/spaces/ought/raft-leaderboard), there are three main steps:
105
+
106
+ 1. Generate predictions on the unlabeled test set of each task
107
+ 2. Validate the predictions are compatible with the evaluation framework
108
+ 3. Push the predictions to the Hub!
109
+
110
+ See the instructions below for more details.
111
+
112
+ ### Rules
113
+
114
+ 1. To prevent overfitting to the public leaderboard, we only evaluate **one submission per week**. You can push predictions to the Hub as many times as you wish, but we will only evaluate the most recent commit in a given week.
115
+ 2. Transfer or meta-learning using other datasets, including further pre-training on other corpora, is allowed.
116
+ 3. Use of unlabeled test data is allowed, as is it always available in the applied setting. For example, further pre-training using the unlabeled data for a task would be permitted.
117
+ 4. Systems may be augmented with information retrieved from the internet, e.g. via automated web searches.
118
+
119
+
120
+ ### Submission file format
121
+
122
+ For each task in RAFT, you should create a CSV file called `predictions.csv` with your model's predictions on the unlabeled test set. Each file should have exactly 2 columns:
123
+
124
+ * ID (int)
125
+ * Label (string)
126
+
127
+ See the dummy predictions in the `data` folder for examples with the expected format. Each `predictions.csv` file should be stored in the task's subfolder in `data` and at the end you should have something like the following:
128
+
129
+ ```
130
+ data
131
+ ├── ade_corpus_v2
132
+ │ ├── predictions.csv
133
+ │ └── task.json
134
+ ├── banking_77
135
+ │ ├── predictions.csv
136
+ │ └── task.json
137
+ ├── neurips_impact_statement_risks
138
+ │ ├── predictions.csv
139
+ │ └── task.json
140
+ ├── one_stop_english
141
+ │ ├── predictions.csv
142
+ │ └── task.json
143
+ ├── overruling
144
+ │ ├── predictions.csv
145
+ │ └── task.json
146
+ ├── semiconductor_org_types
147
+ │ ├── predictions.csv
148
+ │ └── task.json
149
+ ├── systematic_review_inclusion
150
+ │ ├── predictions.csv
151
+ │ └── task.json
152
+ ├── tai_safety_research
153
+ │ ├── predictions.csv
154
+ │ └── task.json
155
+ ├── terms_of_service
156
+ │ ├── predictions.csv
157
+ │ └── task.json
158
+ ├── tweet_eval_hate
159
+ │ ├── predictions.csv
160
+ │ └── task.json
161
+ └── twitter_complaints
162
+ ├── predictions.csv
163
+ └── task.json
164
+ ```
165
+
166
+ ### Validate your submission
167
+
168
+ To ensure that your submission files are correctly formatted, run the following command from the root of the repository:
169
+
170
+ ```
171
+ python cli.py validate
172
+ ```
173
+
174
+ If everything is correct, you should see the following message:
175
+
176
+ ```
177
+ All submission files validated! ✨ 🚀 ✨
178
+ Now you can make a submission 🤗
179
+ ```
180
+
181
+ ### Push your submission to the Hugging Face Hub!
182
+
183
+ The final step is to commit your files and push them to the Hub:
184
+
185
+ ```
186
+ python cli.py submit
187
+ ```
188
+
189
+ If there are no errors, you should see the following message:
190
+
191
+ ```
192
+ Submission successful! 🎉 🥳 🎉
193
+ Your submission will be evaulated on Sunday 05 September 2021 ⏳
194
+ ```
195
+
196
+ where the evaluation is run every Sunday and your results will be visible on the leaderboard.
cookiecutter.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ {
2
+ "hf_hub_username": "huggingface",
3
+ "hf_hub_password": "password",
4
+ "repo_name": "my-raft-submission"
5
+ }
hooks/post_gen_project.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ import subprocess
2
+
3
+ subprocess.call("git pull origin main".split())
4
+ subprocess.call(["git", "add", "."])
5
+ subprocess.call(["git", "commit", "-m", "Add template files"])
hooks/pre_gen_project.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from huggingface_hub import HfApi, HfFolder, Repository
2
+
3
+ hf_user = "{{cookiecutter.hf_hub_username}}"
4
+ hf_password = "{{cookiecutter.hf_hub_password}}"
5
+ huggingface_token = HfApi().login(username=hf_user, password=hf_password)
6
+ HfFolder.save_token(huggingface_token)
7
+
8
+ repo_url = HfApi().create_repo(
9
+ token=huggingface_token,
10
+ name="{{cookiecutter.repo_name}}",
11
+ organization=hf_user,
12
+ exist_ok=True,
13
+ private=True,
14
+ )
15
+
16
+ model_repo = Repository(local_dir=".", clone_from=repo_url, use_auth_token=huggingface_token)
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ datasets>=1.11.0
2
+ typer
3
+ cookiecutter
4
+ huggingface-hub==0.0.16
validation.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pathlib import Path
2
+
3
+ from datasets import load_dataset
4
+
5
+
6
+ def main():
7
+ tasks = ["safety_or_not"]
8
+
9
+ # check that all the expected files exist
10
+ prediction_files = list(Path(".").glob("*.csv"))
11
+ mismatched_files = set(tasks).symmetric_difference(set([f.stem for f in prediction_files]))
12
+ if mismatched_files:
13
+ raise ValueError(f"Incorrect number of files! Expected {len(tasks)} files, but got {len(prediction_files)}.")
14
+
15
+ # check we can load the dataset for each task
16
+ load_errors = []
17
+ for task in tasks:
18
+ try:
19
+ dset = load_dataset("../raft_submission", task)
20
+ except Exception as e:
21
+ load_errors.append(e)
22
+
23
+ if load_errors:
24
+ raise ValueError(f"Could not load predictions! Errors: {load_errors}")
25
+
26
+
27
+ if __name__ == "__main__":
28
+ main()
{{cookiecutter.repo_name}}/LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
{{cookiecutter.repo_name}}/README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ benchmark: raft
3
+ type: prediction
4
+ ---
5
+
6
+ # RAFT submissions for {{cookiecutter.repo_name}}
7
+
8
+ ## Submitting to the leaderboard
9
+
10
+ To make a submission to the [leaderboard](https://huggingface.co/spaces/ought/raft-leaderboard), there are three main steps:
11
+
12
+ 1. Generate predictions on the unlabeled test set of each task
13
+ 2. Validate the predictions are compatible with the evaluation framework
14
+ 3. Push the predictions to the Hub!
15
+
16
+ See the instructions below for more details.
17
+
18
+ ### Rules
19
+
20
+ 1. To prevent overfitting to the public leaderboard, we only evaluate **one submission per week**. You can push predictions to the Hub as many times as you wish, but we will only evaluate the most recent commit in a given week.
21
+ 2. Transfer or meta-learning using other datasets, including further pre-training on other corpora, is allowed.
22
+ 3. Use of unlabeled test data is allowed, as is it always available in the applied setting. For example, further pre-training using the unlabeled data for a task would be permitted.
23
+ 4. Systems may be augmented with information retrieved from the internet, e.g. via automated web searches.
24
+
25
+ ### Submission file format
26
+
27
+ For each task in RAFT, you should create a CSV file called `predictions.csv` with your model's predictions on the unlabeled test set. Each file should have exactly 2 columns:
28
+
29
+ * ID (int)
30
+ * Label (string)
31
+
32
+ See the dummy predictions in the `data` folder for examples with the expected format. Each `predictions.csv` file should be stored in the task's subfolder in `data` and at the end you should have something like the following:
33
+
34
+ ```
35
+ data
36
+ ├── ade_corpus_v2
37
+ │ ├── predictions.csv
38
+ │ └── task.json
39
+ ├── banking_77
40
+ │ ├── predictions.csv
41
+ │ └── task.json
42
+ ├── neurips_impact_statement_risks
43
+ │ ├── predictions.csv
44
+ │ └── task.json
45
+ ├── one_stop_english
46
+ │ ├── predictions.csv
47
+ │ └── task.json
48
+ ├── overruling
49
+ │ ├── predictions.csv
50
+ │ └── task.json
51
+ ├── semiconductor_org_types
52
+ │ ├── predictions.csv
53
+ │ └── task.json
54
+ ├── systematic_review_inclusion
55
+ │ ├── predictions.csv
56
+ │ └── task.json
57
+ ├── tai_safety_research
58
+ │ ├── predictions.csv
59
+ │ └── task.json
60
+ ├── terms_of_service
61
+ │ ├── predictions.csv
62
+ │ └── task.json
63
+ ├── tweet_eval_hate
64
+ │ ├── predictions.csv
65
+ │ └── task.json
66
+ └── twitter_complaints
67
+ ├── predictions.csv
68
+ └── task.json
69
+ ```
70
+
71
+ ### Validate your submission
72
+
73
+ To ensure that your submission files are correctly formatted, run the following command from the root of the repository:
74
+
75
+ ```
76
+ python cli.py validate
77
+ ```
78
+
79
+ If everything is correct, you should see the following message:
80
+
81
+ ```
82
+ All submission files validated! ✨ 🚀 ✨
83
+ Now you can make a submission 🤗
84
+ ```
85
+
86
+ ### Push your submission to the Hugging Face Hub!
87
+
88
+ The final step is to commit your files and push them to the Hub:
89
+
90
+ ```bash
91
+ git add .
92
+ git commit -m "Some commit message"
93
+ git push -f origin HEAD:main
94
+ ```
{{cookiecutter.repo_name}}/cli.py ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datetime
2
+ import subprocess
3
+ from pathlib import Path
4
+
5
+ import pandas as pd
6
+ import typer
7
+ from click.utils import echo
8
+ from datasets import get_dataset_config_names, load_dataset
9
+
10
+ CSV_SCHEMA = {
11
+ "banking_77": (5000, 2),
12
+ "overruling": (2350, 2),
13
+ "semiconductor_org_types": (449, 2),
14
+ "ade_corpus_v2": (5000, 2),
15
+ "twitter_complaints": (3399, 2),
16
+ "neurips_impact_statement_risks": (150, 2),
17
+ "systematic_review_inclusion": (2244, 2),
18
+ "terms_of_service": (5000, 2),
19
+ "tai_safety_research": (1639, 2),
20
+ "one_stop_english": (518, 2),
21
+ "tweet_eval_hate": (2966, 2),
22
+ }
23
+
24
+ app = typer.Typer()
25
+
26
+
27
+ @app.command()
28
+ def install():
29
+ typer.echo("Installing dependencies ...")
30
+ try:
31
+ p = subprocess.run(
32
+ "pip install --upgrade pip".split(),
33
+ stderr=subprocess.PIPE,
34
+ stdout=subprocess.PIPE,
35
+ check=True,
36
+ encoding="utf-8",
37
+ )
38
+ except subprocess.CalledProcessError as exc:
39
+ raise EnvironmentError(exc.stderr)
40
+
41
+ try:
42
+ p = subprocess.run(
43
+ "pip install --upgrade -r requirements.txt".split(),
44
+ stderr=subprocess.PIPE,
45
+ stdout=subprocess.PIPE,
46
+ check=True,
47
+ encoding="utf-8",
48
+ )
49
+ except subprocess.CalledProcessError as exc:
50
+ raise EnvironmentError(exc.stderr)
51
+
52
+ typer.echo("Success!")
53
+
54
+
55
+ @app.command()
56
+ def validate():
57
+ tasks = get_dataset_config_names("ought/raft")
58
+
59
+ # Check that all the expected files exist
60
+ prediction_files = list(Path("data").rglob("*.csv"))
61
+ mismatched_files = set(tasks).symmetric_difference(set([f.parent.name for f in prediction_files]))
62
+ if mismatched_files:
63
+ raise ValueError(f"Incorrect number of files! Expected {len(tasks)} files, but got {len(prediction_files)}.")
64
+
65
+ # Check all files have the expected shape (number of rows, number of columns)
66
+ # TODO(lewtun): Add a check for the IDs per file
67
+ shape_errors = []
68
+ column_errors = []
69
+ for prediction_file in prediction_files:
70
+ df = pd.read_csv(prediction_file)
71
+ incorrect_shape = df.shape != CSV_SCHEMA[prediction_file.parent.name]
72
+ if incorrect_shape:
73
+ shape_errors.append(prediction_file)
74
+ incorrect_columns = sorted(df.columns) != ["ID", "Label"]
75
+ if incorrect_columns:
76
+ column_errors.append(prediction_file)
77
+
78
+ if shape_errors:
79
+ raise ValueError(f"Incorrect CSV shapes in files: {shape_errors}")
80
+
81
+ if column_errors:
82
+ raise ValueError(f"Incorrect CSV columns in files: {column_errors}")
83
+
84
+ # Check we can load the dataset for each task
85
+ load_errors = []
86
+ for task in tasks:
87
+ try:
88
+ _ = load_dataset("../{{cookiecutter.repo_name}}", task)
89
+ except Exception as e:
90
+ load_errors.append(e)
91
+
92
+ if load_errors:
93
+ raise ValueError(f"Could not load predictions! Errors: {load_errors}")
94
+
95
+ typer.echo("All submission files validated! ✨ 🚀 ✨")
96
+ typer.echo("Now you can make a submission 🤗")
97
+
98
+
99
+ @app.command()
100
+ def submit():
101
+ subprocess.call("git pull origin main".split())
102
+ subprocess.call(["git", "add", "."])
103
+ subprocess.call(["git", "commit", "-m", "Submission"])
104
+ subprocess.call(["git", "push"])
105
+
106
+ today = datetime.date.today()
107
+ # MON = 0, SUN = 6 -> SUN = 0 .. SAT = 6
108
+ idx = (today.weekday() + 1) % 7
109
+ sun = today + datetime.timedelta(7 - idx)
110
+ typer.echo("Submission successful! 🎉 🥳 🎉")
111
+ typer.echo(f"Your submission will be evaulated on {sun:%A %d %B %Y} ⏳")
112
+
113
+
114
+ if __name__ == "__main__":
115
+ app()
{{cookiecutter.repo_name}}/data/ade_corpus_v2/predictions.csv ADDED
The diff for this file is too large to render. See raw diff
{{cookiecutter.repo_name}}/data/ade_corpus_v2/task.json ADDED
@@ -0,0 +1 @@
 
1
+ {"name": "ade_corpus_v2", "description": "", "data_columns": ["Sentence", "ID"], "label_columns": {"Label": ["ADE-related", "not ADE-related"]}}
{{cookiecutter.repo_name}}/data/banking_77/predictions.csv ADDED
The diff for this file is too large to render. See raw diff
{{cookiecutter.repo_name}}/data/banking_77/task.json ADDED
@@ -0,0 +1 @@
 
1
+ {"name": "banking_77", "description": "", "data_columns": ["Query", "ID"], "label_columns": {"Label": ["Refund_not_showing_up", "activate_my_card", "age_limit", "apple_pay_or_google_pay", "atm_support", "automatic_top_up", "balance_not_updated_after_bank_transfer", "balance_not_updated_after_cheque_or_cash_deposit", "beneficiary_not_allowed", "cancel_transfer", "card_about_to_expire", "card_acceptance", "card_arrival", "card_delivery_estimate", "card_linking", "card_not_working", "card_payment_fee_charged", "card_payment_not_recognised", "card_payment_wrong_exchange_rate", "card_swallowed", "cash_withdrawal_charge", "cash_withdrawal_not_recognised", "change_pin", "compromised_card", "contactless_not_working", "country_support", "declined_card_payment", "declined_cash_withdrawal", "declined_transfer", "direct_debit_payment_not_recognised", "disposable_card_limits", "edit_personal_details", "exchange_charge", "exchange_rate", "exchange_via_app", "extra_charge_on_statement", "failed_transfer", "fiat_currency_support", "get_disposable_virtual_card", "get_physical_card", "getting_spare_card", "getting_virtual_card", "lost_or_stolen_card", "lost_or_stolen_phone", "order_physical_card", "passcode_forgotten", "pending_card_payment", "pending_cash_withdrawal", "pending_top_up", "pending_transfer", "pin_blocked", "receiving_money", "request_refund", "reverted_card_payment?", "supported_cards_and_currencies", "terminate_account", "top_up_by_bank_transfer_charge", "top_up_by_card_charge", "top_up_by_cash_or_cheque", "top_up_failed", "top_up_limits", "top_up_reverted", "topping_up_by_card", "transaction_charged_twice", "transfer_fee_charged", "transfer_into_account", "transfer_not_received_by_recipient", "transfer_timing", "unable_to_verify_identity", "verify_my_identity", "verify_source_of_funds", "verify_top_up", "virtual_card_not_working", "visa_or_mastercard", "why_verify_identity", "wrong_amount_of_cash_received", "wrong_exchange_rate_for_cash_withdrawal"]}}
{{cookiecutter.repo_name}}/data/neurips_impact_statement_risks/predictions.csv ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ID,Label
2
+ 50,doesn't mention a harmful application
3
+ 51,mentions a harmful application
4
+ 52,doesn't mention a harmful application
5
+ 53,mentions a harmful application
6
+ 54,mentions a harmful application
7
+ 55,doesn't mention a harmful application
8
+ 56,doesn't mention a harmful application
9
+ 57,doesn't mention a harmful application
10
+ 58,doesn't mention a harmful application
11
+ 59,mentions a harmful application
12
+ 60,mentions a harmful application
13
+ 61,doesn't mention a harmful application
14
+ 62,doesn't mention a harmful application
15
+ 63,mentions a harmful application
16
+ 64,mentions a harmful application
17
+ 65,doesn't mention a harmful application
18
+ 66,doesn't mention a harmful application
19
+ 67,mentions a harmful application
20
+ 68,doesn't mention a harmful application
21
+ 69,doesn't mention a harmful application
22
+ 70,mentions a harmful application
23
+ 71,mentions a harmful application
24
+ 72,doesn't mention a harmful application
25
+ 73,doesn't mention a harmful application
26
+ 74,mentions a harmful application
27
+ 75,mentions a harmful application
28
+ 76,mentions a harmful application
29
+ 77,doesn't mention a harmful application
30
+ 78,mentions a harmful application
31
+ 79,mentions a harmful application
32
+ 80,doesn't mention a harmful application
33
+ 81,doesn't mention a harmful application
34
+ 82,doesn't mention a harmful application
35
+ 83,mentions a harmful application
36
+ 84,mentions a harmful application
37
+ 85,doesn't mention a harmful application
38
+ 86,mentions a harmful application
39
+ 87,doesn't mention a harmful application
40
+ 88,mentions a harmful application
41
+ 89,mentions a harmful application
42
+ 90,doesn't mention a harmful application
43
+ 91,mentions a harmful application
44
+ 92,mentions a harmful application
45
+ 93,mentions a harmful application
46
+ 94,mentions a harmful application
47
+ 95,mentions a harmful application
48
+ 96,doesn't mention a harmful application
49
+ 97,doesn't mention a harmful application
50
+ 98,mentions a harmful application
51
+ 99,mentions a harmful application
52
+ 100,doesn't mention a harmful application
53
+ 101,doesn't mention a harmful application
54
+ 102,doesn't mention a harmful application
55
+ 103,mentions a harmful application
56
+ 104,mentions a harmful application
57
+ 105,mentions a harmful application
58
+ 106,mentions a harmful application
59
+ 107,doesn't mention a harmful application
60
+ 108,doesn't mention a harmful application
61
+ 109,doesn't mention a harmful application
62
+ 110,mentions a harmful application
63
+ 111,doesn't mention a harmful application
64
+ 112,mentions a harmful application
65
+ 113,mentions a harmful application
66
+ 114,doesn't mention a harmful application
67
+ 115,mentions a harmful application
68
+ 116,mentions a harmful application
69
+ 117,mentions a harmful application
70
+ 118,doesn't mention a harmful application
71
+ 119,mentions a harmful application
72
+ 120,doesn't mention a harmful application
73
+ 121,doesn't mention a harmful application
74
+ 122,doesn't mention a harmful application
75
+ 123,mentions a harmful application
76
+ 124,doesn't mention a harmful application
77
+ 125,doesn't mention a harmful application
78
+ 126,mentions a harmful application
79
+ 127,doesn't mention a harmful application
80
+ 128,mentions a harmful application
81
+ 129,mentions a harmful application
82
+ 130,doesn't mention a harmful application
83
+ 131,doesn't mention a harmful application
84
+ 132,mentions a harmful application
85
+ 133,doesn't mention a harmful application
86
+ 134,mentions a harmful application
87
+ 135,mentions a harmful application
88
+ 136,doesn't mention a harmful application
89
+ 137,mentions a harmful application
90
+ 138,mentions a harmful application
91
+ 139,mentions a harmful application
92
+ 140,doesn't mention a harmful application
93
+ 141,mentions a harmful application
94
+ 142,doesn't mention a harmful application
95
+ 143,mentions a harmful application
96
+ 144,doesn't mention a harmful application
97
+ 145,mentions a harmful application
98
+ 146,mentions a harmful application
99
+ 147,doesn't mention a harmful application
100
+ 148,mentions a harmful application
101
+ 149,mentions a harmful application
102
+ 150,doesn't mention a harmful application
103
+ 151,mentions a harmful application
104
+ 152,doesn't mention a harmful application
105
+ 153,mentions a harmful application
106
+ 154,doesn't mention a harmful application
107
+ 155,mentions a harmful application
108
+ 156,doesn't mention a harmful application
109
+ 157,mentions a harmful application
110
+ 158,mentions a harmful application
111
+ 159,mentions a harmful application
112
+ 160,doesn't mention a harmful application
113
+ 161,mentions a harmful application
114
+ 162,doesn't mention a harmful application
115
+ 163,mentions a harmful application
116
+ 164,doesn't mention a harmful application
117
+ 165,doesn't mention a harmful application
118
+ 166,doesn't mention a harmful application
119
+ 167,doesn't mention a harmful application
120
+ 168,doesn't mention a harmful application
121
+ 169,doesn't mention a harmful application
122
+ 170,doesn't mention a harmful application
123
+ 171,doesn't mention a harmful application
124
+ 172,mentions a harmful application
125
+ 173,doesn't mention a harmful application
126
+ 174,mentions a harmful application
127
+ 175,doesn't mention a harmful application
128
+ 176,doesn't mention a harmful application
129
+ 177,mentions a harmful application
130
+ 178,mentions a harmful application
131
+ 179,doesn't mention a harmful application
132
+ 180,mentions a harmful application
133
+ 181,doesn't mention a harmful application
134
+ 182,doesn't mention a harmful application
135
+ 183,mentions a harmful application
136
+ 184,mentions a harmful application
137
+ 185,mentions a harmful application
138
+ 186,doesn't mention a harmful application
139
+ 187,doesn't mention a harmful application
140
+ 188,mentions a harmful application
141
+ 189,mentions a harmful application
142
+ 190,doesn't mention a harmful application
143
+ 191,mentions a harmful application
144
+ 192,doesn't mention a harmful application
145
+ 193,mentions a harmful application
146
+ 194,doesn't mention a harmful application
147
+ 195,doesn't mention a harmful application
148
+ 196,doesn't mention a harmful application
149
+ 197,mentions a harmful application
150
+ 198,mentions a harmful application
151
+ 199,doesn't mention a harmful application
{{cookiecutter.repo_name}}/data/neurips_impact_statement_risks/task.json ADDED
@@ -0,0 +1 @@
 
1
+ {"name": "neurips_impact_statement_risks", "description": "", "data_columns": ["Paper title", "Paper link", "Impact statement", "ID"], "label_columns": {"Label": ["doesn't mention a harmful application", "mentions a harmful application"]}}
{{cookiecutter.repo_name}}/data/one_stop_english/predictions.csv ADDED
@@ -0,0 +1,519 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ID,Label
2
+ 50,advanced
3
+ 51,elementary
4
+ 52,advanced
5
+ 53,intermediate
6
+ 54,elementary
7
+ 55,elementary
8
+ 56,advanced
9
+ 57,advanced
10
+ 58,advanced
11
+ 59,advanced
12
+ 60,elementary
13
+ 61,intermediate
14
+ 62,elementary
15
+ 63,advanced
16
+ 64,advanced
17
+ 65,intermediate
18
+ 66,intermediate
19
+ 67,elementary
20
+ 68,elementary
21
+ 69,advanced
22
+ 70,advanced
23
+ 71,elementary
24
+ 72,advanced
25
+ 73,advanced
26
+ 74,intermediate
27
+ 75,elementary
28
+ 76,elementary
29
+ 77,advanced
30
+ 78,advanced
31
+ 79,elementary
32
+ 80,elementary
33
+ 81,intermediate
34
+ 82,intermediate
35
+ 83,elementary
36
+ 84,advanced
37
+ 85,intermediate
38
+ 86,elementary
39
+ 87,intermediate
40
+ 88,elementary
41
+ 89,intermediate
42
+ 90,advanced
43
+ 91,advanced
44
+ 92,advanced
45
+ 93,elementary
46
+ 94,elementary
47
+ 95,advanced
48
+ 96,intermediate
49
+ 97,elementary
50
+ 98,advanced
51
+ 99,elementary
52
+ 100,intermediate
53
+ 101,intermediate
54
+ 102,elementary
55
+ 103,intermediate
56
+ 104,advanced
57
+ 105,elementary
58
+ 106,elementary
59
+ 107,intermediate
60
+ 108,elementary
61
+ 109,elementary
62
+ 110,elementary
63
+ 111,advanced
64
+ 112,advanced
65
+ 113,elementary
66
+ 114,elementary
67
+ 115,advanced
68
+ 116,advanced
69
+ 117,advanced
70
+ 118,elementary
71
+ 119,intermediate
72
+ 120,elementary
73
+ 121,intermediate
74
+ 122,intermediate
75
+ 123,intermediate
76
+ 124,elementary
77
+ 125,intermediate
78
+ 126,elementary
79
+ 127,advanced
80
+ 128,intermediate
81
+ 129,advanced
82
+ 130,advanced
83
+ 131,elementary
84
+ 132,advanced
85
+ 133,intermediate
86
+ 134,intermediate
87
+ 135,elementary
88
+ 136,elementary
89
+ 137,advanced
90
+ 138,elementary
91
+ 139,elementary
92
+ 140,intermediate
93
+ 141,intermediate
94
+ 142,elementary
95
+ 143,intermediate
96
+ 144,intermediate
97
+ 145,advanced
98
+ 146,elementary
99
+ 147,advanced
100
+ 148,advanced
101
+ 149,intermediate
102
+ 150,advanced
103
+ 151,elementary
104
+ 152,intermediate
105
+ 153,intermediate
106
+ 154,advanced
107
+ 155,advanced
108
+ 156,elementary
109
+ 157,advanced
110
+ 158,elementary
111
+ 159,elementary
112
+ 160,advanced
113
+ 161,advanced
114
+ 162,elementary
115
+ 163,intermediate
116
+ 164,advanced
117
+ 165,elementary
118
+ 166,intermediate
119
+ 167,intermediate
120
+ 168,elementary
121
+ 169,advanced
122
+ 170,elementary
123