Skip to content

TypeError in tensorflow/run_summarization.py #13732

@bpraveenk

Description

@bpraveenk

Environment info

  • transformers version: 4.11.0.dev0
  • Platform: Linux-5.4.0-1055-azure-x86_64-with-glibc2.10
  • Python version: 3.8.1
  • PyTorch version (GPU?):
  • Tensorflow version (GPU?): 2.5.0 (Yes)
  • Using GPU in script?: Yes
  • Using distributed or parallel set-up in script?: Distributed

Who can help:

@patrickvonplaten, @patil-suraj, @RocketKnight

Models: facebook/bart
datasets: xsum

  • the official example scripts: (give details below)
    run_summarization.py
    relative path: examples/tensorflow/summarization

Steps to reproduce the behavior: (Note that --max_train_samples is optional)
python run_summarization.py --model_name_or_path facebook/bart-base --dataset_name xsum --dataset_config "3.0.0" --output_dir /tmp/tst-summarization --per_device_train_batch_size 4 --per_device_eval_batch_size 4 --num_train_epochs 3 --do_train --do_eval --max_train_samples 100

Error message

  • INFO - main - Evaluation...
    0%| | 0/2833 [00:01<?, ?it/s]
    Traceback (most recent call last):
    File "run_summarization.py", line 663, in
    main()
    File "run_summarization.py", line 639, in main
    generated_tokens = model.generate(**batch)
    File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/pbodigut1/code/Users/pbodigut/transformers/v-4.10/transformers/src/transformers/generation_tf_utils.py", line 736, in generate
    output = self._generate_beam_search(
    File "/mnt/batch/tasks/shared/LS_root/mounts/clusters/pbodigut1/code/Users/pbodigut/transformers/v-4.10/transformers/src/transformers/generation_tf_utils.py", line 1102, in _generate_beam_search
    model_inputs = self.prepare_inputs_for_generation(
    TypeError: prepare_inputs_for_generation() got multiple values for argument 'decoder_input_ids'

Expected behavior

Successfully run the evaluation step.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions