Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yfangZhang opened this issue Aug 21, 2024 · 1 comment

Comments

@yfangZhang
Copy link

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants