adapters
adapters copied to clipboard
ImportError: cannot import name 'BERT_INPUTS_DOCSTRING' from 'transformers.models.bert.modeling_bert'
models/bert /adapter_model.py tries to import BERT_INPUTS_DOCSTRING and BERT_START_DOCSTRING, which results in the following error in transformers v4.52.4:
E ImportError: cannot import name 'BERT_INPUTS_DOCSTRING' from 'transformers.models.bert.modeling_bert'
To reproduce
Steps to reproduce the behavior:
- Run the following tests:
tests/test_misc/test_adapter_safetensors.pytests/test_misc/test_adapter_save_id2label.pyThese both call:from adapters import BertAdapterModelWhich then calls:
from transformers.models.bert.modeling_bert import (
BERT_INPUTS_DOCSTRING,
BERT_START_DOCSTRING,
BertModel,
BertPreTrainedModel,
)
These were removed in this commit (this PR), which was released in transformers v4.52.1.
You can track the following pull request.