-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat: add 'Path' parameter for ModelCard template #3253
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
feat: add 'Path' parameter for ModelCard template #3253
Conversation
|
Hello! So I understand correctly, what do you intend to override exactly for PyLate? the If so, we might not have to introduce the Also, as a nit: the
|
|
Hey @tomaarsen, Thanks a lot for reaching out so quickly! The problem is with this line:
Overriding Thx for the hint! |
|
Basically, IIUC, right now the main issue is that we have to overwrite It was working before as I was overwriting Edit: thanks @sam-hey for looking into all of this btw! |
In ST it's (only) used in the inference snippet: I couldn't get it working in Jinja itself, so I used this trick instead: I think this implementation is quite neat, so I'm open to moving forward with this if @NohTow agrees that it would be valuable for simplifying PyLate. Also, apologies for the delay. I've been trying to focus on #3222 in preparation for a big v4.0 release.
|
|
Also, @NohTow, I'm guessing that you can just override
|
Well it allows us to not override a function just for this, so it is always good, as we saw it broke PyLate once!
As discussed, we can indeed just set it in the subclass and it should work nicely! |
|
Thanks for this! Once you move PyLate to ST v4.0+, you'll be able to start simplifying your code quite a bit :)
|
|
Hey Tom, Thanks a lot for merging! Looking forward to seeing more awesome work on ST :) Best |

Allowing users to pass the
Pathto a template to create the model card from it:SentenceTransformerModelCardData( model_card_template_path=...)This eliminates the need to override
_create_model_card(), making it easier forPyLate, and enables users to provide their own model template.cc @NohTow