Having trouble using Bart for conditional generation
While trying to follow the example for conditional generation using BART I keep getting the following error:`ImportError                               Traceback (most recent call last)in----> 1 from transformers.modeling_bart import BartTokenizer, BartForConditionalGeneration, BartConfig23 # seeexamples/summarization/bart/run_eval.pyfor a longer example4 model = BartForConditionalGeneration.from_pretrained(‘facebook/bart-large-cnn’)5 tokenizer = BartTokenizer.from_pretrained(‘facebook/bart-large-cnn’)~/anaconda3/envs/pytorch-hack/lib/python3.8/site-packages/transformers/modeling_bart.py in28 from .activations import ACT2FN29 from .configuration_bart import BartConfig—> 30 from .file_utils import (31     add_code_sample_docstrings,32     add_end_docstrings,ImportError: cannot import name ‘add_code_sample_docstrings’ from ‘transformers.file_utils’ (/Users/ribhu/anaconda3/envs/pytorch-hack/lib/python3.8/site-packages/transformers/file_utils.py)`I was unable to find any references to such a problem. Also, I installed the library directly from this repo to make sure I used the updated version. Really feeling lost and would appreciate some help.
2020-08-08T07:16:02Z
Hi can you again check if you are using correct transformers version,add_code_sample_docstringsis available in masterhere
2020-08-08T11:14:02Z
Yes I removed it and reinstalled from source as well. I am using v3.0.2I am now getting this error instead:ImportError: cannot import name ‘BartTokenizer’ from ‘transformers.modeling_bart’Let me know if you need other information. ThanksUPDATE: Nevermind I changed the import statement tofrom transformers import BartTokenizer, BartForConditionalGeneration, BartConfigafter reinstalling this somehow worked