Repository: sileod/tasksource Branch: main Commit: ef6535aebaed Files: 26 Total size: 491.5 KB Directory structure: gitextract__ri1waap/ ├── .github/ │ ├── scripts/ │ │ └── release.py │ └── workflows/ │ ├── python-publish.yml │ └── release.yml ├── .gitignore ├── CITATION.cff ├── LICENSE ├── README.md ├── mtasks.md ├── pyproject.toml ├── setup.cfg ├── src/ │ └── tasksource/ │ ├── .ipynb_checkpoints/ │ │ ├── access-checkpoint.py │ │ ├── preprocess-checkpoint.py │ │ ├── recast-checkpoint.py │ │ └── tasks-checkpoint.py │ ├── __init__.py │ ├── access.py │ ├── metadata/ │ │ ├── __init__.py │ │ ├── bigbench_groups.py │ │ ├── blimp_groups.py │ │ ├── original.txt │ │ └── popularity.py │ ├── mtasks.py │ ├── preprocess.py │ ├── recast.py │ └── tasks.py └── tasks.md ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/scripts/release.py ================================================ #!/usr/bin/env python3 import json import subprocess def get_last_version() -> str: """Return the version number of the last release.""" json_string = ( subprocess.run( ["gh", "release", "view", "--json", "tagName"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) .stdout.decode("utf8") .strip() ) return json.loads(json_string)["tagName"] def bump_patch_number(version_number: str) -> str: """Return a copy of `version_number` with the patch number incremented.""" major, minor, patch = version_number.split(".") return f"{major}.{minor}.{int(patch) + 1}" def create_new_patch_release(): """Create a new patch release on GitHub.""" try: last_version_number = get_last_version() except subprocess.CalledProcessError as err: if err.stderr.decode("utf8").startswith("HTTP 404:"): # The project doesn't have any releases yet. new_version_number = "0.0.1" else: raise else: new_version_number = bump_patch_number(last_version_number) subprocess.run( ["gh", "release", "create", "--generate-notes", new_version_number], check=True, ) if __name__ == "__main__": create_new_patch_release() ================================================ FILE: .github/workflows/python-publish.yml ================================================ name: Publish to PyPI.org on: release: types: [published] jobs: pypi: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - run: python3 -m pip install --upgrade build && python3 -m build - name: Publish package uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} ================================================ FILE: .github/workflows/release.yml ================================================ name: Create a new patch release on: workflow_dispatch jobs: github: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Create new patch release run: .github/scripts/release.py env: GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} ================================================ FILE: .gitignore ================================================ # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] # C extensions *.so # Distribution / packaging .Python env/ build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *,cover # Translations *.mo *.pot # Django stuff: *.log # Sphinx documentation docs/_build/ # PyBuilder target/ ================================================ FILE: CITATION.cff ================================================ cff-version: 1.1.0 message: "If you use this work, please cite it as below." authors: - family-names: "Sileo" given-names: "Damien" title: "tasksource: A Dataset Harmonization Framework for Streamlined NLP Multi-Task Learning and Evaluation" version: "1.0.0" date-released: 2023-01-01 url: "https://arxiv.org/abs/2301.05948" ================================================ FILE: LICENSE ================================================ Attribution 4.0 International ======================================================================= Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More_considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= Creative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. ================================================ FILE: README.md ================================================ ## tasksource ![](https://aeiljuispo.cloudimg.io/v7/https://s3.amazonaws.com/moonup/production/uploads/5fc0bcb41160c47d1d43856b/j06-U5e2Tifi2xOnTudqS.jpeg?w=20&h=20&f=face) 600+ curated datasets and preprocessings for instant and interchangeable use Huggingface Datasets is an excellent library, but it lacks standardization, and datasets often require preprocessing work to be used interchangeably. `tasksource` streamlines interchangeable datasets usage to scale evaluation or multi-task learning. Each dataset is standardized to a `MultipleChoice`, `Classification`, or `TokenClassification` template with canonical fields. We focus on discriminative tasks (= with negative examples or classes) for our annotations but also provide a `SequenceToSequence` template. All implemented preprocessings are in [tasks.py](https://github.com/sileod/tasksource/blob/main/src/tasksource/tasks.py) or [tasks.md](https://github.com/sileod/tasksource/blob/main/tasks.md). A preprocessing is a function that accepts a dataset and returns the standardized dataset. Preprocessing code is concise and human-readable. ### Installation and usage: `pip install tasksource` ```python from tasksource import list_tasks, load_task df = list_tasks(multilingual=False) # takes some time for id in df[df.task_type=="MultipleChoice"].id: dataset = load_task(id) # all yielded datasets can be used interchangeably ``` Browse the 500+ curated tasks in tasks.md (200+ MultipleChoice tasks, 200+ Classification tasks), and feel free to request a new task. Datasets are downloaded to `$HF_DATASETS_CACHE` (like any Hugging Face dataset), so ensure you have more than 100GB of space available. You can now also use: ```python load_dataset("tasksource/data", "glue/rte",max_rows=30_000) ``` ### Pretrained models: Text encoder pretrained on tasksource reached state-of-the-art results: [🤗/deberta-v3-base-tasksource-nli](https://hf.co/sileod/deberta-v3-base-tasksource-nli) Tasksource pretraining is notably helpful for RLHF reward modeling or any kind of classification, including zero-shot. You can also find a large and a multilingual version. ### tasksource-instruct The repo also contains some recasting code to convert tasksource datasets to instructions, providing one of the richest instruction-tuning datasets: [🤗/tasksource-instruct-v0](https://hf.co/datasets/tasksource/tasksource-instruct-v0) ### tasksource-label-nli We also recast all classification tasks as natural language inference, to improve entailment-based zero-shot classification detection: [🤗/zero-shot-label-nli](https://huggingface.co/datasets/tasksource/zero-shot-label-nli) ### Write and use custom preprocessings ```python from tasksource import MultipleChoice codah = MultipleChoice('question_propmt',choices_list='candidate_answers', labels='correct_answer_idx', dataset_name='codah', config_name='codah') winogrande = MultipleChoice('sentence',['option1','option2'],'answer', dataset_name='winogrande',config_name='winogrande_xl', splits=['train','validation',None]) # test labels are not usable tasks = [winogrande.load(), codah.load()]) # Aligned datasets (same columns) can be used interchangably ``` ### Citation and contact For more details, refer to this [article:](https://arxiv.org/abs/2301.05948) ```bib @inproceedings{sileo-2024-tasksource, title = "tasksource: A Large Collection of {NLP} tasks with a Structured Dataset Preprocessing Framework", author = "Sileo, Damien", booktitle = "Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)", month = may, year = "2024", address = "Torino, Italia", publisher = "ELRA and ICCL", url = "https://aclanthology.org/2024.lrec-main.1361", pages = "15655--15684", } ``` For help integrating tasksource into your experiments, please contact [damien.sileo@inria.fr](mailto:damien.sileo@inria.fr). ================================================ FILE: mtasks.md ================================================ | | id | dataset_name | config_name | task_name | preprocessing_name | task_type | |----:|:-------------------------------------------------------------|:--------------------------------------------|:-------------------------------|:------------|:------------------------|:--------------------| | 0 | xnli/ru | metaeval/xnli | ru | | xnli | Classification | | 1 | xnli/tr | metaeval/xnli | tr | | xnli | Classification | | 2 | xnli/ur | metaeval/xnli | ur | | xnli | Classification | | 3 | xnli/vi | metaeval/xnli | vi | | xnli | Classification | | 4 | xnli/zh | metaeval/xnli | zh | | xnli | Classification | | 5 | xnli/hi | metaeval/xnli | hi | | xnli | Classification | | 6 | xnli/fr | metaeval/xnli | fr | | xnli | Classification | | 7 | xnli/es | metaeval/xnli | es | | xnli | Classification | | 8 | xnli/en | metaeval/xnli | en | | xnli | Classification | | 9 | xnli/el | metaeval/xnli | el | | xnli | Classification | | 10 | xnli/de | metaeval/xnli | de | | xnli | Classification | | 11 | xnli/bg | metaeval/xnli | bg | | xnli | Classification | | 12 | xnli/ar | metaeval/xnli | ar | | xnli | Classification | | 13 | xnli/th | metaeval/xnli | th | | xnli | Classification | | 14 | xnli/sw | metaeval/xnli | sw | | xnli | Classification | | 15 | americas_nli/all_languages | americas_nli | all_languages | | americas_nli | Classification | | 16 | multilingual-NLI-26lang-2mil7/MoritzLaurer--multilingual_nli | MoritzLaurer/multilingual-NLI-26lang-2mil7 | MoritzLaurer--multilingual_nli | | moritz_xnli | Classification | | 17 | stsb_multi_mt/en | stsb_multi_mt | en | | stsb_multi_mt | Classification | | 18 | stsb_multi_mt/fr | stsb_multi_mt | fr | | stsb_multi_mt | Classification | | 19 | stsb_multi_mt/de | stsb_multi_mt | de | | stsb_multi_mt | Classification | | 20 | stsb_multi_mt/es | stsb_multi_mt | es | | stsb_multi_mt | Classification | | 21 | stsb_multi_mt/it | stsb_multi_mt | it | | stsb_multi_mt | Classification | | 22 | stsb_multi_mt/nl | stsb_multi_mt | nl | | stsb_multi_mt | Classification | | 23 | stsb_multi_mt/pl | stsb_multi_mt | pl | | stsb_multi_mt | Classification | | 24 | stsb_multi_mt/pt | stsb_multi_mt | pt | | stsb_multi_mt | Classification | | 25 | stsb_multi_mt/ru | stsb_multi_mt | ru | | stsb_multi_mt | Classification | | 26 | stsb_multi_mt/zh | stsb_multi_mt | zh | | stsb_multi_mt | Classification | | 27 | paws-x/zh | paws-x | zh | | pawsx | Classification | | 28 | paws-x/ja | paws-x | ja | | pawsx | Classification | | 29 | paws-x/ko | paws-x | ko | | pawsx | Classification | | 30 | paws-x/en | paws-x | en | | pawsx | Classification | | 31 | paws-x/de | paws-x | de | | pawsx | Classification | | 32 | paws-x/es | paws-x | es | | pawsx | Classification | | 33 | paws-x/fr | paws-x | fr | | pawsx | Classification | | 34 | miam/vm2 | miam | vm2 | | miam | Classification | | 35 | miam/maptask | miam | maptask | | miam | Classification | | 36 | miam/loria | miam | loria | | miam | Classification | | 37 | miam/dihana | miam | dihana | | miam | Classification | | 38 | miam/ilisten | miam | ilisten | | miam | Classification | | 39 | x-stance/fr | strombergnlp/x-stance | fr | | xstance | Classification | | 40 | x-stance/de | strombergnlp/x-stance | de | | xstance | Classification | | 41 | offenseval_2020/da | strombergnlp/offenseval_2020 | da | | offenseval | Classification | | 42 | offenseval_2020/tr | strombergnlp/offenseval_2020 | tr | | offenseval | Classification | | 43 | offenseval_2020/gr | strombergnlp/offenseval_2020 | gr | | offenseval | Classification | | 44 | offenseval_2020/ar | strombergnlp/offenseval_2020 | ar | | offenseval | Classification | | 45 | offenseval_dravidian/tamil | offenseval_dravidian | tamil | | offenseval_dravidian | Classification | | 46 | offenseval_dravidian/malayalam | offenseval_dravidian | malayalam | | offenseval_dravidian | Classification | | 47 | offenseval_dravidian/kannada | offenseval_dravidian | kannada | | offenseval_dravidian | Classification | | 48 | MLMA_hate_speech | nedjmaou/MLMA_hate_speech | | | mlma_hate | Classification | | 49 | xglue/qam | xglue | qam | | qam | Classification | | 50 | x-fact | metaeval/x-fact | | | x_fact | Classification | | 51 | xglue/nc | xglue | nc | | xglue___nc | Classification | | 52 | xglue/qadsm | xglue | qadsm | | xglue___qadsm | Classification | | 53 | xglue/qam | xglue | qam | | xglue___qam | Classification | | 54 | xglue/wpr | xglue | wpr | | xglue___wpr | Classification | | 55 | xlwic/xlwic_fr_fr | pasinit/xlwic | xlwic_fr_fr | | xlwic | Classification | | 56 | xlwic/xlwic_en_ko | pasinit/xlwic | xlwic_en_ko | | xlwic | Classification | | 57 | xlwic/xlwic_it_it | pasinit/xlwic | xlwic_it_it | | xlwic | Classification | | 58 | xlwic/xlwic_de_de | pasinit/xlwic | xlwic_de_de | | xlwic | Classification | | 59 | oasst1_dense_flat/quality | tasksource/oasst1_dense_flat | | quality | oasst1__quality | Classification | | 60 | oasst1_dense_flat/toxicity | tasksource/oasst1_dense_flat | | toxicity | oasst1__toxicity | Classification | | 61 | oasst1_dense_flat/helpfulness | tasksource/oasst1_dense_flat | | helpfulness | oasst1__helpfulness | Classification | | 62 | language-identification | papluca/language-identification | | | language_identification | Classification | | 63 | wili_2018 | wili_2018 | | | wili_2018_langid | Classification | | 64 | exams/multilingual | exams | multilingual | | exams | MultipleChoice | | 65 | xcsr/X-CSQA-ar | xcsr | X-CSQA-ar | | xcsr | MultipleChoice | | 66 | xcsr/X-CODAH-zh | xcsr | X-CODAH-zh | | xcsr | MultipleChoice | | 67 | xcsr/X-CODAH-de | xcsr | X-CODAH-de | | xcsr | MultipleChoice | | 68 | xcsr/X-CSQA-ru | xcsr | X-CSQA-ru | | xcsr | MultipleChoice | | 69 | xcsr/X-CODAH-fr | xcsr | X-CODAH-fr | | xcsr | MultipleChoice | | 70 | xcsr/X-CODAH-it | xcsr | X-CODAH-it | | xcsr | MultipleChoice | | 71 | xcsr/X-CODAH-jap | xcsr | X-CODAH-jap | | xcsr | MultipleChoice | | 72 | xcsr/X-CODAH-nl | xcsr | X-CODAH-nl | | xcsr | MultipleChoice | | 73 | xcsr/X-CODAH-pt | xcsr | X-CODAH-pt | | xcsr | MultipleChoice | | 74 | xcsr/X-CODAH-en | xcsr | X-CODAH-en | | xcsr | MultipleChoice | | 75 | xcsr/X-CODAH-ru | xcsr | X-CODAH-ru | | xcsr | MultipleChoice | | 76 | xcsr/X-CODAH-ar | xcsr | X-CODAH-ar | | xcsr | MultipleChoice | | 77 | xcsr/X-CODAH-vi | xcsr | X-CODAH-vi | | xcsr | MultipleChoice | | 78 | xcsr/X-CODAH-hi | xcsr | X-CODAH-hi | | xcsr | MultipleChoice | | 79 | xcsr/X-CODAH-sw | xcsr | X-CODAH-sw | | xcsr | MultipleChoice | | 80 | xcsr/X-CODAH-ur | xcsr | X-CODAH-ur | | xcsr | MultipleChoice | | 81 | xcsr/X-CODAH-pl | xcsr | X-CODAH-pl | | xcsr | MultipleChoice | | 82 | xcsr/X-CSQA-ur | xcsr | X-CSQA-ur | | xcsr | MultipleChoice | | 83 | xcsr/X-CODAH-es | xcsr | X-CODAH-es | | xcsr | MultipleChoice | | 84 | xcsr/X-CSQA-pt | xcsr | X-CSQA-pt | | xcsr | MultipleChoice | | 85 | xcsr/X-CSQA-vi | xcsr | X-CSQA-vi | | xcsr | MultipleChoice | | 86 | xcsr/X-CSQA-hi | xcsr | X-CSQA-hi | | xcsr | MultipleChoice | | 87 | xcsr/X-CSQA-pl | xcsr | X-CSQA-pl | | xcsr | MultipleChoice | | 88 | xcsr/X-CSQA-sw | xcsr | X-CSQA-sw | | xcsr | MultipleChoice | | 89 | xcsr/X-CSQA-nl | xcsr | X-CSQA-nl | | xcsr | MultipleChoice | | 90 | xcsr/X-CSQA-jap | xcsr | X-CSQA-jap | | xcsr | MultipleChoice | | 91 | xcsr/X-CSQA-it | xcsr | X-CSQA-it | | xcsr | MultipleChoice | | 92 | xcsr/X-CSQA-es | xcsr | X-CSQA-es | | xcsr | MultipleChoice | | 93 | xcsr/X-CSQA-fr | xcsr | X-CSQA-fr | | xcsr | MultipleChoice | | 94 | xcsr/X-CSQA-zh | xcsr | X-CSQA-zh | | xcsr | MultipleChoice | | 95 | xcsr/X-CSQA-en | xcsr | X-CSQA-en | | xcsr | MultipleChoice | | 96 | xcsr/X-CSQA-de | xcsr | X-CSQA-de | | xcsr | MultipleChoice | | 97 | xcopa/qu | xcopa | qu | | xcopa | MultipleChoice | | 98 | xcopa/it | xcopa | it | | xcopa | MultipleChoice | | 99 | xcopa/ht | xcopa | ht | | xcopa | MultipleChoice | | 100 | xcopa/et | xcopa | et | | xcopa | MultipleChoice | | 101 | xcopa/vi | xcopa | vi | | xcopa | MultipleChoice | | 102 | xcopa/id | xcopa | id | | xcopa | MultipleChoice | | 103 | xcopa/translation-et | xcopa | translation-et | | xcopa | MultipleChoice | | 104 | xcopa/th | xcopa | th | | xcopa | MultipleChoice | | 105 | xcopa/sw | xcopa | sw | | xcopa | MultipleChoice | | 106 | xcopa/translation-sw | xcopa | translation-sw | | xcopa | MultipleChoice | | 107 | xcopa/translation-ht | xcopa | translation-ht | | xcopa | MultipleChoice | | 108 | xcopa/translation-it | xcopa | translation-it | | xcopa | MultipleChoice | | 109 | xcopa/ta | xcopa | ta | | xcopa | MultipleChoice | | 110 | xcopa/translation-zh | xcopa | translation-zh | | xcopa | MultipleChoice | | 111 | xcopa/translation-vi | xcopa | translation-vi | | xcopa | MultipleChoice | | 112 | xcopa/translation-id | xcopa | translation-id | | xcopa | MultipleChoice | | 113 | xcopa/translation-tr | xcopa | translation-tr | | xcopa | MultipleChoice | | 114 | xcopa/translation-th | xcopa | translation-th | | xcopa | MultipleChoice | | 115 | xcopa/translation-ta | xcopa | translation-ta | | xcopa | MultipleChoice | | 116 | xcopa/zh | xcopa | zh | | xcopa | MultipleChoice | | 117 | xcopa/tr | xcopa | tr | | xcopa | MultipleChoice | | 118 | xstory_cloze/eu | juletxara/xstory_cloze | eu | | xstory | MultipleChoice | | 119 | xstory_cloze/my | juletxara/xstory_cloze | my | | xstory | MultipleChoice | | 120 | xstory_cloze/te | juletxara/xstory_cloze | te | | xstory | MultipleChoice | | 121 | xstory_cloze/sw | juletxara/xstory_cloze | sw | | xstory | MultipleChoice | | 122 | xstory_cloze/en | juletxara/xstory_cloze | en | | xstory | MultipleChoice | | 123 | xstory_cloze/ru | juletxara/xstory_cloze | ru | | xstory | MultipleChoice | | 124 | xstory_cloze/zh | juletxara/xstory_cloze | zh | | xstory | MultipleChoice | | 125 | xstory_cloze/es | juletxara/xstory_cloze | es | | xstory | MultipleChoice | | 126 | xstory_cloze/ar | juletxara/xstory_cloze | ar | | xstory | MultipleChoice | | 127 | xstory_cloze/hi | juletxara/xstory_cloze | hi | | xstory | MultipleChoice | | 128 | xstory_cloze/id | juletxara/xstory_cloze | id | | xstory | MultipleChoice | | 129 | xglue/ner | xglue | ner | | xglue_ner | TokenClassification | | 130 | xglue/pos | xglue | pos | | xglue_pos | TokenClassification | | 131 | universal_dependencies/nyq_aha/pos | universal_dependencies | nyq_aha | pos | udep__pos | TokenClassification | | 132 | universal_dependencies/sme_giella/pos | universal_dependencies | sme_giella | pos | udep__pos | TokenClassification | | 133 | universal_dependencies/no_bokmaal/pos | universal_dependencies | no_bokmaal | pos | udep__pos | TokenClassification | | 134 | universal_dependencies/no_nynorsk/pos | universal_dependencies | no_nynorsk | pos | udep__pos | TokenClassification | | 135 | universal_dependencies/no_nynorsklia/pos | universal_dependencies | no_nynorsklia | pos | udep__pos | TokenClassification | | 136 | universal_dependencies/cu_proiel/pos | universal_dependencies | cu_proiel | pos | udep__pos | TokenClassification | | 137 | universal_dependencies/fro_srcmf/pos | universal_dependencies | fro_srcmf | pos | udep__pos | TokenClassification | | 138 | universal_dependencies/orv_rnc/pos | universal_dependencies | orv_rnc | pos | udep__pos | TokenClassification | | 139 | universal_dependencies/pl_lfg/pos | universal_dependencies | pl_lfg | pos | udep__pos | TokenClassification | | 140 | universal_dependencies/otk_tonqq/pos | universal_dependencies | otk_tonqq | pos | udep__pos | TokenClassification | | 141 | universal_dependencies/fa_perdt/pos | universal_dependencies | fa_perdt | pos | udep__pos | TokenClassification | | 142 | universal_dependencies/fa_seraji/pos | universal_dependencies | fa_seraji | pos | udep__pos | TokenClassification | | 143 | universal_dependencies/pcm_nsc/pos | universal_dependencies | pcm_nsc | pos | udep__pos | TokenClassification | | 144 | universal_dependencies/pl_pdb/pos | universal_dependencies | pl_pdb | pos | udep__pos | TokenClassification | | 145 | universal_dependencies/pl_pud/pos | universal_dependencies | pl_pud | pos | udep__pos | TokenClassification | | 146 | universal_dependencies/pt_bosque/pos | universal_dependencies | pt_bosque | pos | udep__pos | TokenClassification | | 147 | universal_dependencies/pt_gsd/pos | universal_dependencies | pt_gsd | pos | udep__pos | TokenClassification | | 148 | universal_dependencies/pt_pud/pos | universal_dependencies | pt_pud | pos | udep__pos | TokenClassification | | 149 | universal_dependencies/orv_torot/pos | universal_dependencies | orv_torot | pos | udep__pos | TokenClassification | | 150 | universal_dependencies/myu_tudet/pos | universal_dependencies | myu_tudet | pos | udep__pos | TokenClassification | | 151 | universal_dependencies/gv_cadhan/pos | universal_dependencies | gv_cadhan | pos | udep__pos | TokenClassification | | 152 | universal_dependencies/gun_thomas/pos | universal_dependencies | gun_thomas | pos | udep__pos | TokenClassification | | 153 | universal_dependencies/koi_uh/pos | universal_dependencies | koi_uh | pos | udep__pos | TokenClassification | | 154 | universal_dependencies/kpv_ikdp/pos | universal_dependencies | kpv_ikdp | pos | udep__pos | TokenClassification | | 155 | universal_dependencies/kpv_lattice/pos | universal_dependencies | kpv_lattice | pos | udep__pos | TokenClassification | | 156 | universal_dependencies/ko_gsd/pos | universal_dependencies | ko_gsd | pos | udep__pos | TokenClassification | | 157 | universal_dependencies/ko_kaist/pos | universal_dependencies | ko_kaist | pos | udep__pos | TokenClassification | | 158 | universal_dependencies/ko_pud/pos | universal_dependencies | ko_pud | pos | udep__pos | TokenClassification | | 159 | universal_dependencies/kmr_mg/pos | universal_dependencies | kmr_mg | pos | udep__pos | TokenClassification | | 160 | universal_dependencies/la_ittb/pos | universal_dependencies | la_ittb | pos | udep__pos | TokenClassification | | 161 | universal_dependencies/la_llct/pos | universal_dependencies | la_llct | pos | udep__pos | TokenClassification | | 162 | universal_dependencies/la_perseus/pos | universal_dependencies | la_perseus | pos | udep__pos | TokenClassification | | 163 | universal_dependencies/la_proiel/pos | universal_dependencies | la_proiel | pos | udep__pos | TokenClassification | | 164 | universal_dependencies/lv_lvtb/pos | universal_dependencies | lv_lvtb | pos | udep__pos | TokenClassification | | 165 | universal_dependencies/lt_alksnis/pos | universal_dependencies | lt_alksnis | pos | udep__pos | TokenClassification | | 166 | universal_dependencies/lt_hse/pos | universal_dependencies | lt_hse | pos | udep__pos | TokenClassification | | 167 | universal_dependencies/olo_kkpp/pos | universal_dependencies | olo_kkpp | pos | udep__pos | TokenClassification | | 168 | universal_dependencies/mt_mudt/pos | universal_dependencies | mt_mudt | pos | udep__pos | TokenClassification | | 169 | universal_dependencies/ro_nonstandard/pos | universal_dependencies | ro_nonstandard | pos | udep__pos | TokenClassification | | 170 | universal_dependencies/mr_ufal/pos | universal_dependencies | mr_ufal | pos | udep__pos | TokenClassification | | 171 | universal_dependencies/gun_dooley/pos | universal_dependencies | gun_dooley | pos | udep__pos | TokenClassification | | 172 | universal_dependencies/mdf_jr/pos | universal_dependencies | mdf_jr | pos | udep__pos | TokenClassification | | 173 | universal_dependencies/ro_rrt/pos | universal_dependencies | ro_rrt | pos | udep__pos | TokenClassification | | 174 | universal_dependencies/ru_taiga/pos | universal_dependencies | ru_taiga | pos | udep__pos | TokenClassification | | 175 | universal_dependencies/ru_gsd/pos | universal_dependencies | ru_gsd | pos | udep__pos | TokenClassification | | 176 | universal_dependencies/ta_mwtt/pos | universal_dependencies | ta_mwtt | pos | udep__pos | TokenClassification | | 177 | universal_dependencies/ta_ttb/pos | universal_dependencies | ta_ttb | pos | udep__pos | TokenClassification | | 178 | universal_dependencies/te_mtg/pos | universal_dependencies | te_mtg | pos | udep__pos | TokenClassification | | 179 | universal_dependencies/th_pud/pos | universal_dependencies | th_pud | pos | udep__pos | TokenClassification | | 180 | universal_dependencies/tpn_tudet/pos | universal_dependencies | tpn_tudet | pos | udep__pos | TokenClassification | | 181 | universal_dependencies/qtd_sagt/pos | universal_dependencies | qtd_sagt | pos | udep__pos | TokenClassification | | 182 | universal_dependencies/tr_boun/pos | universal_dependencies | tr_boun | pos | udep__pos | TokenClassification | | 183 | universal_dependencies/tr_gb/pos | universal_dependencies | tr_gb | pos | udep__pos | TokenClassification | | 184 | universal_dependencies/tr_imst/pos | universal_dependencies | tr_imst | pos | udep__pos | TokenClassification | | 185 | universal_dependencies/tr_pud/pos | universal_dependencies | tr_pud | pos | udep__pos | TokenClassification | | 186 | universal_dependencies/uk_iu/pos | universal_dependencies | uk_iu | pos | udep__pos | TokenClassification | | 187 | universal_dependencies/hsb_ufal/pos | universal_dependencies | hsb_ufal | pos | udep__pos | TokenClassification | | 188 | universal_dependencies/ur_udtb/pos | universal_dependencies | ur_udtb | pos | udep__pos | TokenClassification | | 189 | universal_dependencies/ug_udt/pos | universal_dependencies | ug_udt | pos | udep__pos | TokenClassification | | 190 | universal_dependencies/vi_vtb/pos | universal_dependencies | vi_vtb | pos | udep__pos | TokenClassification | | 191 | universal_dependencies/wbp_ufal/pos | universal_dependencies | wbp_ufal | pos | udep__pos | TokenClassification | | 192 | universal_dependencies/cy_ccg/pos | universal_dependencies | cy_ccg | pos | udep__pos | TokenClassification | | 193 | universal_dependencies/wo_wtb/pos | universal_dependencies | wo_wtb | pos | udep__pos | TokenClassification | | 194 | universal_dependencies/yo_ytb/pos | universal_dependencies | yo_ytb | pos | udep__pos | TokenClassification | | 195 | universal_dependencies/tl_ugnayan/pos | universal_dependencies | tl_ugnayan | pos | udep__pos | TokenClassification | | 196 | universal_dependencies/ro_simonero/pos | universal_dependencies | ro_simonero | pos | udep__pos | TokenClassification | | 197 | universal_dependencies/tl_trg/pos | universal_dependencies | tl_trg | pos | udep__pos | TokenClassification | | 198 | universal_dependencies/sv_talbanken/pos | universal_dependencies | sv_talbanken | pos | udep__pos | TokenClassification | | 199 | universal_dependencies/ru_pud/pos | universal_dependencies | ru_pud | pos | udep__pos | TokenClassification | | 200 | universal_dependencies/ru_syntagrus/pos | universal_dependencies | ru_syntagrus | pos | udep__pos | TokenClassification | | 201 | universal_dependencies/kfm_aha/pos | universal_dependencies | kfm_aha | pos | udep__pos | TokenClassification | | 202 | universal_dependencies/sa_ufal/pos | universal_dependencies | sa_ufal | pos | udep__pos | TokenClassification | | 203 | universal_dependencies/sa_vedic/pos | universal_dependencies | sa_vedic | pos | udep__pos | TokenClassification | | 204 | universal_dependencies/gd_arcosg/pos | universal_dependencies | gd_arcosg | pos | udep__pos | TokenClassification | | 205 | universal_dependencies/sr_set/pos | universal_dependencies | sr_set | pos | udep__pos | TokenClassification | | 206 | universal_dependencies/sms_giellagas/pos | universal_dependencies | sms_giellagas | pos | udep__pos | TokenClassification | | 207 | universal_dependencies/sk_snk/pos | universal_dependencies | sk_snk | pos | udep__pos | TokenClassification | | 208 | universal_dependencies/sl_ssj/pos | universal_dependencies | sl_ssj | pos | udep__pos | TokenClassification | | 209 | universal_dependencies/sl_sst/pos | universal_dependencies | sl_sst | pos | udep__pos | TokenClassification | | 210 | universal_dependencies/soj_aha/pos | universal_dependencies | soj_aha | pos | udep__pos | TokenClassification | | 211 | universal_dependencies/ajp_madar/pos | universal_dependencies | ajp_madar | pos | udep__pos | TokenClassification | | 212 | universal_dependencies/es_ancora/pos | universal_dependencies | es_ancora | pos | udep__pos | TokenClassification | | 213 | universal_dependencies/es_gsd/pos | universal_dependencies | es_gsd | pos | udep__pos | TokenClassification | | 214 | universal_dependencies/es_pud/pos | universal_dependencies | es_pud | pos | udep__pos | TokenClassification | | 215 | universal_dependencies/swl_sslc/pos | universal_dependencies | swl_sslc | pos | udep__pos | TokenClassification | | 216 | universal_dependencies/sv_lines/pos | universal_dependencies | sv_lines | pos | udep__pos | TokenClassification | | 217 | universal_dependencies/sv_pud/pos | universal_dependencies | sv_pud | pos | udep__pos | TokenClassification | | 218 | universal_dependencies/gsw_uzh/pos | universal_dependencies | gsw_uzh | pos | udep__pos | TokenClassification | | 219 | universal_dependencies/kk_ktb/pos | universal_dependencies | kk_ktb | pos | udep__pos | TokenClassification | | 220 | universal_dependencies/hi_hdtb/pos | universal_dependencies | hi_hdtb | pos | udep__pos | TokenClassification | | 221 | universal_dependencies/ja_pud/pos | universal_dependencies | ja_pud | pos | udep__pos | TokenClassification | | 222 | universal_dependencies/zh_gsd/pos | universal_dependencies | zh_gsd | pos | udep__pos | TokenClassification | | 223 | universal_dependencies/zh_gsdsimp/pos | universal_dependencies | zh_gsdsimp | pos | udep__pos | TokenClassification | | 224 | universal_dependencies/zh_hk/pos | universal_dependencies | zh_hk | pos | udep__pos | TokenClassification | | 225 | universal_dependencies/zh_pud/pos | universal_dependencies | zh_pud | pos | udep__pos | TokenClassification | | 226 | universal_dependencies/ckt_hse/pos | universal_dependencies | ckt_hse | pos | udep__pos | TokenClassification | | 227 | universal_dependencies/lzh_kyoto/pos | universal_dependencies | lzh_kyoto | pos | udep__pos | TokenClassification | | 228 | universal_dependencies/cop_scriptorium/pos | universal_dependencies | cop_scriptorium | pos | udep__pos | TokenClassification | | 229 | universal_dependencies/hr_set/pos | universal_dependencies | hr_set | pos | udep__pos | TokenClassification | | 230 | universal_dependencies/cs_cac/pos | universal_dependencies | cs_cac | pos | udep__pos | TokenClassification | | 231 | universal_dependencies/cs_cltt/pos | universal_dependencies | cs_cltt | pos | udep__pos | TokenClassification | | 232 | universal_dependencies/cs_fictree/pos | universal_dependencies | cs_fictree | pos | udep__pos | TokenClassification | | 233 | universal_dependencies/cs_pdt/pos | universal_dependencies | cs_pdt | pos | udep__pos | TokenClassification | | 234 | universal_dependencies/cs_pud/pos | universal_dependencies | cs_pud | pos | udep__pos | TokenClassification | | 235 | universal_dependencies/da_ddt/pos | universal_dependencies | da_ddt | pos | udep__pos | TokenClassification | | 236 | universal_dependencies/nl_alpino/pos | universal_dependencies | nl_alpino | pos | udep__pos | TokenClassification | | 237 | universal_dependencies/nl_lassysmall/pos | universal_dependencies | nl_lassysmall | pos | udep__pos | TokenClassification | | 238 | universal_dependencies/en_esl/pos | universal_dependencies | en_esl | pos | udep__pos | TokenClassification | | 239 | universal_dependencies/en_ewt/pos | universal_dependencies | en_ewt | pos | udep__pos | TokenClassification | | 240 | universal_dependencies/en_gum/pos | universal_dependencies | en_gum | pos | udep__pos | TokenClassification | | 241 | universal_dependencies/zh_cfl/pos | universal_dependencies | zh_cfl | pos | udep__pos | TokenClassification | | 242 | universal_dependencies/ca_ancora/pos | universal_dependencies | ca_ancora | pos | udep__pos | TokenClassification | | 243 | universal_dependencies/yue_hk/pos | universal_dependencies | yue_hk | pos | udep__pos | TokenClassification | | 244 | universal_dependencies/bxr_bdt/pos | universal_dependencies | bxr_bdt | pos | udep__pos | TokenClassification | | 245 | universal_dependencies/af_afribooms/pos | universal_dependencies | af_afribooms | pos | udep__pos | TokenClassification | | 246 | universal_dependencies/krl_kkpp/pos | universal_dependencies | krl_kkpp | pos | udep__pos | TokenClassification | | 247 | universal_dependencies/akk_riao/pos | universal_dependencies | akk_riao | pos | udep__pos | TokenClassification | | 248 | universal_dependencies/aqz_tudet/pos | universal_dependencies | aqz_tudet | pos | udep__pos | TokenClassification | | 249 | universal_dependencies/sq_tsa/pos | universal_dependencies | sq_tsa | pos | udep__pos | TokenClassification | | 250 | universal_dependencies/am_att/pos | universal_dependencies | am_att | pos | udep__pos | TokenClassification | | 251 | universal_dependencies/grc_perseus/pos | universal_dependencies | grc_perseus | pos | udep__pos | TokenClassification | | 252 | universal_dependencies/grc_proiel/pos | universal_dependencies | grc_proiel | pos | udep__pos | TokenClassification | | 253 | universal_dependencies/apu_ufpa/pos | universal_dependencies | apu_ufpa | pos | udep__pos | TokenClassification | | 254 | universal_dependencies/en_gumreddit/pos | universal_dependencies | en_gumreddit | pos | udep__pos | TokenClassification | | 255 | universal_dependencies/ar_nyuad/pos | universal_dependencies | ar_nyuad | pos | udep__pos | TokenClassification | | 256 | universal_dependencies/ar_pud/pos | universal_dependencies | ar_pud | pos | udep__pos | TokenClassification | | 257 | universal_dependencies/hy_armtdp/pos | universal_dependencies | hy_armtdp | pos | udep__pos | TokenClassification | | 258 | universal_dependencies/aii_as/pos | universal_dependencies | aii_as | pos | udep__pos | TokenClassification | | 259 | universal_dependencies/bm_crb/pos | universal_dependencies | bm_crb | pos | udep__pos | TokenClassification | | 260 | universal_dependencies/eu_bdt/pos | universal_dependencies | eu_bdt | pos | udep__pos | TokenClassification | | 261 | universal_dependencies/be_hse/pos | universal_dependencies | be_hse | pos | udep__pos | TokenClassification | | 262 | universal_dependencies/bho_bhtb/pos | universal_dependencies | bho_bhtb | pos | udep__pos | TokenClassification | | 263 | universal_dependencies/br_keb/pos | universal_dependencies | br_keb | pos | udep__pos | TokenClassification | | 264 | universal_dependencies/bg_btb/pos | universal_dependencies | bg_btb | pos | udep__pos | TokenClassification | | 265 | universal_dependencies/ar_padt/pos | universal_dependencies | ar_padt | pos | udep__pos | TokenClassification | | 266 | universal_dependencies/en_lines/pos | universal_dependencies | en_lines | pos | udep__pos | TokenClassification | | 267 | universal_dependencies/akk_pisandub/pos | universal_dependencies | akk_pisandub | pos | udep__pos | TokenClassification | | 268 | universal_dependencies/en_pronouns/pos | universal_dependencies | en_pronouns | pos | udep__pos | TokenClassification | | 269 | universal_dependencies/el_gdt/pos | universal_dependencies | el_gdt | pos | udep__pos | TokenClassification | | 270 | universal_dependencies/he_htb/pos | universal_dependencies | he_htb | pos | udep__pos | TokenClassification | | 271 | universal_dependencies/qhe_hiencs/pos | universal_dependencies | qhe_hiencs | pos | udep__pos | TokenClassification | | 272 | universal_dependencies/hi_pud/pos | universal_dependencies | hi_pud | pos | udep__pos | TokenClassification | | 273 | universal_dependencies/hu_szeged/pos | universal_dependencies | hu_szeged | pos | udep__pos | TokenClassification | | 274 | universal_dependencies/is_icepahc/pos | universal_dependencies | is_icepahc | pos | udep__pos | TokenClassification | | 275 | universal_dependencies/id_csui/pos | universal_dependencies | id_csui | pos | udep__pos | TokenClassification | | 276 | universal_dependencies/id_gsd/pos | universal_dependencies | id_gsd | pos | udep__pos | TokenClassification | | 277 | universal_dependencies/id_pud/pos | universal_dependencies | id_pud | pos | udep__pos | TokenClassification | | 278 | universal_dependencies/ga_idt/pos | universal_dependencies | ga_idt | pos | udep__pos | TokenClassification | | 279 | universal_dependencies/it_isdt/pos | universal_dependencies | it_isdt | pos | udep__pos | TokenClassification | | 280 | universal_dependencies/it_partut/pos | universal_dependencies | it_partut | pos | udep__pos | TokenClassification | | 281 | universal_dependencies/it_postwita/pos | universal_dependencies | it_postwita | pos | udep__pos | TokenClassification | | 282 | universal_dependencies/it_pud/pos | universal_dependencies | it_pud | pos | udep__pos | TokenClassification | | 283 | universal_dependencies/it_twittiro/pos | universal_dependencies | it_twittiro | pos | udep__pos | TokenClassification | | 284 | universal_dependencies/it_vit/pos | universal_dependencies | it_vit | pos | udep__pos | TokenClassification | | 285 | universal_dependencies/ja_bccwj/pos | universal_dependencies | ja_bccwj | pos | udep__pos | TokenClassification | | 286 | universal_dependencies/ja_gsd/pos | universal_dependencies | ja_gsd | pos | udep__pos | TokenClassification | | 287 | universal_dependencies/ja_modern/pos | universal_dependencies | ja_modern | pos | udep__pos | TokenClassification | | 288 | universal_dependencies/got_proiel/pos | universal_dependencies | got_proiel | pos | udep__pos | TokenClassification | | 289 | universal_dependencies/de_pud/pos | universal_dependencies | de_pud | pos | udep__pos | TokenClassification | | 290 | universal_dependencies/is_pud/pos | universal_dependencies | is_pud | pos | udep__pos | TokenClassification | | 291 | universal_dependencies/de_hdt/pos | universal_dependencies | de_hdt | pos | udep__pos | TokenClassification | | 292 | universal_dependencies/en_pud/pos | universal_dependencies | en_pud | pos | udep__pos | TokenClassification | | 293 | universal_dependencies/myv_jr/pos | universal_dependencies | myv_jr | pos | udep__pos | TokenClassification | | 294 | universal_dependencies/de_lit/pos | universal_dependencies | de_lit | pos | udep__pos | TokenClassification | | 295 | universal_dependencies/et_ewt/pos | universal_dependencies | et_ewt | pos | udep__pos | TokenClassification | | 296 | universal_dependencies/fo_farpahc/pos | universal_dependencies | fo_farpahc | pos | udep__pos | TokenClassification | | 297 | universal_dependencies/fo_oft/pos | universal_dependencies | fo_oft | pos | udep__pos | TokenClassification | | 298 | universal_dependencies/fi_ftb/pos | universal_dependencies | fi_ftb | pos | udep__pos | TokenClassification | | 299 | universal_dependencies/fi_ood/pos | universal_dependencies | fi_ood | pos | udep__pos | TokenClassification | | 300 | universal_dependencies/fi_pud/pos | universal_dependencies | fi_pud | pos | udep__pos | TokenClassification | | 301 | universal_dependencies/fi_tdt/pos | universal_dependencies | fi_tdt | pos | udep__pos | TokenClassification | | 302 | universal_dependencies/et_edt/pos | universal_dependencies | et_edt | pos | udep__pos | TokenClassification | | 303 | universal_dependencies/fr_ftb/pos | universal_dependencies | fr_ftb | pos | udep__pos | TokenClassification | | 304 | universal_dependencies/fr_fqb/pos | universal_dependencies | fr_fqb | pos | udep__pos | TokenClassification | | 305 | universal_dependencies/de_gsd/pos | universal_dependencies | de_gsd | pos | udep__pos | TokenClassification | | 306 | universal_dependencies/gl_treegal/pos | universal_dependencies | gl_treegal | pos | udep__pos | TokenClassification | | 307 | universal_dependencies/gl_ctg/pos | universal_dependencies | gl_ctg | pos | udep__pos | TokenClassification | | 308 | universal_dependencies/fr_spoken/pos | universal_dependencies | fr_spoken | pos | udep__pos | TokenClassification | | 309 | universal_dependencies/en_partut/pos | universal_dependencies | en_partut | pos | udep__pos | TokenClassification | | 310 | universal_dependencies/fr_pud/pos | universal_dependencies | fr_pud | pos | udep__pos | TokenClassification | | 311 | universal_dependencies/fr_partut/pos | universal_dependencies | fr_partut | pos | udep__pos | TokenClassification | | 312 | universal_dependencies/fr_sequoia/pos | universal_dependencies | fr_sequoia | pos | udep__pos | TokenClassification | | 313 | universal_dependencies/fr_gsd/pos | universal_dependencies | fr_gsd | pos | udep__pos | TokenClassification | | 314 | oasst1_pairwise_rlhf_reward | tasksource/oasst1_pairwise_rlhf_reward | | | oasst_rlhf | MultipleChoice | | 315 | multilingual-sentiments/all | tyqiangz/multilingual-sentiments | all | | sentiment | Classification | | 316 | tweet_sentiment_multilingual/arabic | cardiffnlp/tweet_sentiment_multilingual | arabic | | tweet_sentiment | Classification | | 317 | tweet_sentiment_multilingual/french | cardiffnlp/tweet_sentiment_multilingual | french | | tweet_sentiment | Classification | | 318 | tweet_sentiment_multilingual/english | cardiffnlp/tweet_sentiment_multilingual | english | | tweet_sentiment | Classification | | 319 | tweet_sentiment_multilingual/hindi | cardiffnlp/tweet_sentiment_multilingual | hindi | | tweet_sentiment | Classification | | 320 | tweet_sentiment_multilingual/portuguese | cardiffnlp/tweet_sentiment_multilingual | portuguese | | tweet_sentiment | Classification | | 321 | tweet_sentiment_multilingual/spanish | cardiffnlp/tweet_sentiment_multilingual | spanish | | tweet_sentiment | Classification | | 322 | tweet_sentiment_multilingual/all | cardiffnlp/tweet_sentiment_multilingual | all | | tweet_sentiment | Classification | | 323 | tweet_sentiment_multilingual/german | cardiffnlp/tweet_sentiment_multilingual | german | | tweet_sentiment | Classification | | 324 | tweet_sentiment_multilingual/italian | cardiffnlp/tweet_sentiment_multilingual | italian | | tweet_sentiment | Classification | | 325 | amazon_reviews_multi/all_languages | amazon_reviews_multi | all_languages | | review_sentiment | Classification | | 326 | universal-joy | metaeval/universal-joy | | | emotion | Classification | | 327 | mms | Brand24/mms | | | mms_sentiment | Classification | | 328 | mapa | joelito/mapa | | | mapa_fine | TokenClassification | | 329 | mapa | joelito/mapa | | | mapa_corase | TokenClassification | | 330 | ACES | nikitam/ACES | | | aces_ranking | MultipleChoice | | 331 | ACES | nikitam/ACES | | | aces_phenomena | Classification | | 332 | massive/my-MM | AmazonScience/massive | my-MM | | amazon_intent | Classification | | 333 | massive/ro-RO | AmazonScience/massive | ro-RO | | amazon_intent | Classification | | 334 | massive/pt-PT | AmazonScience/massive | pt-PT | | amazon_intent | Classification | | 335 | massive/pl-PL | AmazonScience/massive | pl-PL | | amazon_intent | Classification | | 336 | massive/nl-NL | AmazonScience/massive | nl-NL | | amazon_intent | Classification | | 337 | massive/nb-NO | AmazonScience/massive | nb-NO | | amazon_intent | Classification | | 338 | massive/es-ES | AmazonScience/massive | es-ES | | amazon_intent | Classification | | 339 | massive/ms-MY | AmazonScience/massive | ms-MY | | amazon_intent | Classification | | 340 | massive/mn-MN | AmazonScience/massive | mn-MN | | amazon_intent | Classification | | 341 | massive/ml-IN | AmazonScience/massive | ml-IN | | amazon_intent | Classification | | 342 | massive/lv-LV | AmazonScience/massive | lv-LV | | amazon_intent | Classification | | 343 | massive/ko-KR | AmazonScience/massive | ko-KR | | amazon_intent | Classification | | 344 | massive/ru-RU | AmazonScience/massive | ru-RU | | amazon_intent | Classification | | 345 | massive/kn-IN | AmazonScience/massive | kn-IN | | amazon_intent | Classification | | 346 | massive/ka-GE | AmazonScience/massive | ka-GE | | amazon_intent | Classification | | 347 | massive/jv-ID | AmazonScience/massive | jv-ID | | amazon_intent | Classification | | 348 | massive/ja-JP | AmazonScience/massive | ja-JP | | amazon_intent | Classification | | 349 | massive/it-IT | AmazonScience/massive | it-IT | | amazon_intent | Classification | | 350 | massive/is-IS | AmazonScience/massive | is-IS | | amazon_intent | Classification | | 351 | massive/id-ID | AmazonScience/massive | id-ID | | amazon_intent | Classification | | 352 | massive/hy-AM | AmazonScience/massive | hy-AM | | amazon_intent | Classification | | 353 | massive/hu-HU | AmazonScience/massive | hu-HU | | amazon_intent | Classification | | 354 | massive/hi-IN | AmazonScience/massive | hi-IN | | amazon_intent | Classification | | 355 | massive/he-IL | AmazonScience/massive | he-IL | | amazon_intent | Classification | | 356 | massive/fr-FR | AmazonScience/massive | fr-FR | | amazon_intent | Classification | | 357 | massive/km-KH | AmazonScience/massive | km-KH | | amazon_intent | Classification | | 358 | massive/fi-FI | AmazonScience/massive | fi-FI | | amazon_intent | Classification | | 359 | massive/sl-SL | AmazonScience/massive | sl-SL | | amazon_intent | Classification | | 360 | massive/sv-SE | AmazonScience/massive | sv-SE | | amazon_intent | Classification | | 361 | massive/af-ZA | AmazonScience/massive | af-ZA | | amazon_intent | Classification | | 362 | massive/am-ET | AmazonScience/massive | am-ET | | amazon_intent | Classification | | 363 | massive/ar-SA | AmazonScience/massive | ar-SA | | amazon_intent | Classification | | 364 | massive/az-AZ | AmazonScience/massive | az-AZ | | amazon_intent | Classification | | 365 | massive/bn-BD | AmazonScience/massive | bn-BD | | amazon_intent | Classification | | 366 | massive/ca-ES | AmazonScience/massive | ca-ES | | amazon_intent | Classification | | 367 | massive/cy-GB | AmazonScience/massive | cy-GB | | amazon_intent | Classification | | 368 | massive/da-DK | AmazonScience/massive | da-DK | | amazon_intent | Classification | | 369 | massive/de-DE | AmazonScience/massive | de-DE | | amazon_intent | Classification | | 370 | massive/el-GR | AmazonScience/massive | el-GR | | amazon_intent | Classification | | 371 | massive/sq-AL | AmazonScience/massive | sq-AL | | amazon_intent | Classification | | 372 | massive/en-US | AmazonScience/massive | en-US | | amazon_intent | Classification | | 373 | massive/all | AmazonScience/massive | all | | amazon_intent | Classification | | 374 | massive/zh-TW | AmazonScience/massive | zh-TW | | amazon_intent | Classification | | 375 | massive/zh-CN | AmazonScience/massive | zh-CN | | amazon_intent | Classification | | 376 | massive/vi-VN | AmazonScience/massive | vi-VN | | amazon_intent | Classification | | 377 | massive/ur-PK | AmazonScience/massive | ur-PK | | amazon_intent | Classification | | 378 | massive/tr-TR | AmazonScience/massive | tr-TR | | amazon_intent | Classification | | 379 | massive/tl-PH | AmazonScience/massive | tl-PH | | amazon_intent | Classification | | 380 | massive/th-TH | AmazonScience/massive | th-TH | | amazon_intent | Classification | | 381 | massive/te-IN | AmazonScience/massive | te-IN | | amazon_intent | Classification | | 382 | massive/ta-IN | AmazonScience/massive | ta-IN | | amazon_intent | Classification | | 383 | massive/sw-KE | AmazonScience/massive | sw-KE | | amazon_intent | Classification | | 384 | massive/all_1.1 | AmazonScience/massive | all_1.1 | | amazon_intent | Classification | | 385 | massive/fa-IR | AmazonScience/massive | fa-IR | | amazon_intent | Classification | | 386 | tydi-as2-balanced | tasksource/tydi-as2-balanced | | | tidy_as2 | Classification | | 387 | multiconer_v2/Hindi (HI) | MultiCoNER/multiconer_v2 | Hindi (HI) | | multiconer | TokenClassification | | 388 | multiconer_v2/Multilingual (MULTI) | MultiCoNER/multiconer_v2 | Multilingual (MULTI) | | multiconer | TokenClassification | | 389 | multiconer_v2/Ukrainian (UK) | MultiCoNER/multiconer_v2 | Ukrainian (UK) | | multiconer | TokenClassification | | 390 | multiconer_v2/Swedish (SV) | MultiCoNER/multiconer_v2 | Swedish (SV) | | multiconer | TokenClassification | | 391 | multiconer_v2/Spanish (ES) | MultiCoNER/multiconer_v2 | Spanish (ES) | | multiconer | TokenClassification | | 392 | multiconer_v2/Bangla (BN) | MultiCoNER/multiconer_v2 | Bangla (BN) | | multiconer | TokenClassification | | 393 | multiconer_v2/Chinese (ZH) | MultiCoNER/multiconer_v2 | Chinese (ZH) | | multiconer | TokenClassification | | 394 | multiconer_v2/English (EN) | MultiCoNER/multiconer_v2 | English (EN) | | multiconer | TokenClassification | | 395 | multiconer_v2/Farsi (FA) | MultiCoNER/multiconer_v2 | Farsi (FA) | | multiconer | TokenClassification | | 396 | multiconer_v2/Portuguese (PT) | MultiCoNER/multiconer_v2 | Portuguese (PT) | | multiconer | TokenClassification | | 397 | multiconer_v2/German (DE) | MultiCoNER/multiconer_v2 | German (DE) | | multiconer | TokenClassification | | 398 | multiconer_v2/Italian (IT) | MultiCoNER/multiconer_v2 | Italian (IT) | | multiconer | TokenClassification | | 399 | multiconer_v2/French (FR) | MultiCoNER/multiconer_v2 | French (FR) | | multiconer | TokenClassification | | 400 | mtop | tasksource/mtop | | | mtop | Classification | | 401 | multilingual-zero-shot-label-nli | tasksource/multilingual-zero-shot-label-nli | | | mlabel_nli | Classification | ================================================ FILE: pyproject.toml ================================================ [build-system] requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] ================================================ FILE: setup.cfg ================================================ [metadata] name = tasksource description = Preprocessings to prepare datasets for a task long_description = file: README.md long_description_content_type = text/markdown url = https://github.com/sileod/tasksource/ classifiers = Programming Language :: Python :: 3 License :: OSI Approved :: BSD License Intended Audience :: Developers [options] package_dir = = src packages = find: python_requires = >=3.6 install_requires = dotwiz funcy datasets exrex magicattr pandas numpy scipy sorcery [options.packages.find] where = src ================================================ FILE: src/tasksource/.ipynb_checkpoints/access-checkpoint.py ================================================ from .preprocess import Preprocessing import re import pandas as pd from . import tasks, recast from .metadata import dataset_rank from datasets import load_dataset import funcy as fc import os import copy from sorcery import dict_of from functools import cache import random class lazy_mtasks: def __getattr__(self, name): from . import mtasks return getattr(mtasks, name) def __dir__(self): from . import mtasks return dir(mtasks) lmtasks=lazy_mtasks() def parse_var_name(s): config_name,task_name = None,None if '__' in s and '___' not in s: # dataset__task dataset_name, task_name = s.split('__') elif '__' not in s.replace('___','') and '___' in s: #dataset___config dataset_name, config_name = s.split('___') elif '___' in s and '__' in s.split('___')[1]: #dataset___config__task dataset_name, config_task=s.split('___') config_name,task_name = config_task.split('__') else: # dataset dataset_name = s return dataset_name,config_name,task_name def pretty_name(x): dn = x.dataset_name.split("/")[-1] cn = x.config_name if x.config_name else "" tn = x.task_name if x.task_name else "" return f"{dn}/{cn}/{tn}".replace('//','/').rstrip('/') @cache def list_tasks(tasks_path=f'{os.path.dirname(__file__)}/tasks.py',multilingual=False,instruct=False, excluded=[]): if multilingual: tasks_path=tasks_path.replace('/tasks.py','/mtasks.py') task_order = open(tasks_path).readlines() task_order = [x.split('=')[0].rstrip() for x in task_order if '=' in x] task_order = [x for x in task_order if x.isidentifier()] task_order = fc.flip(dict(enumerate(task_order))) l = [] _tasks = (lmtasks if multilingual else tasks) for key in dir(_tasks): if key not in task_order: continue value=getattr(_tasks, key) if isinstance(value,Preprocessing): dataset_name, config_name, task_name = parse_var_name(key) dataset_name = (value.dataset_name if value.dataset_name else dataset_name) config_name = (value.config_name if value.config_name else config_name) hasattr(value,key) l+=[{'dataset_name': dataset_name, 'config_name' : config_name, 'task_name': task_name, 'preprocessing_name': key, 'task_type': value.__class__.__name__,'mapping': value, 'rank':task_order.get(key,None)}] df=pd.DataFrame(l).explode('config_name') df = df.sort_values('rank').reset_index(drop=True) df['id'] = df.apply(lambda x: pretty_name(x), axis=1) df.insert(0, 'id', df.pop('id')) del df['rank'] if instruct: df=df[df.id.map(lambda x: not any(a in x for a in recast.improper_labels))] df=df[df.id.map(lambda x: not any(x in a for a in excluded))] return df #task_df =list_tasks() #mtask_df =list_tasks(multilingual=True) def dict_to_query(d=dict(), **kwargs): d={**d,**kwargs} return '&'.join([f'`{k}`=="{v}"' for k,v in d.items()]) def load_preprocessing(tasks=tasks, **kwargs): _tasks_df = list_tasks(multilingual=tasks==lmtasks) y = _tasks_df.copy().query(dict_to_query(**kwargs)).iloc[0] preprocessing= copy.copy(getattr(tasks, y.preprocessing_name)) for c in 'dataset_name','config_name': if not isinstance(getattr(preprocessing,c), str): setattr(preprocessing,c,getattr(y,c)) return preprocessing def load_task(id=None, dataset_name=None,config_name=None,task_name=None,preprocessing_name=None, max_rows=None, max_rows_eval=None, multilingual=False, instruct=False, seed=0, **load_dataset_kwargs): query = dict_of(id, dataset_name, config_name, task_name,preprocessing_name) query = {k:v for k,v in query.items() if v} _tasks = (lmtasks if multilingual else tasks) preprocessing = load_preprocessing(_tasks, **query) if "trust_remote_code" not in load_dataset_kwargs: load_dataset_kwargs["trust_remote_code"] = True dataset = load_dataset(preprocessing.dataset_name, preprocessing.config_name, **load_dataset_kwargs) dataset= preprocessing(dataset,max_rows, max_rows_eval) dataset.task_type = preprocessing.__class__.__name__ if instruct: dataset=recast.recast_instruct(dataset) return dataset ================================================ FILE: src/tasksource/.ipynb_checkpoints/preprocess-checkpoint.py ================================================ from collections.abc import Iterable from dotwiz import DotWiz from dataclasses import dataclass from typing import Union import itertools import funcy as fc import exrex import magicattr import numpy as np import copy import datasets import time MAX_MC_OPTIONS = 4 def get_column_names(dataset): cn = dataset.column_names if type(cn)==dict: return set(fc.flatten(cn.values())) else: return set(cn) def sample_dataset(dataset,n=10000, n_eval=1000,seed=0): for k in dataset: n_k=(n if k=='train' else n_eval) if n_k and len(dataset[k])>n_k: dataset[k]=dataset[k].train_test_split(train_size=n_k,seed=seed)['train'] return dataset class Preprocessing(DotWiz): default_splits = ('train','validation','test') _instances = [] def __post_init__(self): Preprocessing._instances+=[self] @staticmethod def __map_to_target(x,fn=lambda x:None, target=None): x[target]=fn(x) return x def load(self): return self(datasets.load_dataset(self.dataset_name,self.config_name)) def __call__(self,dataset, max_rows=None, max_rows_eval=None,seed=0): dataset = self.pre_process(dataset) # manage splits for k,v in zip(self.default_splits, self.splits): if v and k!=v: dataset[k]=dataset[v] del dataset[v] if k in dataset and not v: # obfuscated label del dataset[k] dataset = fix_splits(dataset) for k in list(dataset.keys()): if k not in self.default_splits: del dataset[k] dataset = sample_dataset(dataset, max_rows, max_rows_eval,seed=seed) # field annotated with a string substitutions = {v:k for k,v in self.to_dict().items() if (k and k not in {'splits','dataset_name','config_name'} and type(v)==str and k!=v)} dataset=dataset.remove_columns([c for c in substitutions.values() if c in dataset['train'].features and c not in substitutions]) dataset=dataset.rename_columns(substitutions) # field annotated with a function for k in self.to_dict().keys(): v=getattr(self, k) if callable(v) and k not in {"post_process","pre_process","load"}: dataset=dataset.map(self.__map_to_target, fn_kwargs={'fn':v,'target':k}) dataset=dataset.remove_columns( get_column_names(dataset)-set(self.to_dict().keys())) dataset = fix_labels(dataset) dataset = fix_splits(dataset) # again: label mapping changed dataset = self.post_process(dataset) return dataset @dataclass class cat(Preprocessing): fields:Union[str,list]=None separator:str=' ' def __call__(self, example=None): y=[np.char.array(example[f]) + sep for f,sep in zip(self.fields[::-1],itertools.repeat(self.separator))] y=list(sum(*y)) if len(y)==1: y=y[0] return y def pretty(f): class pretty_f(DotWiz): def __init__(self,*args): self.__f_arg = f(*args) for a in args: setattr(self,'value',a) def __call__(self, *args,**kwargs): return self.__f_arg(*args,**kwargs) def __repr__(self): return f"{self.__f_arg.__qualname__ .split('.')[0]}({self.value})" return pretty_f class dotgetter: def __init__(self, path=''): self.path=path def __bool__(self): return bool(self.path) def __getattr__(self, k): return self.__class__(f'{self.path}.{k}'.lstrip('.')) def __getitem__(self, i): return self.__class__(f'{self.path}[{i}]') def __call__(self, example=None): return magicattr.get(DotWiz(example), self.path) def __hash__(self): return hash(self.path) @dataclass class ClassificationFields(Preprocessing): sentence1:str='sentence1' sentence2:str='sentence2' labels:str='labels' @dataclass class Seq2SeqLMFields(Preprocessing): prompt:str='prompt' output:str='output' @dataclass class TokenClassificationFields(Preprocessing): tokens:str='tokens' labels:str='labels' @dataclass class MultipleChoiceFields(Preprocessing): inputs:str='input' choices:Iterable=tuple() labels:str='labels' choices_list:str=None def __post_init__(self): for i, c in enumerate(self.choices): setattr(self,f'choice{i}',c) delattr(self,'choices') if not self.choices_list: delattr(self,'choices_list') def __call__(self,dataset, *args, **kwargs): dataset = super().__call__(dataset, *args, **kwargs) if self.choices_list: dataset = dataset.filter(lambda x: 10), dataset_name="openai/webgpt_comparisons") synthetic_instruct = MultipleChoice('prompt', choices=['chosen', 'rejected'], labels=constant(0), dataset_name="Dahoas/synthetic-instruct-gptj-pairwise") scruples = Classification("text",labels="binarized_label",dataset_name="metaeval/scruples") wouldyourather = MultipleChoice(constant('Most people would rather:'), choices=['option_a','option_b'], labels= lambda x: int(x['votes_a']0.1].UID) del dfh, dfm, df blimp_groups = { "syntax": [ "adjunct_island", "animate_subject_passive", "animate_subject_trans", "causative", "complex_NP_island", "coordinate_structure_constraint_complex_left_branch", "coordinate_structure_constraint_object_extraction", "drop_argument", "ellipsis_n_bar_1", "ellipsis_n_bar_2", "inchoative", "intransitive", "left_branch_island_echo_question", "left_branch_island_simple_question", "passive_1", "passive_2", "sentential_subject_island", "transitive", "wh_island", "wh_questions_object_gap", "wh_questions_subject_gap", "wh_questions_subject_gap_long_distance", "wh_vs_that_no_gap", "wh_vs_that_no_gap_long_distance", "wh_vs_that_with_gap", "wh_vs_that_with_gap_long_distance" ], "morphology": [ "anaphor_gender_agreement", "anaphor_number_agreement", "determiner_noun_agreement_1", "determiner_noun_agreement_2", "determiner_noun_agreement_irregular_1", "determiner_noun_agreement_irregular_2", "determiner_noun_agreement_with_adj_2", "determiner_noun_agreement_with_adj_irregular_1", "determiner_noun_agreement_with_adj_irregular_2", "determiner_noun_agreement_with_adjective_1", "distractor_agreement_relational_noun", "distractor_agreement_relative_clause", "irregular_past_participle_adjectives", "irregular_past_participle_verbs", "irregular_plural_subject_verb_agreement_1", "irregular_plural_subject_verb_agreement_2", "regular_plural_subject_verb_agreement_1", "regular_plural_subject_verb_agreement_2" ], "syntax_semantics": [ "existential_there_object_raising", "existential_there_subject_raising", "expletive_it_object_raising", "only_npi_scope", "principle_A_c_command", "principle_A_case_1", "principle_A_domain_1", "principle_A_domain_2", "principle_A_domain_3", "principle_A_reconstruction", "sentential_negation_npi_scope", "tough_vs_raising_1", "tough_vs_raising_2" ], "semantics": [ "existential_there_quantifiers_1", "existential_there_quantifiers_2", "matrix_question_npi_licensor_present", "npi_present_1", "npi_present_2", "only_npi_licensor_present", "sentential_negation_npi_licensor_present", "superlative_quantifiers_1", "superlative_quantifiers_2" ], "syntax/semantics": [ "principle_A_case_2" ] } ================================================ FILE: src/tasksource/metadata/original.txt ================================================ WANLI recast/recast_verbnet recast/recast_verbcorner recast/recast_ner recast/recast_sentiment recast/recast_puns recast/recast_factuality recast/recast_megaveridicality probability_words_nli/reasoning_1hop probability_words_nli/usnli probability_words_nli/reasoning_2hop nan-nli/joey234--nan-nli nli_fever breaking_nli conj_nli fracas dialogue_nli mpe dnc recast_white/fnplus recast_white/sprl recast_white/dpr robust_nli/IS_CS robust_nli/LI_LI robust_nli/ST_WO robust_nli/PI_SP robust_nli/PI_CD robust_nli/ST_SE robust_nli/ST_NE robust_nli/ST_LM robust_nli_is_sd robust_nli_li_ts gen_debiased_nli/snli_seq_z gen_debiased_nli/snli_z_aug gen_debiased_nli/snli_par_z gen_debiased_nli/mnli_par_z gen_debiased_nli/mnli_z_aug gen_debiased_nli/mnli_seq_z add_one_rte hlgd conll2003/pos_tags conll2003/chunk_tags conll2003/ner_tags hh-rlhf model-written-evals fig-qa social_i_qa balanced-copa e-CARE insincere-questions TuringBench vitaminc/tals--vitaminc rumoureval_2019/RumourEval2019 tweet_eval/irony tweet_eval/stance_abortion tweet_eval/hate tweet_eval/stance_atheism tweet_eval/stance_climate tweet_eval/emoji tweet_eval/offensive tweet_eval/sentiment tweet_eval/emotion tweet_eval/stance_feminist tweet_eval/stance_hillary discovery/discovery pragmeval/verifiability pragmeval/mrda pragmeval/switchboard pragmeval/emergent pragmeval/gum pragmeval/sarcasm pragmeval/stac pragmeval/pdtb silicone/dyda_e silicone/oasis silicone/meld_s silicone/meld_e silicone/maptask silicone/dyda_da silicone/sem silicone/iemocap lex_glue/scotus lex_glue/ledgar language-identification rotten_tomatoes hate_speech18 sms_spam snips_built_in_intents hate_speech_offensive hyperpartisan_news sciie citation_intent scicite lexical_relation_classification/ROOT09 lexical_relation_classification/CogALexV lexical_relation_classification/K&H+N lexical_relation_classification/BLESS lexical_relation_classification/EVALution crowdflower/political-media-bias crowdflower/tweet_global_warming crowdflower/text_emotion crowdflower/political-media-message crowdflower/political-media-audience crowdflower/economic-news crowdflower/corporate-messaging crowdflower/airline-sentiment crowdflower/sentiment_nuclear_power ethics/commonsense ethics/deontology ethics/justice ethics/virtue tweets_hate_speech_detection wnut_17/wnut_17 ncbi_disease/ncbi_disease acronym_identification jnlpba/jnlpba ontonotes_english/SpeedOfMagic--ontonotes_english blog_authorship_corpus/gender blog_authorship_corpus/horoscope blog_authorship_corpus/job open_question_type mc_taco discosense EffectiveFeedbackStudentWriting phrase_similarity scientific-exaggeration-detection fever-evidence-related/mwong--fever-related dynasent/dynabench.dynasent.r1.all/r1 dynasent/dynabench.dynasent.r2.all/r2 sem_eval_2010_task_8 medmcqa logiqa cycic_classification cycic_multiplechoice commonsense_qa_2.0 lingnli monotonicity-entailment arct scinli naturallogic onestop_qa moral_stories/full prost dynahate syntactic-augmentation-nli autotnli CONDAQA webgpt_comparisons synthetic-instruct-gptj-pairwise scruples wouldyourather attempto-nli defeasible-nli/snli defeasible-nli/atomic help-nli nli-veridicality-transitivity natural-language-satisfiability lonli dadc-limit-nli FLUTE summarize_from_feedback/comparisons folio tomi-nli avicenna SHP MedQA-USMLE-4-options-hf wikimedqa/medwiki cicero mutual NeQA quote-repetition redefine-math puzzte implicatures race-c spartqa-yn spartqa-mchoice temporal-nli riddle_sense clcd-english twentyquestions reclor counterfactually-augmented-imdb counterfactually-augmented-snli cnli boolq-natural-perturbations equate ScienceQA_text_only ekar_english implicit-hate-stg1 logiqa-2.0-nli PARARULE-Plus mindgames universal_dependencies/en_partut/deprel universal_dependencies/en_lines/deprel universal_dependencies/en_gum/deprel universal_dependencies/en_ewt/deprel ambient path-naturalness-prediction cloth dgen oasst1_pairwise_rlhf_reward I2D2 args_me Touche23-ValueEval starcon banking77 ruletaker lsat_qa/all ConTRoL-nli tracie sherliic sen-making/1 sen-making/2 mbib-base/cognitive-bias mbib-base/fake-news mbib-base/gender-bias mbib-base/hate-speech mbib-base/linguistic-bias mbib-base/political-bias mbib-base/racial-bias mbib-base/text-level-bias robustLR v1/gen_train234_test2to10 logical-fallacy parade cladder subjectivity MOH VUAC TroFi sharc_modified/mod conceptrules_v2 disrpt/eng.dep.scidtb conll2000 few-nerd/supervised com2sense scone winodict fool-me-twice monli corr2cause apt twitter-financial-news-sentiment SpaceNLI propsegment/nli HatemojiBuild regset esci dnd_style_intents ================================================ FILE: src/tasksource/metadata/popularity.py ================================================ dataset_rank = {'glue': 0, 'super_glue': 12, 'tweet_eval': 23, 'blimp': 34, 'imdb': 101, 'wikitext': 102, 'squad': 106, 'trec': 107, 'openwebtext': 108, 'rotten_tomatoes': 109, 'anli': 110, 'adversarial_qa': 111, 'ai2_arc': 115, 'xsum': 117, 'amazon_reviews_multi': 118, 'ag_news': 125, 'yelp_review_full': 126, 'wino_bias': 127, 'piqa': 131, 'duorc': 132, 'quail': 134, 'trivia_qa': 135, 'cnn_dailymail': 143, 'common_gen': 146, 'sst': 147, 'conll2003': 150, 'financial_phrasebank': 151, 'babi_qa': 155, 'poem_sentiment': 163, 'dream': 164, 'paws': 165, 'emotion': 168, 'kilt_tasks': 169, 'sciq': 180, 'cos_e': 181, 'dbpedia_14': 183, 'newsgroup': 184, 'cosmos_qa': 244, 'squad_v2': 245, 'samsum': 246, 'amazon_polarity': 247, 'multi_news': 248, 'wiki_hop': 249, 'quartz': 251, 'qasc': 252, 'wiki_qa': 253, 'openbookqa': 254, 'ropes': 256, 'quoref': 257, 'snli': 258, 'app_reviews': 259, 'gigaword': 260, 'wiki_bio': 261, 'amazon_us_reviews': 262, 'scan': 308, 'race': 320, 'swag': 323, 'codah': 325, 'ccdv/arxiv-summarization': 331, 'subjqa': 333, 'universal_morphologies': 339, 'hans': 447, 'sst2': 448, 'guardian_authorship': 449, 'math_qa': 465, 'librispeech_asr': 466, 'hendrycks_test': 469, 'openai_humaneval': 526, 'ptb_text_only': 527, 'pubmed_qa': 528, 'head_qa': 531, 'ought/raft': 533, 'ade_corpus_v2': 544, 'cbt': 547, 'bookcorpus': 552, 'squadshifts': 553, 'story_cloze': 557, 'multi_nli': 559, 'qanta': 560, 'hate_speech18': 564, 'gem': 565, 'lex_glue': 599, 'deepmind/code_contests': 606, 'imagenet-1k': 607, 'blended_skill_talk': 608, 'sms_spam': 609, 'asset': 610, 'fever': 612, 'commonsense_qa': 615, 'scientific_papers': 616, 'evidence_infer_treatment': 618, 'hotpot_qa': 620, 'superb': 622, 'sick': 628, 'humicroedit': 629, 'snips_built_in_intents': 631, 'winograd_wsc': 632, 'bigbench': 634, 'multi_woz_v22': 801, 'lambada': 803, 'banking77': 804, 'hate_speech_offensive': 805, 'yahoo_answers_topics': 806, 'ccdv/cnn_dailymail': 807, 'hyperpartisan_news_detection': 810, 'gsm8k': 812, 'wikisql': 814, 'the_pile': 815, 'health_fact': 825, 'mdd': 826, 'web_questions': 830, 'ethos': 831, 'wnut_17': 833, 'medical_questions_pairs': 834, 'scitldr': 835, 'drop': 838, 'squad_adversarial': 839, 'e2e_nlg_cleaned': 841, 'onestop_english': 842, 'pragmeval': 843, 'relbert/analogy_questions': 863, 'nq_open': 869, 'daily_dialog': 870, 'mc_taco': 871, 'crows_pairs': 872, 'go_emotions': 873, 'ncbi_disease': 875, 'boolq': 876, 'movie_rationales': 877, 'climate_fever': 878, 'discovery': 879, 'lama': 881, 'ecthr_cases': 885, 'jfleg': 887, 'selqa': 888, 'acronym_identification': 892, 'scicite': 893, 'tab_fact': 894, 'wiki_asp': 896, 'enriched_web_nlg': 916, 'svhn': 918, 'docred': 920, 'conllpp': 921, 'liar': 922, 'multi_x_science_sum': 923, 'discofuse': 924, 'competition_math': 926, 'biosses': 927, 'jnlpba': 928, 'web_nlg': 929, 'qa_srl': 937, 'neural_code_search': 938, 'conv_ai_2': 940, 'craigslist_bargains': 941, 'qed': 942, 'conv_ai_3': 943, 'conv_ai': 944, 'turk': 945, 'covid_qa_castorini': 946, 'sem_eval_2014_task_1': 947, 'mwsc': 948, 'gutenberg_time': 949, 'billsum': 950, 'riddle_sense': 951, 'species_800': 952, 'hlgd': 953, 'definite_pronoun_resolution': 954, 'tmu_gfm_dataset': 955, 'relbert/semeval2012_relational_similarity_v4': 956, 'clinc_oos': 957, 'imppres': 960, 'mrqa': 976, 'cc_news': 977, 'lmqg/qag_tweetqa': 978, 'aeslc': 979, 'big_patent': 980, 'eli5': 990, 'scene_parse_150': 991, 'circa': 993, 'aqua_rat': 994, 'nlu_evaluation_data': 996, 'newspop': 997, 'relbert/lexical_relation_classification': 998, 'yahoo_answers_qa': 1003, 'emo': 1004, 'silicone': 1005, 'cord19': 1015, 'tweet_qa': 1018, 'meta_woz': 1019, 'md_gender_bias': 1021, 'art': 1031, 'google_wellformed_query': 1032, 'ambig_qa': 1033, 'taskmaster2': 1035, 'quac': 1042, 'freebase_qa': 1043, 'quora': 1044, 'numer_sense': 1045, 'narrativeqa': 1046, 'ccdv/pubmed-summarization': 1047, 'qa_zre': 1049, 'limit': 1050, 'tweets_hate_speech_detection': 1051, 'mocha': 1052, 'hatexplain': 1053, 'bing_coronavirus_query_set': 1054, 'great_code': 1055, 'medal': 1056, 'sent_comp': 1057, 'kelm': 1058, 'natural_questions': 1059, 'wiki_split': 1061, 'zest': 1062, 'cfq': 1063, 'multi_re_qa': 1071, 'stereoset': 1080, 'coqa': 1082, 'cuad': 1083, 'break_data': 1084, 'mbpp': 1089, 'knkarthick/dialogsum': 1091, 'wiki_auto': 1092, 'pile-of-law/pile-of-law': 1097, 'pg19': 1132, 'DFKI-SLT/few-nerd': 1133, 'wikicorpus': 1136, 'e2e_nlg': 1142, 'anton-l/superb': 1143, 'ghomasHudson/muld': 1144, 'Exr0n/wiki-entity-similarity': 1150, 'BeIR/nfcorpus': 1156, 'ccdv/govreport-summarization': 1158, 'woz_dialogue': 1159, 'reddit': 1164, 'EMBO/sd-nlp': 1165, 'empathetic_dialogues': 1170, 'BeIR/fiqa': 1171, 'generics_kb': 1173, 'swda': 1177, 'wikitablequestions': 1178, 'pubmed': 1183, 'chr_en': 1184, 'sharc': 1185, 'sharc_modified': 1186, 'BeIR/scifact': 1190, 'nell': 1192, 'patriziobellan/PET': 1196, 'EMBO/biolang': 1198, 'dynabench/qa': 1202, 'reddit_tifu': 1206, 'BeIR/scidocs': 1208, 'pec': 1210, 'tner/tweetner7': 1213, 'BeIR/arguana': 1214, 'multidoc2dial': 1216, 'taskmaster1': 1219, 'spider': 1221, 'adv_glue': 1222, 'allenai/mslr2022': 1228, 'conceptnet5': 1230, 'tyqiangz/multilingual-sentiments': 1233, 'newsqa': 1246, 'metashift': 1249, 'so_stacksample': 1250, 'doc2dial': 1253, 'search_qa': 1256, 'yhavinga/mc4_nl_cleaned': 1258, 'hope_edi': 1270, 'proto_qa': 1273, 'tuple_ie': 1276, 'simple_questions_v2': 1279, 'nlpaueb/finer-139': 1282, 'bookcorpusopen': 1283, 'tner/ontonotes5': 1284, 'crd3': 1285, 'ucberkeley-dlab/measuring-hate-speech': 1286, 'gap': 1287, 'recipe_nlg': 1288, 'schema_guided_dstc8': 1289, 'BeIR/beir': 1291, 'sagnikrayc/mctest': 1294, 'eurlex': 1296, 'corypaik/coda': 1297, 'bc2gm_corpus': 1298, 'ascent_kb': 1299, 'curiosity_dialogs': 1301, 'covid_qa_deepset': 1302, 'air_dialogue': 1303, 'taskmaster3': 1305, 'xsum_factuality': 1306, 'medical_dialog': 1308, 'BeIR/trec-covid': 1312, 'lhoestq/test': 1314, 'newsroom': 1315, 'tne': 1316, 'covid_qa_ucsd': 1317, 'fhamborg/news_sentiment_newsmtsc': 1319, 'prachathai67k': 1321, 'cardiffnlp/tweet_topic_multi': 1322, 'datacommons_factcheck': 1323, 'deal_or_no_dialog': 1325, 'ubuntu_dialogs_corpus': 1327, 'eu_regulatory_ir': 1329, 'scifact': 1331, 'wi_locness': 1333, 'relbert/relation_mapping': 1335, 'coastalcph/fairlex': 1336, 'asnq': 1340, 'peer_read': 1341, 'metaeval/linguisticprobing': 1343, 'jigsaw_unintended_bias': 1353, 'totto': 1354, 'irc_disentangle': 1355, 'med_hop': 1357, 'numeric_fused_head': 1359, 'ollie': 1361, 'per_sent': 1363, 'SocialGrep/ten-million-reddit-answers': 1364, 'lmqg/qg_squad': 1366, 's2orc': 1367, 'Hellisotherpeople/DebateSum': 1368, 'SocialGrep/reddit-crypto-aug-2021': 1369, 'jigsaw_toxicity_pred': 1371, 'GroNLP/ik-nlp-22_slp': 1372, 'SocialGrep/reddit-nonewnormal-complete': 1374, 'SocialGrep/reddit-wallstreetbets-aug-2021': 1376, 'SocialGrep/the-reddit-covid-dataset': 1378, 'SocialGrep/top-american-universities-on-reddit': 1380, 'BeIR/beir-corpus': 1382, 'SocialGrep/one-year-of-r-india': 1384, 'BritishLibraryLabs/EThOS-PhD-metadata': 1386, 'librispeech_lm': 1388, 'few_rel': 1389, 'arxiv_dataset': 1390, 'lc_quad': 1391, 'diplomacy_detection': 1392, 'lmqg/qa_squadshifts_pseudo': 1393, 'grail_qa': 1461, 'tner/wnut2017': 1462, 'demo-org/auditor_review': 1463, 'allenai/real-toxicity-prompts': 1464, 'BeIR/nfcorpus-qrels': 1465, 'onestop_qa': 1466, 'demelin/moral_stories': 1467, 'atomic': 1493, 'crawl_domain': 1494, 'BeIR/quora': 1495, 'Abirate/english_quotes': 1497, 'narrativeqa_manual': 1498, 'BeIR/fiqa-qrels': 1499, 'social_bias_frames': 1500, 'pkavumba/balanced-copa': 1501, 'eraser_multi_rc': 1502, 'sled-umich/TRIP': 1503, 'opinosis': 1504, 'PiC/phrase_sense_disambiguation': 1505, 'enwik8': 1506, 'sem_eval_2020_task_11': 1508, 'gooaq': 1509, 'linnaeus': 1510, 'hover': 1511, 'GonzaloA/fake_news': 1512, 'consumer-finance-complaints': 1513, 'ohsumed': 1514, 'casino': 1515, 'gfissore/arxiv-abstracts-2021': 1516, 'conv_questions': 1517, 'hate_offensive': 1518, 'sofc_materials_articles': 1519, 'wanyu/IteraTeR_human_sent': 1520, 'dialog_re': 1521, 'fake_news_english': 1522, 'dart': 1523, 'blog_authorship_corpus': 1524, 'msr_zhen_translation_parity': 1525, 'cryptonite': 1526, 'disfl_qa': 1527, 'olm/olm-CC-MAIN-2022-21-sampling-ratio-0.14775510204': 1528, 'olm/olm-CC-MAIN-2022-33-sampling-ratio-0.20': 1529, 'coarse_discourse': 1530, 'eth_py150_open': 1531, 'event2Mind': 1532, 'Paul/hatecheck': 1533, 'eli5_category': 1534, 'hippocorpus': 1535, 'the_pile_books3': 1536, 'coached_conv_pref': 1537, 'has_part': 1538, 'times_of_india_news_headlines': 1539, 'medmcqa': 1540, 'Babelscape/rebel-dataset': 1541, 'glucose': 1542, 'msr_text_compression': 1543, 'msr_genomics_kbcomp': 1544, 'SpeedOfMagic/ontonotes_english': 1545, 'msr_sqa': 1546, 'wiki_movies': 1547, 'hybrid_qa': 1548, 'metooma': 1549, 'multi_nli_mismatch': 1550, 'text2log': 1551, 'the_pile_stack_exchange': 1552, 're_dial': 1553, 'inquisitive_qg': 1554, 'SocialGrep/one-million-reddit-jokes': 1555, 'time_dial': 1556, 'BeIR/scifact-qrels': 1557, 'sede': 1558, 'mutual_friends': 1559, 'pass': 1560, 'allenai/multi_lexsum': 1561, 'youtube_caption_corrections': 1562, 'NbAiLab/norec_agg': 1563, 'DanL/scientific-challenges-and-directions-dataset': 1564, 'SocialGrep/one-million-reddit-questions': 1565, 'Motahar/github-issues': 1566, 'SocialGrep/the-2022-trucker-strike-on-reddit': 1567, 'allenai/qasper': 1568, 'CyranoB/polarity': 1569, 'SocialGrep/one-million-reddit-confessions': 1570, 'debatelab/deepa2': 1571, 'bhavnicksm/sentihood': 1572, 'debatelab/aaac': 1573, 'jgammack/SAE-door-abstracts': 1574, 'erwanlc/cocktails_recipe': 1575, 'erwanlc/cocktails_recipe_no_brand': 1576, 'BeIR/arguana-qrels': 1577, 'tner/fin': 1578, 'BeIR/scidocs-qrels': 1579, 'tner/bc5cdr': 1580, 'olm/olm-CC-MAIN-2022-27-sampling-ratio-0.16142697881': 1581, 'BeIR/fever': 1582, 'cardiffnlp/tweet_topic_single': 1584, 'speechcolab/gigaspeech': 1585, 'BeIR/webis-touche2020': 1586, 'aquamuse': 1588, 'olm/olm-CC-MAIN-2022-40-sampling-ratio-0.15894621295': 1590, 'tner/btc': 1591, 'truthful_qa': 1592, 'McGill-NLP/FaithDial': 1594, 'ekinakyurek/ftrace': 1595, 'tomasg25/scientific_lay_summarisation': 1597, 'tner/mit_restaurant': 1599, 'bigscience-biomedical/bioasq_task_b': 1600, 'strombergnlp/broad_twitter_corpus': 1619, 'tner/bionlp2004': 1620, 'metaeval/recast': 1621, 'the_pile_openwebtext2': 1629, 'taln-ls2n/inspec': 1630, 'lmqg/qa_squadshifts': 1631, 'BeIR/hotpotqa': 1636, 'jpwahle/machine-paraphrase-dataset': 1638, 'tner/mit_movie_trivia': 1639, 'tner/conll2003': 1640, 'OxAISH-AL-LLM/wiki_toxic': 1641, 'ccdv/WCEP-10': 1642, 'BeIR/trec-covid-qrels': 1646, 'g8a9/europarl_en-it': 1647, 'carblacac/twitter-sentiment-analysis': 1648, 'usc-isi/WikiConvert': 1649, 'visual_genome': 1650, 'florianbussmann/FUNSD-vu2020revising': 1660, 'Felix-ML/quoteli3': 1661, 'allenai/scico': 1662, 'drAbreu/bc4chemd_ner': 1663, 'tner/tweebank_ner': 1664, 'alisawuffles/WANLI': 1665, 'Team-PIXEL/rendered-bookcorpus': 1666, 'Team-PIXEL/rendered-wikipedia-english': 1667, 'wanyu/IteraTeR_full_sent': 1668, 'EMBO/BLURB': 1669, 'metaeval/crowdflower': 1676, 'AlexaAI/bold': 1685, 'metaeval/ethics': 1686, 'sileod/movie_recommendation': 1691, 'lmqg/qg_subjqa': 1692, 'copenlu/scientific-exaggeration-detection': 1699, 'esb/datasets': 1700, 'BeIR/msmarco': 1701, 'biwi_kinect_head_pose': 1703, 'BeIR/quora-qrels': 1704, 'wardenga/lsoie': 1705, 'nlphuji/vasr': 1707, 'BeIR/nq': 1708, 'BeIR/dbpedia-entity': 1710, 'sadrasabouri/ShahNegar': 1712, 'knkarthick/xsum': 1713, 'ColumbiaNLP/FLUTE': 1714, 'bigscience-biomedical/scitail': 1715, 'lmqg/qg_squadshifts': 1717, 'BeIR/climate-fever': 1722, 'PiC/phrase_retrieval': 1724, 'bdotloh/empathetic-dialogues-contexts': 1726, 'ccdv/mediasum': 1727, 'BeIR/msmarco-qrels': 1735, 'alexfabbri/answersumm': 1736, 'pszemraj/text2image-multi-prompt': 1737, 'shibing624/source_code': 1738, 'kensho/spgispeech': 1741, 'jamescalam/channel-metadata': 1742, 'EMBO/sd-nlp-non-tokenized': 1743, 'facebook/pmd': 1748, 'drt/kqa_pro': 1749, 'BeIR/fever-qrels': 1751, 'TheFusion21/PokemonCards': 1752, 'zeroshot/twitter-financial-news-sentiment': 1753, 'bigscience-biomedical/blurb': 1754, 'mteb/bucc-bitext-mining': 1759, 'pinecone/core-2020-05-10-deduplication': 1763, 'tals/vitaminc': 1764, 'BeIR/hotpotqa-qrels': 1765, 'gigant/ted_descriptions': 1766, 'jpwahle/autoencoder-paraphrase-dataset': 1767, 'beki/privy': 1768, 'Muennighoff/P3': 1770, 'jpwahle/dblp-discovery-dataset': 1771, 'taln-ls2n/kp20k': 1773, 'bigscience-biomedical/biosses': 1774, 'allenai/prosocial-dialog': 1776, 'pacovaldez/stackoverflow-questions': 1777, 'kasnerz/hitab': 1778, 'relbert/semeval2012_relational_similarity': 1779, 'sagnikrayc/snli-cf-kaushik': 1780, 'mwritescode/slither-audited-smart-contracts': 1781, 'BeIR/webis-touche2020-qrels': 1787, 'bigscience-biomedical/mednli': 1788, 'pinecone/movielens-recent-ratings': 1790, 'BeIR/dbpedia-entity-qrels': 1791, 'shanya/crd3': 1792, 'knkarthick/samsum': 1793, 'BeIR/climate-fever-qrels': 1794, 'BeIR/nq-qrels': 1795, 'sanchit-gandhi/librispeech_asr_dummy': 1796, 'taln-ls2n/semeval-2010-pre': 1797, 'Bingsu/openwebtext_20p': 1798, 'PolyAI/banking77': 1799, 'JulesBelveze/tldr_news': 1800, 'Freed-Wu/kodak': 1801, 'biglam/gutenberg-poetry-corpus': 1802, 'SocialGrep/reddit-r-bitcoin-data-for-jun-2022': 1803, 'taln-ls2n/kptimes': 1805, 'biglam/old_bailey_proceedings': 1806, 'launch/gov_report': 1807, 'knkarthick/AMI': 1810, 'voidful/NMSQA': 1811, 'DTU54DL/dmeo': 1812, 'FinanceInc/auditor_sentiment': 1813, 'jamescalam/unsplash-25k-photos': 1814, 'Tidrael/tsl_news': 1815, 'DTU54DL/common3k-train': 1816, 'okite97/news-data': 1817, 'lmqg/qa_squad': 1818, 'ConvLab/woz': 1819, 'ConvLab/camrest': 1820, 'ConvLab/metalwoz': 1821, 'kakaobrain/coyo-700m': 1822, 'taln-ls2n/kpbiomed': 1823, 'abhinavk/openpi_v2': 1826, 'mwong/fever-claim-related': 1831, 'ConvLab/tm1': 1832, 'joey234/nan-nli': 1833, 'ConvLab/tm2': 1834, 'ConvLab/tm3': 1835, 'ConvLab/kvret': 1836, 'ConvLab/sgd': 1837, 'relbert/semeval2012_relational_similarity_v5': 1838, 'cmudrc/wave-energy': 1839, 'llangnickel/long-covid-classification-data': 1840, 'webis/args_me': 1841, 'HuggingFaceM4/something_something_v2': 1844, 'ConvLab/dailydialog': 1845, 'huanggab/reddit_haiku': 1846, 'relbert/semeval2012_relational_similarity_v6': 1847, 'pszemraj/riddlesense_plusplus': 1848, 'rungalileo/20_Newsgroups_Fixed': 1849, 'DTU54DL/common-voice-test16k': 1850, 'lhoestq/custom_squad': 1851, 'merve/poetry': 1852, 'yoshitomo-matsubara/srsd-feynman_easy': 1853, 'nightingal3/fig-qa': 1854, 'matejklemen/vuamc': 1855, 'strombergnlp/twitter_pos': 1856, 'nlphuji/winogavil': 1858, 'DFKI-SLT/tacred': 1859, 'valurank/News_Articles_Categorization': 1861, 'nbroad/mediasum': 1862, 'asapp/slue': 1863, 'zbnsl/emoteModified': 1865, 'adsabs/WIESP2022-NER': 1866, 'arize-ai/ecommerce_reviews_with_language_drift': 1867, 'UCL-DARK/ludwig': 1868, 'Aunsiels/InfantBooks': 1874, 'openclimatefix/uk_pv': 1875, 'copenlu/fever_gold_evidence': 1876, 'rungalileo/mit_movies_fixed_connll_format': 1877, 'jamescalam/youtube-transcriptions': 1878, 'lmqg/qa_harvesting_from_wikipedia': 1879, 'qanastek/Biosses-BLUE': 1880, 'zeronix1020/Strawberry-Disease': 1881, 'dferndz/cSQuAD2': 1882, 'taln-ls2n/pubmed': 1883, 'BeIR/scidocs-generated-queries': 1884, 'jmhessel/newyorker_caption_contest': 1885, 'inverse-scaling/NeQA': 1915, 'DTU54DL/common-voice': 1916, 'turingbench/TuringBench': 1917, 'demelin/understanding_fables': 1937, 'RUCAIBox/Open-Dialogue': 1938, 'allenai/multinews_sparse_max': 1939, 'RamAnanth1/lex-fridman-podcasts': 1940, 'sled-umich/Conversation-Entailment': 1941, 'stevhliu/demo': 1942, 'svakulenk0/qrecc': 1943, 'arize-ai/movie_reviews_with_context_drift': 1944, 'launch/ampere': 1945, 'AnonymousSub/recipe_RL_data_roberta-base': 1946, 'dreamproit/bill_summary_us': 1947, 'bgstud/libri-whisper-raw': 1948, 'jpwahle/etpc': 1949, 'DTU54DL/common-native-proc': 1950, 'mbartolo/synQA': 1951, 'wanyu/IteraTeR_full_doc': 1952, 'wanyu/IteraTeR_human_doc': 1953, 'orieg/elsevier-oa-cc-by': 1954, 'climatebert/environmental_claims': 1955, 'SocialGrep/the-reddit-climate-change-dataset': 1956, 'KGraph/FB15k-237': 1958, 'KheemDH/data': 1959, 'mwong/fever-evidence-related': 1960, 'HuggingFaceM4/TGIF': 1961, 'BeIR/fever-generated-queries': 1962, 'nateraw/ade20k-tiny': 1963, 'BeIR/cqadupstack-qrels': 1964, 'knkarthick/highlightsum': 1965, 'RUCAIBox/Data-to-text-Generation': 1966, 'GateNLP/broad_twitter_corpus': 1967, 'Tidrael/finance-headlines': 1968, 'lmqg/qag_squad': 1969, 'pacovaldez/stackoverflow-questions-2016': 1970, 'BeIR/fiqa-generated-queries': 1971, 'BeIR/signal1m-generated-queries': 1972, 'MicPie/unpredictable_msdn-microsoft-com': 1973, 'zeroshot/twitter-financial-news-topic': 1974, 'inverse-scaling/quote-repetition': 1975, 'esc-bench/esc-diagnostic-backup': 1976, 'lmqg/qg_annotation': 1977, 'sileod/wep-probes': 1978, 'DTU54DL/common-voice-test3k': 1981, 'jakartaresearch/causalqa': 1982, 'copenlu/sufficient_facts': 2002, 'ConvLab/multiwoz21': 2005, 'arka0821/multi_document_summarization': 2006, 'strombergnlp/rumoureval_2019': 2007, 'rongzhangibm/NaturalQuestionsV2': 2008, 'Muennighoff/mbpp': 2009, 'RUCAIBox/Simplification': 2011, 'shubhamg2208/lexicap': 2012, 'olm/olm-wikipedia-20220701': 2013, 'esc-bench/esc-diagnostic-dataset': 2014, 'jpwahle/autoregressive-paraphrase-dataset': 2015, 'GabrielVidal/dead-by-daylight-perks': 2016, 'DTU54DL/common-proc-whisper': 2017, 'valurank/PoliticalBias': 2018, 'McGill-NLP/TopiOCQA': 2019, 'gsarti/magpie': 2020, 'BeIR/cqadupstack-generated-queries': 2021, 'MicPie/unpredictable_mmo-champion-com': 2022, 'RUCAIBox/Question-Generation': 2023, 'allenai/multinews_sparse_mean': 2024, 'demo-org/diabetes': 2025, 'StonyBrookNLP/tellmewhy': 2026, 'bergr7/weakly_supervised_ag_news': 2027, 'din0s/msmarco-nlgen': 2028, 'frankier/cross_domain_reviews': 2029, 'gart-labor/pumpnli': 2030, 'AndyChiang/cloth': 2031, 'olm/olm-CC-MAIN-2017-22-sampling-ratio-0.16178770949': 2032, 'bgstud/libri': 2033, 'DTU54DL/commonvoice_accent_test': 2034, 'lewtun/my-awesome-dataset': 2035, 'peixian/rtGender': 2036, 'pmc/open_access': 2039, 'uva-irlab/trec-cast-2019-multi-turn': 2043, 'DFKI-SLT/scidtb': 2044, 'surrey-nlp/PLOD-filtered': 2045, 'wanyu/IteraTeR_v2': 2046, 'strombergnlp/ipm_nel': 2047, 'HuggingFaceM4/charades': 2048, 'ncats/EpiSet4NER-v2': 2050, 'HuggingFaceM4/ActivitiyNet_Captions': 2051, 'sileod/discourse_marker_qa': 2052, 'yoshitomo-matsubara/srsd-feynman_medium': 2053, 'BeIR/nfcorpus-generated-queries': 2054, 'BeIR/trec-news-generated-queries': 2055, 'BeIR/robust04-generated-queries': 2056, 'BeIR/quora-generated-queries': 2057, 'valurank/Adult-content-dataset': 2058, 'launch/open_question_type': 2059, 'knkarthick/topicsum': 2060, 'yuningm/citesum': 2061, 'elihoole/asrs-aviation-reports': 2062, 'DeveloperOats/DBPedia_Classes': 2063, 'hoskinson-center/proof-pile': 2064, 'RUCAIBox/Summarization': 2065, 'RUCAIBox/Question-Answering': 2066, 'RUCAIBox/Story-Generation': 2067, 'RUCAIBox/Paraphrase': 2068, 'jakartaresearch/semeval-absa': 2069, 'tner/ttc_dummy': 2071, 'copenlu/citeworth': 2072, 'allenai/multinews_sparse_oracle': 2073, 'allenai/multixscience_sparse_oracle': 2074, 'allenai/multixscience_sparse_mean': 2075, 'allenai/multixscience_sparse_max': 2076, 'allenai/ms2_sparse_oracle': 2077, 'mschi/blogspot_raw': 2078, 'gaurikapse/civis-consultation-summaries': 2079, 'chenghao/cuad_qa': 2080, 'esc-bench/esc-datasets': 2081, 'olm/olm-wikipedia-20221001': 2082, 'allenai/wcep_dense_oracle': 2083, 'dennlinger/wiki-paragraphs': 2084, 'AndyChiang/dgen': 2085, 'esb/diagnostic-dataset': 2086, 'havens2/naacl2022': 2087, 'fkdosilovic/docee-event-classification': 2088, 'DTU54DL/demo-common-whisper': 2089, 'dferndz/cSQuAD1': 2090, 'jpcorb20/multidogo': 2091, 'julien-c/reactiongif': 2092, 'lara-martin/Scifi_TV_Shows': 2093, 'lukesjordan/worldbank-project-documents': 2094, 'mnemlaghi/widdd': 2095, 'mvarma/medwiki': 2096, 'nateraw/beans': 2098, 'nateraw/cats_vs_dogs': 2099, 'nateraw/food101': 2100, 'nateraw/sync_food101': 2101, 'ncats/EpiSet4BinaryClassification': 2102, 'ncats/EpiSet4NER-v1': 2103, 'peixian/equity_evaluation_corpus': 2104, 'rajeshradhakrishnan/malayalam_wiki': 2105, 'softcatala/open-source-english-catalan-corpus': 2106, 'toloka/CrowdSpeech': 2107, 'valurank/12-factor': 2108, 'valurank/PoliticalBias_AllSides_Txt': 2109, 'valurank/PoliticalBias_Sources': 2110, 'valurank/hate-multi': 2111, 'valurank/news-12factor': 2112, 'valurank/offensive-multi': 2113, 'webimmunization/COVID-19-vaccine-attitude-tweets': 2114, 'wpicard/nostradamus-propheties': 2115, 'yuanchuan/annotated_reference_strings': 2116, 'ruanchaves/stan_large': 2117, 'ruanchaves/stan_small': 2118, 'ruanchaves/boun': 2119, 'ruanchaves/dev_stanford': 2120, 'ruanchaves/test_stanford': 2121, 'ruanchaves/snap': 2122, 'z-uo/qasper-squad': 2123, 'SocialGrep/the-antiwork-subreddit-dataset': 2124, 'CLUTRR/v1': 2126, 'malteos/test2': 2132, 'TomTBT/pmc_open_access_xml': 2133, 'SocialGrep/the-reddit-dataset-dataset': 2137, 'SocialGrep/the-reddit-place-dataset': 2139, 'projecte-aina/gencata': 2141, 'mwong/climate-evidence-related': 2142, 'mwong/climate-claim-related': 2143, 'surrey-nlp/PLOD-unfiltered': 2144, 'SocialGrep/the-reddit-irl-dataset': 2145, 'Lexi/spanextract': 2147, 'mwong/climatetext-claim-related-evaluation': 2148, 'mwong/climatetext-evidence-related-evaluation': 2149, 'ylacombe/xsum_factuality': 2150, 'mwong/climatetext-climate_evidence-claim-related-evaluation': 2151, 'mwong/climatetext-claim-climate_evidence-related-evaluation': 2152, 'mwong/climatetext-evidence-claim-pair-related-evaluation': 2153, 'mwong/climatetext-claim-evidence-pair-related-evaluation': 2154, 'patrickvonplaten/librispeech_asr_self_contained': 2155, 'BritishLibraryLabs/web_archive_classification': 2158, 'albertxu/CrosswordQA': 2159, 'SocialGrep/the-reddit-nft-dataset': 2160, 'janck/bigscience-lama': 2162, 'strombergnlp/twitter_pos_vcb': 2163, 'Filippo/osdg_cd': 2164, 'Ukhushn/home-depot': 2165, 'pile-of-law/eoir_privacy': 2166, 'drAbreu/sd-nlp-2': 2168, 'Leyo/TGIF': 2173, 'strombergnlp/named_timexes': 2174, 'domenicrosati/TruthfulQA': 2175, 'Roh/ryanspeech': 2176, 'Leyo/ActivityNet_Captions': 2177, 'IsaacBot/SQuAD-single-sentence-QA': 2178, 'morteza/cogtext': 2179, 'wdc/products-2017': 2180, 'rajeshvarma/QA_on_SLA': 2196, 'statworx/haiku': 2197, 'rajistics/million-headlines': 2198, 'feyzaakyurek/BBNLI': 2199, 'launch/gov_report_qs': 2200, 'DFKI-SLT/wikitext_linked': 2202, 'dianalogan/Marketing-Budget-and-Actual-Sales-Dataset': 2204, 'mehnaazasad/arxiv-co-ga': 2205, 'JeremyAlain/123_test': 2206, 'BeIR/arguana-generated-queries': 2209, 'BeIR/climate-fever-generated-queries': 2210, 'BeIR/dbpedia-entity-generated-queries': 2211, 'wise-east/spolin': 2212, 'yoshitomo-matsubara/srsd-feynman_hard': 2213, 'florentgbelidji/edmunds-car-ratings': 2214, 'olivierdehaene/xkcd': 2215, 'rajistics/auditor_review': 2216, 'BeIR/scifact-generated-queries': 2217, 'BeIR/trec-covid-generated-queries': 2218, 'BeIR/webis-touche2020-generated-queries': 2219, 'BeIR/nq-generated-queries': 2220, 'BeIR/hotpotqa-generated-queries': 2221, 'BeIR/bioasq-generated-queries': 2222, 'icelab/ntrs_meta': 2223, 'iejMac/CLIP-Kinetics700': 2224, 'fever/feverous': 2225, 'Livingwithmachines/hmd-erwt-training': 2226, 'wkrl/cord': 2227, 'launch/reddit_qg': 2228, 'arize-ai/xtreme_en': 2229} dataset_rank['Anthropic/model-written-evals']=13 dataset_rank['Anthropic/hh-rlhf']=14 ================================================ FILE: src/tasksource/mtasks.py ================================================ from .preprocess import cat, get,name, regen, constant, Classification, TokenClassification, MultipleChoice from .metadata import udep_labels from datasets import get_dataset_config_names, ClassLabel, Dataset, DatasetDict, concatenate_datasets, Sequence def all(dataset_name): try: config_name=get_dataset_config_names(dataset_name) except Exception as e: print(dataset_name,e) config_name=None return dict(dataset_name=dataset_name, config_name=config_name) def concatenate_configs(dataset): return DatasetDict(train=concatenate_datasets(list(dataset.values()))) # english tasks (few, to keep balance between languages) moritz_xnli = Classification("premise","hypothesis",name("label",["entailment", "neutral","contradiction"]), pre_process=concatenate_configs, dataset_name="MoritzLaurer/multilingual-NLI-26lang-2mil7") xnli = Classification("premise", "hypothesis", "label", **all("metaeval/xnli")) americas_nli = Classification("premise","hypothesis","label",config_name="all_languages") stsb_multi_mt = Classification("sentence1", "sentence2", lambda x: float(x["similarity_score"]/5), **all('stsb_multi_mt')) pawsx = Classification("sentence1","sentence2",name('label',['not_paraphrase','paraphrase']), **all('paws-x')) miam = Classification("Utterance",labels="Label", **all('miam')) xstance = Classification("question", "comment", "label", **all("strombergnlp/x-stance")) offenseval = Classification(lambda x: str(x["text"]), labels=name("subtask_a",['not offensive','offensive']), pre_process=lambda ds:ds.filter(lambda x: x['subtask_a'] in [0,1]), dataset_name='strombergnlp/offenseval_2020', config_name=["ar","da","gr","tr"]) offenseval_dravidian = Classification("text",labels="label",config_name=['kannada','malayalam','tamil']) mlma_hate = Classification("tweet", labels=lambda x:x["sentiment"].split('_'), dataset_name="nedjmaou/MLMA_hate_speech") qam = Classification("question","answer","label", dataset_name="xglue",config_name="qam") #x_sum_factuality = Classification("summary","generated_summary","label", dataset_name="ylacombe/xsum_factuality") x_fact = Classification('evidence','claim','label', dataset_name="metaeval/x-fact") xglue___nc = Classification('news_body',labels='news_category') xglue___qadsm = Classification('query','ad_description','relevance_label') xglue___qam = Classification('question','answer','label') xglue___wpr = Classification('query','web_page_snippet','relavance_label') # relavance_label : sic xlwic = Classification( sentence1=cat(["target_word","context_1"], " : "), sentence2=cat(["target_word","context_2"], " : "), labels='label',dataset_name="pasinit/xlwic",config_name=['xlwic_de_de','xlwic_it_it','xlwic_fr_fr','xlwic_en_ko']) #[ "spam", "fails_task", "lang_mismatch", "pii", "not_appropriate", "hate_speech", "sexual_content", "quality", "toxicity", "humor", "helpfulness", "creativity", "violence" ] oasst1__quality = Classification("parent_text","text",labels="quality", dataset_name="tasksource/oasst1_dense_flat", pre_process = lambda ds:ds.remove_columns('labels')) oasst1__toxicity = Classification("parent_text","text",labels="toxicity", dataset_name="tasksource/oasst1_dense_flat", pre_process = lambda ds:ds.remove_columns('labels')) oasst1__helpfulness = Classification("parent_text","text",labels="helpfulness", dataset_name="tasksource/oasst1_dense_flat", pre_process = lambda ds:ds.remove_columns('labels')) language_identification = Classification("text",labels="labels", dataset_name="papluca/language-identification") wili_2018_langid = Classification("sentence",labels="label",dataset_name="wili_2018") exams = MultipleChoice(get.question.stem, choices_list=get.question.choices.text, labels=lambda x:'ABCDE'.index(x['answerKey']), dataset_name="exams", config_name='multilingual', pre_process=lambda ds:ds.filter(lambda x: x['answerKey'] in "ABCDE")) xcsr = MultipleChoice(get.question.stem, choices_list=get.question.choices.text, labels=lambda x:'ABCDE'.index(x['answerKey']), **all('xcsr')) xcopa = MultipleChoice("premise",choices=['choice1','choice2'],labels="label", **all('xcopa')) #xstory = MultipleChoice(constant(''),choices=["text_right_ending","text_wrong_ending"],labels=constant(0), **all("juletxara/xstory_cloze")) xstory = MultipleChoice(lambda x: "\n".join([x[f'input_sentence_{i}'] for i in range(1,5)]), choices=["sentence_quiz1","sentence_quiz2"],labels=constant(0), **all("juletxara/xstory_cloze")) xglue_ner = TokenClassification("words","ner", dataset_name="xglue",config_name="ner") xglue_pos = TokenClassification("words","pos", dataset_name="xglue",config_name="pos") #disrpt_23 = Classification("unit1_sent", "unit2_sent", "label",**all("metaeval/disrpt")) udep__pos = TokenClassification('tokens','upos', **all('universal_dependencies')) def udep_post_process(ds): return ds.cast_column('labels', Sequence(ClassLabel(names=udep_labels))) #udep__deprel = TokenClassification('tokens',lambda x:[udep_labels.index(a) for a in x['deprel']], # **all('universal_dependencies'),post_process=udep_post_process) oasst_rlhf = MultipleChoice("prompt",choices=['chosen','rejected'],labels=constant(0), dataset_name="tasksource/oasst1_pairwise_rlhf_reward") sentiment = Classification("text",labels="label", dataset_name="tyqiangz/multilingual-sentiments",config_name="all", pre_process=lambda ds:ds.filter(lambda x: "amazon_reviews" not in x['source']) ) tweet_sentiment = Classification("text", labels="label", **all('cardiffnlp/tweet_sentiment_multilingual')) review_sentiment = Classification("review_body",labels="stars", dataset_name="amazon_reviews_multi",config_name="all_languages") emotion = Classification("text",labels="emotion",dataset_name="metaeval/universal-joy") # in mms mms_sentiment = Classification("text",labels="label",dataset_name='Brand24/mms') mapa_fine = TokenClassification("tokens","coarse_grained",dataset_name='joelito/mapa') mapa_corase = TokenClassification("tokens","fine_grained",dataset_name='joelito/mapa') aces_ranking = MultipleChoice("source",choices=['good-translation','incorrect-translation'],labels=constant(0), dataset_name='nikitam/ACES') aces_phenomena = Classification('source','incorrect-translation','phenomena', dataset_name='nikitam/ACES') amazon_intent = Classification("utt",labels="intent",**all('AmazonScience/massive')) # dataset_name='glue',config_name=['ocnli','afqmc']) tidy_as2=Classification("Question","Sentence","Label",dataset_name='tasksource/tydi-as2-balanced') multiconer = TokenClassification("tokens","ner_tags_index", **all("MultiCoNER/multiconer_v2")) mtop = Classification("question",labels="intent", dataset_name="tasksource/mtop") mlabel_nli = Classification("premise","hypothesis","labels",dataset_name="tasksource/multilingual-zero-shot-label-nli") #wino_x # clue, klue, indic_glue # SMS_Spam_Multilingual_Collection_Dataset ================================================ FILE: src/tasksource/preprocess.py ================================================ from collections.abc import Iterable from dotwiz import DotWiz from dataclasses import dataclass from typing import Union import itertools import funcy as fc import exrex import magicattr import numpy as np import copy import datasets import time MAX_MC_OPTIONS = 4 def get_column_names(dataset): cn = dataset.column_names if type(cn)==dict: return set(fc.flatten(cn.values())) else: return set(cn) def sample_dataset(dataset,n=10000, n_eval=1000,seed=0): for k in dataset: n_k=(n if k=='train' else n_eval) if n_k and len(dataset[k])>n_k: dataset[k]=dataset[k].train_test_split(train_size=n_k,seed=seed)['train'] return dataset class Preprocessing(DotWiz): default_splits = ('train','validation','test') _instances = [] def __post_init__(self): Preprocessing._instances+=[self] @staticmethod def __map_to_target(x,fn=lambda x:None, target=None): x[target]=fn(x) return x def load(self): return self(datasets.load_dataset(self.dataset_name,self.config_name)) def __call__(self,dataset, max_rows=None, max_rows_eval=None,seed=0): dataset = self.pre_process(dataset) # manage splits for k,v in zip(self.default_splits, self.splits): if v and k!=v: dataset[k]=dataset[v] del dataset[v] if k in dataset and not v: # obfuscated label del dataset[k] dataset = fix_splits(dataset) for k in list(dataset.keys()): if k not in self.default_splits: del dataset[k] dataset = sample_dataset(dataset, max_rows, max_rows_eval,seed=seed) # field annotated with a string substitutions = {v:k for k,v in self.to_dict().items() if (k and k not in {'splits','dataset_name','config_name'} and type(v)==str and k!=v)} dataset=dataset.remove_columns([c for c in substitutions.values() if c in dataset['train'].features and c not in substitutions]) dataset=dataset.rename_columns(substitutions) # field annotated with a function for k in self.to_dict().keys(): v=getattr(self, k) if callable(v) and k not in {"post_process","pre_process","load"}: dataset=dataset.map(self.__map_to_target, fn_kwargs={'fn':v,'target':k}) dataset=dataset.remove_columns( get_column_names(dataset)-set(self.to_dict().keys())) dataset = fix_labels(dataset) dataset = fix_splits(dataset) # again: label mapping changed dataset = self.post_process(dataset) return dataset @dataclass class cat(Preprocessing): fields:Union[str,list]=None separator:str=' ' def __call__(self, example=None): y=[np.char.array(example[f]) + sep for f,sep in zip(self.fields[::-1],itertools.repeat(self.separator))] y=list(sum(*y)) if len(y)==1: y=y[0] return y def pretty(f): class pretty_f(DotWiz): def __init__(self,*args): self.__f_arg = f(*args) for a in args: setattr(self,'value',a) def __call__(self, *args,**kwargs): return self.__f_arg(*args,**kwargs) def __repr__(self): return f"{self.__f_arg.__qualname__ .split('.')[0]}({self.value})" return pretty_f class dotgetter: def __init__(self, path=''): self.path=path def __bool__(self): return bool(self.path) def __getattr__(self, k): return self.__class__(f'{self.path}.{k}'.lstrip('.')) def __getitem__(self, i): return self.__class__(f'{self.path}[{i}]') def __call__(self, example=None): return magicattr.get(DotWiz(example), self.path) def __hash__(self): return hash(self.path) @dataclass class ClassificationFields(Preprocessing): sentence1:str='sentence1' sentence2:str='sentence2' labels:str='labels' @dataclass class Seq2SeqLMFields(Preprocessing): prompt:str='prompt' output:str='output' @dataclass class TokenClassificationFields(Preprocessing): tokens:str='tokens' labels:str='labels' @dataclass class MultipleChoiceFields(Preprocessing): inputs:str='input' choices:Iterable=tuple() labels:str='labels' choices_list:str=None def __post_init__(self): for i, c in enumerate(self.choices): setattr(self,f'choice{i}',c) delattr(self,'choices') if not self.choices_list: delattr(self,'choices_list') def __call__(self,dataset, *args, **kwargs): dataset = super().__call__(dataset, *args, **kwargs) if self.choices_list: dataset = dataset.filter(lambda x: 10), dataset_name="openai/webgpt_comparisons") synthetic_instruct = MultipleChoice('prompt', choices=['chosen', 'rejected'], labels=constant(0), dataset_name="Dahoas/synthetic-instruct-gptj-pairwise") scruples = Classification("text",labels="binarized_label",dataset_name="metaeval/scruples") wouldyourather = MultipleChoice(constant('Most people would rather:'), choices=['option_a','option_b'], labels= lambda x: int(x['votes_a']