[Docs] Fix warnings in mkdocs build (continued) (#24791)

Signed-off-by: Zerohertz <ohg3417@gmail.com>
This commit is contained in:
Hyogeun Oh (오효근)
2025-09-13 16:13:44 +09:00
committed by GitHub
parent 5febdc8750
commit 9a8966bcc2
27 changed files with 102 additions and 110 deletions

View File

@@ -679,20 +679,21 @@ def get_hf_file_to_dict(file_name: str,
@cache
def get_pooling_config(model: str, revision: Optional[str] = 'main'):
def get_pooling_config(model: str,
revision: Optional[str] = 'main') -> Optional[dict]:
"""
This function gets the pooling and normalize
config from the model - only applies to
sentence-transformers models.
Args:
model (str): The name of the Hugging Face model.
revision (str, optional): The specific version
of the model to use. Defaults to 'main'.
model: The name of the Hugging Face model.
revision: The specific version of the model to use.
Defaults to 'main'.
Returns:
dict: A dictionary containing the pooling
type and whether normalization is used.
A dictionary containing the pooling type and whether
normalization is used, or None if no pooling configuration is found.
"""
modules_file_name = "modules.json"