Skip to content

Conversation

DevManpreet5
Copy link

Changes Made

  • Added validation dataset support using val_dataloader
  • Introduced evaluate_model() for per-epoch validation loss evaluation
  • Checkpoints now saved when validation loss improves
  • Best model checkpoint stored in checkpoints/ directory
  • Automatically pushes best and final models to the HuggingFace Hub
  • Step-wise and epoch-wise logging integrated with Weights & Biases (wandb)

Copy link
Collaborator

@sergiopaniego sergiopaniego left a comment

Choose a reason for hiding this comment

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

Nice! Thanks for the addition 😄
Left a comment for improvement!

total_samples = 0

with torch.no_grad():
for batch in val_dataloader:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we see a run for this training with the evaluation support?
It may run into issues here, since this code is different from the training procedure.

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