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: 'PTuneForLAMA' object has no attribute 'prompt' #16

Open
puraminy opened this issue May 4, 2021 · 1 comment
Open

Comments

@puraminy
Copy link

puraminy commented May 4, 2021

I called

python cli.py --model_name=gpt2

After several epochs, it printed the following error:

P1001 Dev Epoch 41 Loss: 0.007320404052734375 Hit@1: 0.6756756756756757
Traceback (most recent call last):
  File "cli.py", line 238, in <module>
    main()
  File "cli.py", line 234, in main
    trainer.train()
  File "cli.py", line 197, in train
    self.save(best_ckpt)
  File "cli.py", line 171, in save
    print("# Prompt:", self.model.prompt)
  File "/home/pouramini/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", 
line 948, in __getattr__
    type(self).__name__, name))
AttributeError: 'PTuneForLAMA' object has no attribute 'prompt'
@aaafc
Copy link

aaafc commented Sep 28, 2021

Yes, I've encountered the problem myself, and I'm still looking for the reason.
I've used GPT-2 as my PLM as well, and after 46 epochs, the same error occurs at line "cli.py, line 171" in the script.
Though I'm not sure why this is taken place, it appears that one can simply comment out that line, and the script still works.
So, if you are just trying to run the process, you could simply skip the code which seems to just print another line of debug info.

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