output type

This commit is contained in:
shitao 2024-06-29 15:37:22 +08:00
parent 6470527749
commit 681f615622
2 changed files with 7 additions and 7 deletions

View File

@ -367,8 +367,8 @@ class FlagLLMReranker:
if normalize:
all_scores = [sigmoid(score) for score in all_scores]
if len(all_scores) == 1:
return all_scores[0]
# if len(all_scores) == 1:
# return all_scores[0]
return all_scores
@ -560,10 +560,10 @@ class LayerWiseFlagLLMReranker:
if normalize:
all_scores[i] = [sigmoid(score) for score in all_scores[i]]
if len(all_scores) == 1:
if len(all_scores[0]) == 1:
return all_scores[0][0]
return all_scores[0]
# if len(all_scores) == 1:
# if len(all_scores[0]) == 1:
# return all_scores[0][0]
# return all_scores[0]
return all_scores

View File

@ -5,7 +5,7 @@ with open("README.md", mode="r", encoding="utf-8") as readme_file:
setup(
name='LM_Cocktail',
version='0.0.4',
version='0.0.5',
description='LM_Cocktail',
long_description=readme,
long_description_content_type="text/markdown",