# Trainer not logging eval\_loss

**URL:** <https://discuss.huggingface.co/t/trainer-not-logging-eval-loss/5760>\
**Category:** Beginners\
**Created:** [April 26, 2021, 6:14am UTC](https://discuss.huggingface.co/t/trainer-not-logging-eval-loss/5760 "2021-04-26T06:14:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasudevgupta](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/vasudevgupta/32/1251_2.png) [@vasudevgupta](https://discuss.huggingface.co/u/vasudevgupta)\
**Post date:** [April 26, 2021, 6:14am UTC](https://discuss.huggingface.co/t/trainer-not-logging-eval-loss/5760/1 "2021-04-26T06:14:39Z")

</div>

I am using 🤗Trainer from `master` branch with following args:

```python
    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??

---

<div class="post-metadata">

**Author:** ![lewtun](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lewtun/32/30995_2.png) [@lewtun](https://discuss.huggingface.co/u/lewtun)\
**Post date:** [April 26, 2021, 8:50am UTC](https://discuss.huggingface.co/t/trainer-not-logging-eval-loss/5760/2 "2021-04-26T08:50:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vasudevgupta](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/vasudevgupta/32/1251_2.png) [@vasudevgupta](https://discuss.huggingface.co/u/vasudevgupta)\
**Post date:** [April 26, 2021, 4:37pm UTC](https://discuss.huggingface.co/t/trainer-not-logging-eval-loss/5760/3 "2021-04-26T16:37:47Z")

</div>

@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!
