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

feature/Add support for hf datasets for text classification task #511

Conversation

Prikshit7766
Copy link
Contributor

@Prikshit7766 Prikshit7766 commented Jun 12, 2023

Checklist:

  • I've added Google style docstrings to my code.
  • I've used pydantic for typing when/where necessary.
  • I have linted my code
  • I have added tests to cover my changes.

  • The Harness class for Hugging Face and text classification supports the data parameter, which can also be specified as a dictionary with the following attributes: name, subset, feature_column, target_column, and split.
  • By default, the split is set to "test," while the default names for the feature and target columns are "text" and "label" respectively.
  • This implementation provides users with the flexibility to load their desired dataset according to their specific requirements.

Please find below the code snippet showcasing the utilization of the Harness class for the support of HF Datasets:

harness = Harness(task="text-classification", hub="huggingface", model="nlptown/flaubert_small_cased_sentiment",
                    data={
                        "name": "amazon_reviews_multi",
                        "subset": "en",
                        "feature_column": "review_body",
                        "target_column": "product_category",
                        "split": "train"
                    })

@Prikshit7766 Prikshit7766 linked an issue Jun 12, 2023 that may be closed by this pull request
@RakshitKhajuria RakshitKhajuria changed the title Add support for hf datasets for text classification task feature/Add support for hf datasets for text classification task Jun 12, 2023
@RakshitKhajuria RakshitKhajuria added ⭐ Feature Indicates new feature requests v1.5.0 labels Jun 12, 2023
@ArshaanNazir ArshaanNazir merged commit fd9a908 into release/1.5.0 Jun 14, 2023
@Prikshit7766 Prikshit7766 deleted the add-support-for-hf-datasets-for-text-classification-task branch June 16, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ Feature Indicates new feature requests v1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for HF datasets for Text Classification task
3 participants