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: 'RobertaModel' object has no attribute 'layer_idx' #633

Closed
calpt opened this issue Jan 8, 2024 Discussed in #628 · 0 comments · Fixed by #634
Closed

AttributeError: 'RobertaModel' object has no attribute 'layer_idx' #633

calpt opened this issue Jan 8, 2024 Discussed in #628 · 0 comments · Fixed by #634
Assignees
Labels
bug Something isn't working

Comments

@calpt
Copy link
Member

calpt commented Jan 8, 2024

Discussed in #628

Originally posted by tangshiyi341914 January 5, 2024
Hello,

I am a student of computer science and I am working on AdapterDrop.

When I ran the Adapter_Drop_Training.ipynb step by step,I got an error:

transformers/trainer.py:1860, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)
self.control = self.callback_handler.on_step_begin(args, self.state, self.control)
with self.accelerator.accumulate(model):
tr_loss_step = self.training_step(model, inputs)
if (
args.logging_nan_inf_filter
and not is_torch_tpu_available()

and (torch.isnan(tr_loss_step) or torch.isinf(tr_loss_step))

...
if name in modules:
return modules[name]
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'RobertaModel' object has no attribute 'layer_idx'

I don't know how to solve it,could you help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant