xlang-ai / UnifiedSKG

[EMNLP 2022] Unifying and multi-tasking structured knowledge grounding with language models
https://arxiv.org/abs/2201.05966
Apache License 2.0
549 stars 58 forks source link

TypeError: add_code_sample_docstrings() got an unexpected keyword argument 'tokenizer_class #16

Closed puraminy closed 2 years ago

puraminy commented 2 years ago

When I tried your command for wikiQA t5 prefix, I got the following error:

File "/home/pouramini/UnifiedSKG/models/unified/prefixtuning.py", line 8, in <module>
    from ..prompt.modeling_auto import AutoModelForSeq2SeqLM
  File "/home/pouramini/UnifiedSKG/models/prompt/modeling_auto.py", line 34, in <module>
    from .modeling_bart import (
  File "/home/pouramini/UnifiedSKG/models/prompt/modeling_bart.py", line 1162, in <module>
    class BartModel(BartPretrainedModel):
  File "/home/pouramini/UnifiedSKG/models/prompt/modeling_bart.py", line 1189, in BartModel
    @add_code_sample_docstrings(
TypeError: add_code_sample_docstrings() got an unexpected keyword argument 'tokenizer_class
ChenWu98 commented 2 years ago

Hi,

The transformers library removed this doc string in newer versions. You can 1) use the transformers version as specified in our yml file or 2) manually remove the doc string.