Skip to content

Commit ff2cf24

Browse files
authored
Rename text-ranking to former sentence-ranking (#117)
1 parent 4c39a6e commit ff2cf24

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# We don't declare our dependency on transformers here because we build with
66
# different packages for different variants
77

8-
VERSION = "0.5.5"
8+
VERSION = "0.5.6"
99

1010
# Ubuntu packages
1111
# libsndfile1-dev: torchaudio requires the development version of the libsndfile package which can be installed via a system package manager. On Ubuntu it can be installed as follows: apt install libsndfile1-dev

src/huggingface_inference_toolkit/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _load_repository_from_hf(
134134

135135
# create regex to only include the framework specific weights
136136
ignore_regex = create_artifact_filter(framework)
137-
logger.info(f"Ignore regex pattern for files, which are not downloaded: { ', '.join(ignore_regex) }")
137+
logger.info(f"Ignore regex pattern for files, which are not downloaded: {', '.join(ignore_regex)}")
138138

139139
# Download the repository to the workdir and filter out non-framework
140140
# specific weights
@@ -244,7 +244,10 @@ def get_pipeline(
244244
"sentence-similarity",
245245
"sentence-embeddings",
246246
"sentence-ranking",
247+
"text-ranking",
247248
]:
249+
if task == "text-ranking":
250+
task = "sentence-ranking"
248251
hf_pipeline = get_sentence_transformers_pipeline(task=task, model_dir=model_dir, device=device, **kwargs)
249252
elif is_diffusers_available() and task == "text-to-image":
250253
hf_pipeline = get_diffusers_pipeline(task=task, model_dir=model_dir, device=device, **kwargs)

0 commit comments

Comments
 (0)