[Misc] Added missing return type annotations to improve mypy and IDE tooling (#43383)
Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
This commit is contained in:
@@ -108,7 +108,9 @@ class MeanPool(SequencePoolingMethod):
|
||||
return segment_sums / prompt_lens.unsqueeze(1)
|
||||
|
||||
|
||||
def get_seq_pooling_method(pooling_type: SequencePoolingType | str):
|
||||
def get_seq_pooling_method(
|
||||
pooling_type: SequencePoolingType | str,
|
||||
) -> SequencePoolingMethod:
|
||||
if pooling_type == "CLS":
|
||||
return CLSPool()
|
||||
if pooling_type == "LAST":
|
||||
|
||||
Reference in New Issue
Block a user