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

Chapter 11 - 'CallbackHandler' object has no attribute 'tokenizer' error for SetFit trainer #19

Open
weigo2002 opened this issue Nov 29, 2024 · 1 comment

Comments

@weigo2002
Copy link

trainer = SetFitTrainer(
model=model,
args=args,
train_dataset=sampled_train_data,
eval_dataset=test_data,
metric="f1"
)

Got 'CallbackHandler' object has no attribute 'tokenizer' error when initialize SetFitTrainer.

@MaartenGr
Copy link
Contributor

Thank you for sharing! It seems that an update of transformers broke down the functionality of SetFit. To resolve the issue, I would advise checking out the thread here. Essentially, it would mean temporarily using an older version of Transformers until this gets fixed.

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