I’m trying to use HuggingFace’s Trainer API to fine-tune BERT:
# Skip trainer till we can figure out how to specify MSE as loss
trainer = Trainer(
model=model, # the instantiated 🤗 Transformers model to be trained
args=training_args, # training arguments, defined above
train_dataset=train_dataset,
eval_dataset=eval_dataset)
trainer.train()
However, the validation loss is not logged to WandB:
This problem was observed by someone else on the HuggingFace forum: No loss being logged, when running MLM script (Colab) - 🤗Transformers - Hugging Face Forums
Can someone please tell me how to ensure the validation loss is logged to WandB?


Nice to hear that you solved it!