Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Active Learning with SetFit #64

Closed
savasy opened this issue Jun 28, 2024 · 3 comments
Closed

Active Learning with SetFit #64

savasy opened this issue Jun 28, 2024 · 3 comments

Comments

@savasy
Copy link

savasy commented Jun 28, 2024

When I run the following line in 03-Active Learning with SetFit Python Notebook code,
active_learner.initialize_data(x_indices_initial, y_initial)

I got the following error

'TrainingArguments' object has no attribute 'eval_strategy'

@chschroeder
Copy link
Contributor

chschroeder commented Jun 28, 2024

Hi @savasy!

Thank you for reporting this. This is likely caused by your sefit version being newer than what the library supports. Unfortunately, I haven't had the time to update the code to be compatible with recent SetFit versions. To resolve this, please use an older version of SetFit for now:

pip install setfit==0.7.0

Since this is an optional dependency, I can't really control the versions people install, but all restrictions on optional dependencies are documented here. For the example notebooks, I will pin the versions to ensure that those who are just trying out the library will not encounter any unexpected issues.

chschroeder added a commit that referenced this issue Jun 28, 2024
Signed-off-by: Christopher Schröder <chschroeder@users.noreply.github.com>
@savasy
Copy link
Author

savasy commented Jun 30, 2024

Hi @chschroeder
Thank you very much for the solution. The following setting also works out!

transformers ==4.39.0
setfit==1.0.3

@savasy savasy closed this as completed Jun 30, 2024
@chschroeder
Copy link
Contributor

Oh, that's interesting. Thank you for the feedback! Maybe, the upgrade to setfit>=1.0.0 is easier than expected. (Link to #55 so that I will not miss this.)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants