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

TypeError: forward() got an unexpected keyword argument 'token_type_ids' #6

Open
Wepdekr opened this issue Mar 26, 2024 · 1 comment

Comments

@Wepdekr
Copy link

Wepdekr commented Mar 26, 2024

Traceback:
Traceback (most recent call last):
File "/root/autodl-tmp/Decker-main/run_confact.py", line 408, in
main()
File "/root/autodl-tmp/Decker-main/run_confact.py", line 324, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint, ignore_keys_for_eval=["my_metrics"])
File "/root/miniconda3/envs/py39/lib/python3.9/site-packages/transformers/trainer.py", line 1400, in train
tr_loss_step = self.training_step(model, inputs)
File "/root/miniconda3/envs/py39/lib/python3.9/site-packages/transformers/trainer.py", line 1984, in training_step
loss = self.compute_loss(model, inputs)
File "/root/miniconda3/envs/py39/lib/python3.9/site-packages/transformers/trainer.py", line 2016, in compute_loss
outputs = model(**inputs)
File "/root/miniconda3/envs/py39/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
TypeError: forward() got an unexpected keyword argument 'token_type_ids'

@Wepdekr
Copy link
Author

Wepdekr commented Mar 26, 2024

@Anni-Zou

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

1 participant