Skip to content

Commit

Permalink
fix DeprecationWarning: invalid escape sequence '\s' for whitespace…
Browse files Browse the repository at this point in the history
… filter (#2560)

* fix `DeprecationWarning: invalid escape sequence '\s'`

* add type hints

* Revert "add type hints"

This reverts commit 15d8abc.
  • Loading branch information
baberabb authored Dec 16, 2024
1 parent 0bfb022 commit 8d2f64c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lm_eval/filters/extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def filter_ignores(st):
fallback_regex = re.compile("|".join(fallback_regexes))
without_paren_fallback_regex = "|".join(without_paren_fallback_regexes)
without_paren_fallback_regex = re.compile(
f":[\s]*({without_paren_fallback_regex})"
rf":[\s]*({without_paren_fallback_regex})"
)

filtered = []
Expand Down

0 comments on commit 8d2f64c

Please sign in to comment.