Skip to content

Commit 538f803

Browse files
committed
compare file sets, not lists in tests
Signed-off-by: HenryL27 <[email protected]>
1 parent 9426cd6 commit 538f803

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/ml_models/test_crossencodermodel_pytest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@pytest.fixture(scope="function")
2222
def tinybert() -> CrossEncoderModel:
23-
model = CrossEncoderModel("cross-encoder/ms-marco-TinyBERT-L-2-v2")
23+
model = CrossEncoderModel("cross-encoder/ms-marco-TinyBERT-L-2-v2", overwrite=True)
2424
yield model
2525
shutil.rmtree(
2626
"/tmp/models/cross-encoder/ms-marco-TinyBert-L-2-v2", ignore_errors=True
@@ -32,7 +32,7 @@ def test_pt_has_correct_files(tinybert):
3232
config_path = tinybert.make_model_config_json()
3333
compare_model_zip_file(
3434
zip_file_path=zip_path,
35-
expected_filenames=["ms-marco-TinyBERT-L-2-v2.pt", "tokenizer.json", "LICENSE"],
35+
expected_filenames={"ms-marco-TinyBERT-L-2-v2.pt", "tokenizer.json", "LICENSE"},
3636
model_format="TORCH_SCRIPT",
3737
)
3838
compare_model_config(
@@ -52,11 +52,11 @@ def test_onnx_has_correct_files(tinybert):
5252
config_path = tinybert.make_model_config_json()
5353
compare_model_zip_file(
5454
zip_file_path=zip_path,
55-
expected_filenames=[
55+
expected_filenames={
5656
"ms-marco-TinyBERT-L-2-v2.onnx",
5757
"tokenizer.json",
5858
"LICENSE",
59-
],
59+
},
6060
model_format="ONNX",
6161
)
6262
compare_model_config(
@@ -78,7 +78,7 @@ def test_can_pick_names_for_files(tinybert):
7878
)
7979
compare_model_zip_file(
8080
zip_file_path=zip_path,
81-
expected_filenames=["funky-model-filename.pt", "tokenizer.json", "LICENSE"],
81+
expected_filenames={"funky-model-filename.pt", "tokenizer.json", "LICENSE"},
8282
model_format="TORCH_SCRIPT",
8383
)
8484
compare_model_config(

0 commit comments

Comments
 (0)