Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #593 | Add Dataloader XQuAD-R #601

Merged
merged 1 commit into from
May 26, 2024

Conversation

akhdanfadh
Copy link
Collaborator

@akhdanfadh akhdanfadh commented Apr 2, 2024

Closes #593

There are 2 subsets. Configs will look like this: xquadr_vie_source, xquadr_tha_seacrowd_qa, etc. When testing, pass xquadr_<subset> to the --subset_id parameter.

I will add a new PR for adding the QAR task once this PR is checked, and remove the relevant file from this PR.

Checkbox

  • Confirm that this PR is linked to the dataset issue.
  • Create the dataloader script seacrowd/sea_datasets/my_dataset/my_dataset.py (please use only lowercase and underscore for dataset naming).
  • Provide values for the _CITATION, _DATASETNAME, _DESCRIPTION, _HOMEPAGE, _LICENSE, _URLs, _SUPPORTED_TASKS, _SOURCE_VERSION, and _SEACROWD_VERSION variables.
  • Implement _info(), _split_generators() and _generate_examples() in dataloader script.
  • Make sure that the BUILDER_CONFIGS class attribute is a list with at least one SEACrowdConfig for the source schema and one for a seacrowd schema.
  • Confirm dataloader script works with datasets.load_dataset function.
  • Confirm that your dataloader script passes the test suite run with python -m tests.test_seacrowd seacrowd/sea_datasets/<my_dataset>/<my_dataset>.py.
  • If my dataset is local, I have provided an output of the unit-tests in the PR (please copy paste). This is OPTIONAL for public datasets, as we can test these without access to the data files.

Copy link
Collaborator

@muhammadravi251001 muhammadravi251001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test passed successfully, and the results from load_dataset() perfectly matched. Just one minor suggestion below.

Comment on lines +1 to +14
# coding=utf-8
# Copyright 2022 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment block

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I know why?

Copy link
Collaborator

@muhammadravi251001 muhammadravi251001 May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess for a unified format consistent with the rest of the submitted and approved dataloaders, as seen in my implementation in this dataloader and the discussion below: #609 (comment). Previously, my code style was the same as yours (including that comment-block-header), but after receiving that comment, I resolved it to maintain the unified format.

Copy link
Collaborator

@luckysusanto luckysusanto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dataset length match, manual test passed.
Just a small nitpick to remove :)

yield key, {
"id": str(key),
"question_id": qa["id"],
# "document_id": None,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the small nitpick, but can you remove this comment line?

@muhammadravi251001
Copy link
Collaborator

Since both recommendations have no impact on the dataloader implementation (just for code aesthetics to remove unused comments), I will merge this PR to master since the review session ended on 30 May.

@muhammadravi251001 muhammadravi251001 merged commit 6a940e9 into SEACrowd:master May 26, 2024
1 check passed
@akhdanfadh akhdanfadh deleted the xquadr branch May 31, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create dataset loader for XQuAD-R
5 participants