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

Add "generated_from_trainer" tag to auto-generated model cards #2710

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

tomaarsen
Copy link
Collaborator

Hello!

Pull Request overview

  • Add "generated_from_trainer" tag to auto-generated model cards

Details

This allows us to more easily track models and allows others to easily check out other models trained with ST v3.0.0.

cc @osanseviero

  • Tom Aarsen

@@ -283,6 +283,7 @@ class SentenceTransformerModelCardData(CardData):
"sentence-transformers",
"sentence-similarity",
"feature-extraction",
"generated_from_trainer",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one should be part of the SentenceTransformerTrainer rather than default model card (or have a check here so it's only added if it's being used with the trainer

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The model card is only generated if:

  1. the SentenceTransformerTrainer has been initialized with this model, or
  2. the loaded model wasn't a Sentence Transformer model

Otherwise, the original model card gets reused. E.g. if you load and save/upload BAAI/bge-base-en-v1.5 without training then it'll reuse that model card.

So, we would only get generated_with_trainer "wrongly" if someone loads a non-Sentence Transformer model, doesn't train it, and then uploads it. That said, I think this is really easy to fix, so I'll change it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved this via 10d70ff

@tomaarsen tomaarsen merged commit aa57232 into UKPLab:master Jun 4, 2024
9 checks passed
@tomaarsen tomaarsen deleted the add_generated_from_trainer_tag branch June 4, 2024 20:41
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

Successfully merging this pull request may close these issues.

2 participants