Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding no_cuda flag #22

Closed
wants to merge 1 commit into from
Closed

adding no_cuda flag #22

wants to merge 1 commit into from

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
stevezheng23 added a commit to stevezheng23/transformers that referenced this pull request Mar 24, 2020
add quac codalab submission pipeline (cont.)
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
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