Skip to content

Questions about running the cola dataset script #176

Open

Description

@PEFT2026

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

Activity

  1. Zhoutong-Wu commented on May 30, 2024

    @Zhoutong-Wu

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions