[Docs] Fix warnings in mkdocs build (continued) (#24791)
Signed-off-by: Zerohertz <ohg3417@gmail.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user