Skip to content

Commit

Permalink
Fix edge case on Windows with model filename being ignored & reexporting
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaarsen committed Oct 28, 2024
1 parent 82096cf commit f0a48db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sentence_transformers/models/Transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def _backend_should_export(

file_name = model_args.get("file_name", target_file_name)
subfolder = model_args.get("subfolder", None)
primary_full_path = Path(subfolder, file_name).as_posix() if subfolder else file_name
primary_full_path = Path(subfolder, file_name).as_posix() if subfolder else Path(file_name).as_posix()
secondary_full_path = (
Path(subfolder, self.backend, file_name).as_posix()
if subfolder
Expand Down

0 comments on commit f0a48db

Please sign in to comment.