nju-websoft / KnowLA

KnowLA: Enhancing Parameter-efficient Finetuning with Knowledgeable Adaptation, NAACL 2024
GNU General Public License v3.0
13 stars 2 forks source link

AttributeError: module 'transformers.generation.utils' has no attribute '__module__' #6

Open yfangZhang opened 3 months ago

yfangZhang commented 3 months ago

python test_truthfulqa.py --is_KG=True

Traceback (most recent call last): File "/root/zhangyf/KnowLA/test_truthfulqa.py", line 206, in fire.Fire(main) File "/opt/anaconda3/envs/llm_envs/lib/python3.9/site-packages/fire/core.py", line 143, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/opt/anaconda3/envs/llm_envs/lib/python3.9/site-packages/fire/core.py", line 477, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/opt/anaconda3/envs/llm_envs/lib/python3.9/site-packages/fire/core.py", line 693, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "/root/zhangyf/KnowLA/test_truthfulqa.py", line 53, in main shutil.copyfile(base_model + "/utils.py", os.path.abspath(sys.modules[utils.module].file), follow_symlinks=True) AttributeError: module 'transformers.generation.utils' has no attribute 'module'

luoxindi commented 3 months ago

This problem is caused by different transformers package versions, I'll fix it as soon as possible!