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

added missing label method for nlp_datasets #159

Closed
wants to merge 1 commit into from

Conversation

junaidahmed361
Copy link
Contributor

Summary:

nlp_datasets.py was missing the label method. This caused a breakage of the huggingface wrapper when labelling the active dataset. It couldn't validate the dataset as able to be labelled, and thereby went into the backup condition and suffered a keyerror when looking for key '0'.

Features:

Added a label method for nlp_datasets which sets the value for the index of the targets array.

Checklist:

  • Your code is documented (To validate this, add your module to tests/documentation_test.py).
  • Your code is tested with unit tests.
  • You moved your Issue to the PR state.

@parmidaatg
Copy link
Collaborator

Hi @junaidahmed361,
Thank you so much for your PR.
Could you elaborate on how did you use the HuggingFace wrapper?
the suggested methodology which was in the experiments is as below and this way hugging face wrapper should use the label method of ActiveLearningDataset:
dataset = ActiveLearningDataset(HuggingFaceDataset(dataset))

@Dref360
Copy link
Member

Dref360 commented Oct 21, 2021

Hello,

Good addition thanks!

  1. Can we add a unit test
  2. You can format your code by running make format

@Dref360 Dref360 mentioned this pull request Dec 1, 2021
3 tasks
@Dref360 Dref360 closed this in #165 Dec 2, 2021
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.

3 participants