Skip to content

Commit

Permalink
Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaarsen committed Jun 4, 2024
1 parent 0dbd349 commit c1f22d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_sentence_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ def test_similarity_score_save(stsb_bert_tiny_model: SentenceTransformer) -> Non
dot_scores = model.similarity(embeddings, embeddings)
assert np.not_equal(cosine_scores, dot_scores).all()


def test_model_card_save_update_model_id(stsb_bert_tiny_model: SentenceTransformer) -> None:
model = stsb_bert_tiny_model
# Removing the saved model card will cause a fresh one to be generated when we save
Expand All @@ -578,7 +579,7 @@ def test_model_card_save_update_model_id(stsb_bert_tiny_model: SentenceTransform
# When we reload this saved model and then re-save it, we want to override the 'sentence_transformers_model_id'
# if we have it set
loaded_model = SentenceTransformer(tmp_folder)

with tempfile.TemporaryDirectory() as tmp_folder:
loaded_model.save(tmp_folder, model_name="test_user/test_model")

Expand Down

0 comments on commit c1f22d4

Please sign in to comment.