Skip to content

Commit 317b012

Browse files
Update keras_rs/src/losses/lambda_weights.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 3912fb9 commit 317b012

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

keras_rs/src/losses/lambda_weights.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def pair_weights(self, labels, ranks):
154154
"""
155155
raise NotImplementedError('Calling an abstract method.')
156156

157-
#@abc.abstractmethod
157+
@abc.abstractmethod
158158
def individual_weights(self, labels, ranks):
159159
"""Returns the weight tensor for individual examples.
160160
@@ -166,7 +166,7 @@ def individual_weights(self, labels, ranks):
166166
Returns:
167167
A tensor that can weight individual examples with shape [batch_size, list_size].
168168
"""
169-
return labels
169+
raise NotImplementedError('Calling an abstract method.')
170170

171171
class LabelDiffLambdaWeight(LambdaWeight):
172172
"""A simple LambdaWeight to compute the pair label difference."""

0 commit comments

Comments
 (0)