Error from loading attribute
jaehyoyoo opened this issue · 1 comments
Hi, I'm trying to use NSP model training, but I got error like below.
Traceback (most recent call last): File "train_lc.py", line 403, in <module> state = torch.load(args.load_model_name) File "/home/*/anaconda3/envs/baseline/lib/python3.6/site-packages/torch/serialization.py", line 594, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "/home/*/anaconda3/envs/baseline/lib/python3.6/site-packages/torch/serialization.py", line 853, in _load result = unpickler.load() AttributeError: Can't get attribute 'RobertaEncoder' on <module 'transformers.modeling_roberta' from '/home/*/anaconda3/envs/baseline/lib/python3.6/site-packages/transformers/modeling_roberta.py'>
Maybe there's some version mismatch, could you notice me the version of torch and cuda in your environment?
Hi, thanks for your interest in our paper!
Our torch version is 1.6.0 and cuda version is 10.2. The version of the transformers package is actually 3.4.0, not 2.8.0, can you try this version and see if it works? I have updated the requirements.txt.