Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
3c895d56
Commit
3c895d56
authored
Jun 21, 2023
by
lintangsutawika
Browse files
reformat
parent
3262fb74
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
lm_eval/tasks/hellaswag/hellaswag.yaml
lm_eval/tasks/hellaswag/hellaswag.yaml
+1
-1
lm_eval/utils.py
lm_eval/utils.py
+2
-0
No files found.
lm_eval/tasks/hellaswag/hellaswag.yaml
View file @
3c895d56
lm_eval/utils.py
View file @
3c895d56
...
@@ -398,10 +398,12 @@ def load_yaml_config(yaml_path):
...
@@ -398,10 +398,12 @@ def load_yaml_config(yaml_path):
return
final_yaml_config
return
final_yaml_config
return
yaml_config
return
yaml_config
def
regex_replace
(
string
,
pattern
,
repl
,
count
=
0
):
def
regex_replace
(
string
,
pattern
,
repl
,
count
=
0
):
"""Implements the `re.sub` function as a custom Jinja filter."""
"""Implements the `re.sub` function as a custom Jinja filter."""
return
re
.
sub
(
pattern
,
repl
,
string
,
count
=
count
)
return
re
.
sub
(
pattern
,
repl
,
string
,
count
=
count
)
env
=
Environment
(
loader
=
BaseLoader
,
undefined
=
StrictUndefined
)
env
=
Environment
(
loader
=
BaseLoader
,
undefined
=
StrictUndefined
)
env
.
filters
[
"regex_replace"
]
=
regex_replace
env
.
filters
[
"regex_replace"
]
=
regex_replace
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment