facebookresearch / facebookresearch/UnsupervisedDecomposition

cannot import name 'RobertaForQuestionAnswering' from 'pytorch_transformers'

Open
#11 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
123
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Dear,

I have followed the instruction on your site https://github.com/facebookresearch/UnsupervisedDecomposition till the step below:
`# Answer sub-Qs
DATA_FOLDER=data/hotpot.umt.all.model=$MODEL_NO.st=$ST.beam=$BEAM.lp=$LP.seed=$SEED
for SPLIT in "dev" "train"; do
for NUM_PARAGRAPHS in 1 3; do
# For fp16: Add "--fp16 --fp16_opt_level O2" below
python examples/run_squad.py --model_type roberta --model_name_or_path roberta-large --train_file $DATA_FOLDER/train.json --predict_file $DATA_FOLDER/$SPLIT.json --do_eval --do_lower_case --version_2_with_negative --output_dir checkpoint/roberta_large.hotpot_easy_and_squad.num_paragraphs=$NUM_PARAGRAPHS --per_gpu_train_batch_size 64 --per_gpu_eval_batch_size 32 --learning_rate 1.5e-5 --max_query_length 234 --max_seq_length 512 --doc_stride 50 --num_shards 1 --seed 0 --max_grad_norm inf --adam_epsilon 1e-6 --adam_beta_2 0.98 --weight_decay 0.01 --warmup_proportion 0.06 --num_train_epochs 2 --write_dir $DATA_FOLDER/roberta_predict.np=$NUM_PARAGRAPHS --no_answer_file
done
done`

I have installed the Pytorch-transformers by:
`pip install pytorch-transformers`

However, I found an error:
cannot import name 'RobertaForQuestionAnswering' from 'pytorch_transformers'

Any idea for this?

Regards,

Mohammad Yani

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.