Skip to content

run_summarization_no_trainer #18189

@Arij-Aladel

Description

@Arij-Aladel

@sgugger Hello! I just tried to run the code to explore this example https://github.com/huggingface/transformers/blob/main/examples/pytorch/summarization/run_summarization_no_trainer.py

this is my yml file to build the env

name: sum

channels:

  • pytorch
  • conda-forge
  • defaults

dependencies:

  • jupyterlab
  • pip
  • python=3.9
  • pytorch
  • tensorboard
  • torchaudio
  • torchvision
  • tqdm
  • tokenizers
  • prettytable
  • einops
  • matplotlib
  • accelerate
  • datasets
  • sentencepiece != 0.1.92
  • protobuf
  • nltk
  • py7zr
  • transformers

then pip install rouge-score

after that simply I ran thhe command

accelerate launch run_summarization_no_trainer.py --model_name_or_path t5-small --dataset_name cnn_dailymail --dataset_config '3.0.0' --source_prefix 'summarize: ' --output_dir output/tst-summarization

and got the error

Traceback (most recent call last):
File "/home/arij/anaconda3/envs/sum/bin/accelerate", line 10, in
sys.exit(main())
File "/home/arij/anaconda3/envs/sum/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 43, in main
args.func(args)
File "/home/arij/anaconda3/envs/sum/lib/python3.9/site-packages/accelerate/commands/launch.py", line 568, in launch_command
simple_launcher(args)
File "/home/arij/anaconda3/envs/sum/lib/python3.9/site-packages/accelerate/commands/launch.py", line 235, in simple_launcher
mixed_precision = PrecisionType(args.mixed_precision.lower())
AttributeError: 'NoneType' object has no attribute 'lower'

How to fix it?

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