We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7887172 commit 8260f59Copy full SHA for 8260f59
src/lighteval/tasks/extended/ifeval/main.py
@@ -20,6 +20,8 @@
20
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
# SOFTWARE.
22
23
+import re
24
+
25
import numpy as np
26
from aenum import extend_enum
27
@@ -56,6 +58,7 @@ def ifeval_prompt(line, task_name: str = None):
56
58
57
59
def ifeval_metric(predictions: list[str], formatted_doc: Doc, **kwargs) -> dict:
60
response = predictions[0]
61
+ response = re.sub(r"(<think>)?[\s\S]*?<\/think>", "", response)
62
63
# Strict instructions
64
instruction_list = formatted_doc.specific["instructions_id_list"]
0 commit comments