Python 是大小写敏感的,所以 add_start_docstrings_to_callable 必须与库中的实际名称完全一致。 python from transformers import add_start_docstrings_to_callable 4. 检查 Python 环境 确保你的 Python 环境设置正确,并且 transformers 库已经正确安装在你的
I was using 1.2.1 from conda and received the same AttributeError complaining about 'add_start_docstrings'. Uninstalling the conda installed datasets and then installing the latest datasets (version 1.5.0) using pip install solved the issue for me. I don't like mixing up conda and pip ...