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

Trainer Usability Improvements + Lightning Compatibility #99

Merged
merged 11 commits into from
Aug 6, 2024

Conversation

dilyabareeva
Copy link
Owner

@dilyabareeva dilyabareeva commented Aug 2, 2024

  • For training-based metrics and benchmarks, the Trainer object can either be a Lightning trainer or inherit from quanda BaseTrainer.
  • Quanda now only includes a trainer implementation with simple arguments like learning rate, optimizer, scheduler, etc. So the user options are: 1) create their own Trainer inheriting from BaseTrainer, 2) use our default Trainer implementation, 3) Lightning trainer in combination with a Lightning module passed instead of a torch.nn.Module
  • Added tests to check if quanda works as expected with Lightning modules inserted in place of torch.nn.Modules - useful for many users.
  • Added an optional init_model argument for DatasetCleaning - the user might want to train a model from scratch.
  • Made sure that when we train models we do this on a copy of a module to avoid unexpected side effects.

Closes #93.

Copy link
Collaborator

@gumityolcu gumityolcu left a comment

Choose a reason for hiding this comment

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

Hi Dilya, I left a couple of minor comments. I really like the simpler training strategies. Much easier to understand and use (and document :))

src/utils/training/trainer.py Show resolved Hide resolved
src/metrics/unnamed/dataset_cleaning.py Show resolved Hide resolved
@gumityolcu gumityolcu self-requested a review August 5, 2024 18:04
@gumityolcu gumityolcu merged commit 6ddd4a8 into main Aug 6, 2024
6 checks passed
@dilyabareeva dilyabareeva deleted the trainer_improve branch October 15, 2024 10:31
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.

Trainer improvements
2 participants