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 #873 and revises #874 #876

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

WangXII
Copy link
Contributor

@WangXII WangXII commented Feb 22, 2023

Closes #873 and revises #874 - Wrong entity offsets in the tmvar_v3 datasets

Wrong offsets in PMID 21904390 are already present in the source file https://ftp.ncbi.nlm.nih.gov/pub/lu/tmVar3/tmVar3Corpus.txt

Solution: Manually corrected the wrong offsets in PMID 21904390 as the wrong offsets do not seem to follow any pattern.

Compared to #874, this pull request reverts the offsets in the standard 'source' dataset back to original (but wrong) offsets provided by the original dataset and adds a new 'source_fixed' dataset with corrected offsets

Checkbox

  • Confirm that this PR is linked to the dataset issue.
  • Make sure that the BUILDER_CONFIGS class attribute is a list with at least one BigBioConfig for the source schema and one for a bigbio 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_bigbio_hub <dataset_name> [--data_dir /path/to/local/data] --test_local.

@WangXII WangXII changed the title Tmvar v3 fix Closes #873 and revises #874 Feb 22, 2023
Copy link
Collaborator

@leonweber leonweber left a comment

Choose a reason for hiding this comment

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

Imho this can be merged after the two comments have been resolved. Please also update to the lastest version of main. At the moment there is a conflict that prevents merging.

bigbio/hub/hub_repos/tmvar_v3/tmvar_v3.py Outdated Show resolved Hide resolved
bigbio/hub/hub_repos/tmvar_v3/tmvar_v3.py Outdated Show resolved Hide resolved
@WangXII
Copy link
Contributor Author

WangXII commented Mar 14, 2023

Thanks for the review @leonweber. Looking into the merge conflict, the branch is already up-to-date with main. It seems more like a simple change that the automatic merging strategies fails to recognize. The branch version adds an if-clause to just show the fixed annotations in the source version if the user explicitly requests it ("_source_fixed" vs "_source")

<<<<<<< tmvar_v3_fix
                if "_fixed" in self.config.name:
                    document["entities"] = self._correct_wrong_offsets(
                        document["entities"], doc.pmid
                    )
=======
                document["entities"] = self._correct_wrong_offsets(
                    document["entities"], doc.pmid
                )
>>>>>>> main

leonweber
leonweber previously approved these changes Mar 15, 2023
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.

Wrong entity offsets in the tmvar_v3 datasets
2 participants