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

Enhancements and Fixes for Classification Functionality #76

Merged
merged 9 commits into from
Nov 17, 2024

Conversation

gokceuludogan
Copy link
Contributor

I encountered several issues while using the library for classification tasks and implemented fixes alongside new features to enhance usability and flexibility.

Changes

  • Updated Default Model Name
    • Replaced the default model name with the corresponding Hugging Face model name for better alignment and clarity.
  • Fixed Missing Parameters in Trainer Initialization
    • Addressed missing parameters in the Evaluator initialization within TrainerForClassification.
    • Refactored the affected files:
      - turkish_lm_tuner/trainer.py
      - experiments/finetune.py
  • Improved Dataset Integration
    • Updated DatasetProcessor to allow users to pass initialized datasets directly. This eliminates the need for library updates when integrating external datasets.
  • Implemented New Metrics
    • Added support for calculating F1 metrics for multi label classification.

@gokceuludogan
Copy link
Contributor Author

Minor changes made in new commits:

  • Setting f1_multi_weighted as the default metric for multi-label classification
  • Handling logits for multi-label classification
  • Refactoring model initialization for multi-label classification

Significant changes:

  • T5ForClassification implementation was not fully compatible with HuggingFace transformers, leading to issues while saving and loading weights. I have refactored the implementation to utilize T5Config so that it enables users to use HF conventions for initializing, loading and saving T5ForClassification. Trainer and evaluator classes have been refactored accordingly.

Copy link
Contributor

@zeynepyirmibes zeynepyirmibes left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for this correction

@gokceuludogan gokceuludogan merged commit b9d2cbb into main Nov 17, 2024
@gokceuludogan gokceuludogan deleted the minor-patch branch November 17, 2024 11:43
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.

2 participants