# Error when fine-tuning imdb with the script

**URL:** <https://discuss.huggingface.co/t/error-when-fine-tuning-imdb-with-the-script/11185>\
**Category:** 🤗Transformers\
**Created:** [October 29, 2021, 1:16am UTC](https://discuss.huggingface.co/t/error-when-fine-tuning-imdb-with-the-script/11185 "2021-10-29T01:16:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkon3](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tkon3](https://discuss.huggingface.co/u/tkon3)\
**Post date:** [October 29, 2021, 1:16am UTC](https://discuss.huggingface.co/t/error-when-fine-tuning-imdb-with-the-script/11185/1 "2021-10-29T01:16:43Z")

</div>

Hi,

I’m using the run\_glue.py script I found [here](https://github.com/huggingface/transformers/tree/master/examples/pytorch/text-classification) to fine tune imdb.  
I follow the example, training looks fine, eval looks fine but there is no result at the end.

```auto
python run_glue.py \
  --model_name_or_path bert-base-cased \
  --dataset_name imdb \
  --do_train \
  --do_predict \
  --max_seq_length 128 \
  --per_device_train_batch_size 4 \
  --learning_rate 2e-5 \
  --num_train_epochs 1 \
  --output_dir tmp/imdb/

```

I tried to add --remove\_unused\_columns False :

```auto
python run_glue.py \
  --model_name_or_path bert-base-cased \
  --dataset_name imdb \
  --do_train \
  --do_predict \
  --max_seq_length 128 \
  --per_device_train_batch_size 4 \
  --learning_rate 2e-5 \
  --num_train_epochs 1 \
  --remove_unused_columns False \
  --output_dir tmp/imdb/

```

I’m getting this error at the end for each attempt :

```auto
10/29/2021 08:07:12 - INFO - __main__ - *****Predict results None*****
[INFO|modelcard.py:449] 2021-10-29 08:07:12,801 >> Dropping the following result as it does not have all the necessary fields:
{'task': {'name': 'Text Classification', 'type': 'text-classification'}, 'dataset': {'name': 'imdb', 'type': 'imdb', 'args': 'plain_text'}}

```

I don’t really know what is happening because there is no crash.  
Transformers, datasets and tokenizers are up to date.

Thank you.

---

<div class="post-metadata">

**Author:** ![sgugger](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/sgugger/32/2291_2.png) [@sgugger](https://discuss.huggingface.co/u/sgugger)\
**Post date:** [October 29, 2021, 2:45am UTC](https://discuss.huggingface.co/t/error-when-fine-tuning-imdb-with-the-script/11185/2 "2021-10-29T02:45:25Z")

</div>

You need to adapt the script a bit for it to work on the IMDB dataset. It has no “validation” set (the set is named “test”) so you have to change the name of that column.
