Skip to content

Conversation

@rahular
Copy link
Contributor

@rahular rahular commented Nov 15, 2018

The --no_cuda flag is missing from the flagset in extract_features.py. On running the current code, the following error occurs.

(py3.5) [rahul pytorch-pretrained-BERT]$ python extract_features.py \
>   --input_file=./input.txt \
>   --output_file=./output.jsonl \
>   --vocab_file=$BERT_BASE_DIR/vocab.txt \
>   --bert_config_file=$BERT_BASE_DIR/bert_config.json \
>   --init_checkpoint=$BERT_BASE_DIR/pytorch_model.bin \
>   --layers=-4 \
>   --max_seq_length=128 \
>   --batch_size=8
Traceback (most recent call last):
  File "extract_features.py", line 306, in <module>
    main()
  File "extract_features.py", line 223, in main
    device = torch.device("cuda" if torch.cuda.is_available() and not args.no_cuda else "cpu")
AttributeError: 'Namespace' object has no attribute 'no_cuda'

@thomwolf
Copy link
Member

Thanks, I've added that manually (the library organization has changed a bit with the first pip release).

@thomwolf thomwolf closed this Nov 17, 2018
@HongyanJiao HongyanJiao mentioned this pull request Sep 19, 2019
jameshennessytempus pushed a commit to jameshennessytempus/transformers that referenced this pull request Jun 1, 2023
etemadiamd pushed a commit to etemadiamd/transformers that referenced this pull request Aug 29, 2023
…ly-rocm

Add tf-nightly-rocm to _is_tf_available check
SangbumChoi added a commit to SangbumChoi/transformers that referenced this pull request Sep 24, 2024
…tion

modifications on eval & semantics extraction & label_maps & collate_fn
ArthurZucker added a commit that referenced this pull request Aug 5, 2025
bring chat template back up to speed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants