huggingface / setfit

Efficient few-shot learning with Sentence Transformers
https://hf.co/docs/setfit
Apache License 2.0
2.24k stars 222 forks source link

AttributeError: 'TrainingArguments' object has no attribute 'eval_strategy' #535

Closed jayeshchoudhari closed 2 months ago

jayeshchoudhari commented 5 months ago

Trying to run the example given in the README gives an AttributeError -- 'TrainingArguments' object has no attribute 'eval_strategy'. However, there is no attribute 'eval_strategy' mentioned in the code.

tomaarsen commented 5 months ago

Hello!

You can either downgrade your transformers version, or use this as a workaround: https://github.com/huggingface/setfit/issues/512#issuecomment-2118679266

jayeshchoudhari commented 5 months ago

Thanks. That was a easy work around. I downloaded the transformers source code separately changed the variable args.eval_strategy to args.evaluation_strategy in trainer_callback.py. An overkill :(