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

training, deploying sentence transformer model ( setfit method) in sagemaker pipeline #439

Open
miteshkotak opened this issue Oct 12, 2023 · 2 comments

Comments

@miteshkotak
Copy link

error i face while training sentence transformer model using "SetFitTrainer" and importing model with "SetfitModel" throws following error:

Traceback (most recent call last): File "train-setfit.py",
line 81, in from setfit import SetFitModel File "/opt/conda/lib/python3.8/site-packages/setfit/init.py",

line 5, in from .trainer import SetFitTrainer File "/opt/conda/lib/python3.8/site-packages/setfit/trainer.py",
line 4, in import evaluate File "/opt/conda/lib/python3.8/site-packages/evaluate/init.py",
line 29, in from .evaluation_suite import EvaluationSuite File "/opt/conda/lib/python3.8/site-packages/evaluate/evaluation_suite/init.py",
line 7, in from datasets import Dataset, DownloadMode, load_dataset | Traceback (most recent call last): File "train-setfit.py",
line 81, in from setfit import SetFitModel File "/opt/conda/lib/python3.8/site-packages/setfit/init.py",
line 5, in from .trainer import SetFitTrainer File "/opt/conda/lib/python3.8/site-packages/setfit/trainer.py",
line 4, in import evaluate File "/opt/conda/lib/python3.8/site-packages/evaluate/init.py",
line 29, in from .evaluation_suite import EvaluationSuite File "/opt/conda/lib/python3.8/site-packages/evaluate/evaluation_suite/init.py",
line 7, in from datasets import Dataset, DownloadMode, load_dataset

Is it possible to run training job in sagemaker pipeline to train using Setfit method?

@miteshkotak
Copy link
Author

Tagging you both here @philschmid @nickprock, as i think both of might have quick feedback for me.
Many thanks in advance :)

@nickprock
Copy link

nickprock commented Oct 13, 2023

Hi @miteshkotak ,
it's hard to tell from this error for me.
I used sagemaker library only for deploying from S3 never for train but I think it can be done.
Check this notebook in cell 10.
I think you need the requirements.txt file to import setfit to do the training of custom models.
@philschmid will surely be able to tell you more.

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