-
Notifications
You must be signed in to change notification settings - Fork 60
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
active_learner.save('active_leaner.pkl'), can't pickle _abc_data objects #4
Comments
Hi, thanks for reporting this issue. Unfortunately, I have not been able to reproduce the problem so far. Which Python version are you using (which minor version 3.7.x exactly)? And could you check which version of the dill library is used? (Obtainable via This could be related to uqfoundation/dill#332. |
Hi, I resolved the issue with updating dill library. Thanks! |
Thanks for the feedback! Could you tell me which dill version had been installed before? If so, I could adapt the requirements to prevent such problems in the future. I tried multiple dill versions on my own but never got the observed TypeError. Edit: Maybe not only dill, but also the versions of torch and transformers would be helpful to reproduce this issue. |
It was version 0.3.3, now using 0.3.4. |
Still no success in getting this exact TypeError, but this example here also fails for me: Also, I could not figure out why neither my test cases, nor my active learning script raised any error. There is a chance that this might be fixed in the dill library soon. I will leave this open for now, as this will require fixing or updating the dependency soon. |
Update: Probably this is the relevant issue: |
Seems to work with |
Signed-off-by: Christopher Schröder <chschroeder@users.noreply.github.com>
This should be resolved now. If anyone encounters this issue again, feel free to reopen. |
Hi,
I've trained an active_learner object, now trying to save it to file.
According to the doc: https://small-text.readthedocs.io/en/latest/patterns/serialization.html
active_learner.save('active_leaner.pkl')
should work but I get the following error:I can extract the transformer model and save that instead using
active_learner.classifier.model.save_pretrained(f"{directory}")
but not usingactive_learner.save()
The text was updated successfully, but these errors were encountered: