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 #67 - Add Monero #516

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

Conversation

napsternxg
Copy link

Fixes #67 - Add Monero

If the following information is NOT present in the issue, please populate:

Checkbox

  • Confirm that this PR is linked to the dataset issue.
  • Create the dataloader script biodatasets/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 _BIGBIO_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 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 biodatasets/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.

@hakunanatasha
Copy link
Collaborator

@napsternxg passes all the unit tests and loads fine, but I noticed if I do the following:

from datasets import load_dataset
x = load_dataset("biodatasets/monero/monero.py", name="monero_bigbio_kb")["train"]["entities"][-1]

I find these all empty. Is this intended?

@hakunanatasha
Copy link
Collaborator

@napsternxg also I made a small change at the end of the file (near the main call)

@napsternxg
Copy link
Author

Hi @hakunanatasha thanks. Let me have a look at this. I will address this by early next week.

@napsternxg
Copy link
Author

Hi @hakunanatasha I checked the entities. They are present. When no entity is present in a doc we see an empty list.
This is a better way to check:

from datasets import load_dataset
data = load_dataset("biodatasets/monero/monero.py", name="monero_bigbio_kb")
data["train"]["entities"][-5:]

Will output

[[],
 [],
 [],
 [{'id': 'docid-4982-E0',
   'type': 'DISO',
   'text': ['hemipareză spastică'],
   'offsets': [[109, 128]],
   'normalized': []}],
 []]

This means only the second last doc among the last 5 docs has any entity.

I also added a fix about entity offsets.
I think this PR is ready for Merge.

@sg-wbi sg-wbi changed the title Fixes #67 - Add Monero Closes #67 - Add Monero May 9, 2022
@mariosaenger
Copy link
Collaborator

@phlobo I revised this dataset. Please have a look at it.

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 a dataset loader for MoNERo
3 participants