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

Questions about running the cola dataset script #176

Open
dengxingzhi opened this issue May 21, 2024 · 1 comment
Open

Questions about running the cola dataset script #176

dengxingzhi opened this issue May 21, 2024 · 1 comment

Comments

@dengxingzhi
Copy link

hello,An error occurs when I run the debert cola.sh script
Traceback (most recent call last):
File "examples/text-classification/run_glue.py", line 626, in
main()
File "examples/text-classification/run_glue.py", line 558, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/home/dengxingzhi/LoRA/examples/NLU/src/transformers/trainer.py", line 881, in train
self._load_state_dict_in_model(state_dict)
File "/home/dengxingzhi/LoRA/examples/NLU/src/transformers/trainer.py", line 1987, in _load_state_dict_in_model
if set(load_result.missing_keys) == set(self.model._keys_to_ignore_on_save):
TypeError: 'NoneType' object is not iterable

so,Is it a code problem,because running other scripts works fine

@Zhoutong-Wu
Copy link

I met the same problem, and I added the following in the _load_state_dict_in_model() function in transformers/trainer.py
if self.model._keys_to_ignore_on_save == None:
self.model._keys_to_ignore_on_save = []
Then I could run the cola.sh script.

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