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, BartConfig
2
3 # see examples/summarization/bart/run_eval.py
for a longer example
4 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 in
28 from .activations import ACT2FN
29 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.