Skip to content

Commit 61d828d

Browse files
committed
update: search by match
1 parent 99c2448 commit 61d828d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/distilabel/steps/tasks/complexity_scorer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def format_output(
185185
scores = []
186186
score_lines = output.split("\n")
187187
for i, line in enumerate(score_lines):
188-
match = _PARSE_SCORE_LINE_REGEX.match(line)
188+
match = _PARSE_SCORE_LINE_REGEX.search(line)
189189
score = float(match.group(1)) if match else None
190190
scores.append(score)
191191
if i == len(input["instructions"]) - 1:

src/distilabel/steps/tasks/sentence_transformers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def format_output(
346346
if self.use_default_structured_output:
347347
return self._format_structured_output(output)
348348

349-
match = POSITIVE_NEGATIVE_PAIR_REGEX.match(output)
349+
match = POSITIVE_NEGATIVE_PAIR_REGEX.search(output)
350350
if match is None:
351351
formatted_output = {"positive": None}
352352
if self.triplet:

0 commit comments

Comments
 (0)