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: 'RobertaConfig' object has no attribute 'task2labels' #5

Open
rudra0713 opened this issue Jun 11, 2023 · 0 comments
Open

Comments

@rudra0713
Copy link

I am executing the following command with the necessary parameters:
python3.8 src/stancedetection/models/trainer.py
For now, I am just using 3 datasets with a very small number of synthetic examples, just to make sure that the code is working.
However, I am getting the following error:

File "src/stancedetection/models/trainer.py", line 903, in <module>
    main()
  File "src/stancedetection/models/trainer.py", line 822, in main
    model = load_model_from_pretrained(
  File "src/stancedetection/models/trainer.py", line 291, in load_model_from_pretrained
    model = model_cls.from_pretrained(model_name_or_path, **from_pretrained_kwargs)
  File "venv/lib/python3.8/site-packages/transformers/modeling_utils.py", line 947, in from_pretrained
    model = cls(config, *model_args, **model_kwargs)
  File "/scratch/rrs99/mole-stance/src/stancedetection/models/nn.py", line 147, in __init__
    task2labels=config.task2labels,
AttributeError: 'RobertaConfig' object has no attribute 'task2labels'
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