Add `save_in_root` to the custom Module to allow saving & loading locally
#17
by
tomaarsen
HF staff
- opened
Hello!
Pull Request overview
- Add
save_in_root
to the custom Module to allow saving & loading locally
Details
Just like in jina-embeddings-v3, we can add save_in_root = True
to ensure that this module is saved in the root of the directory. This is required because transformers
expects any custom modeling files (such as custom_st.py
itself) to be in the root. Without this change, we'll get this after saving with Sentence Transformers:
With this change in place, we'll instead get this:
and then you'll be able to save and load this correctly in Sentence Transformers.
- Tom Aarsen
looks good ๐ฅ
gmastrapas
changed pull request status to
merged