Trainer not logging eval_loss

I am using :hugs:Trainer from master branch with following args:

    args = TrainingArguments(
        output_dir="nq-complete-training",
        overwrite_output_dir=False,
        do_train=True,
        do_eval=True,
        evaluation_strategy="steps",
        eval_steps=5,
        per_device_train_batch_size=4,
        per_device_eval_batch_size=4,
        gradient_accumulation_steps=1,
        group_by_length=True,
        learning_rate=7e-5,
        warmup_steps=50,
        lr_scheduler_type="linear",
        num_train_epochs=3,
        logging_strategy="steps",
        logging_steps=5,
        save_strategy="steps",
        run_name="nq",
        disable_tqdm=False,
        report_to="wandb",
        remove_unused_columns=False,
        fp16=False,
    )

Trainer is not logging eval loss. Any idea why??

hey @vasudevgupta, is is possible that you’re not providing the correct labels / label names for the loss to be computed?

judging by output_dir, it looks like you’re doing question answering, in which case the trainer looks for the column names ["start_positions", "end_positions"] in the label_names argument.

@lewtun, yes it was question-answering, I am inheriting my model class from BigBirdForQuestionAnswering.

It worked for me when I am passing appropriate values in label_names argument. Thanks a lot!

1 Like