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
d6030e12
"sgl-router/src/protocols/classify.rs" did not exist on "4c9bcb9d5679aa90fc0813861c41bf2a76975f58"
Commit
d6030e12
authored
Aug 16, 2023
by
lintangsutawika
Browse files
reformat
parent
db37024b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
lm_eval/api/task.py
lm_eval/api/task.py
+6
-2
No files found.
lm_eval/api/task.py
View file @
d6030e12
...
@@ -793,7 +793,11 @@ class ConfigurableTask(Task):
...
@@ -793,7 +793,11 @@ class ConfigurableTask(Task):
target_string
=
utils
.
apply_template
(
doc_to_target
,
doc
)
target_string
=
utils
.
apply_template
(
doc_to_target
,
doc
)
if
target_string
.
isdigit
():
if
target_string
.
isdigit
():
return
ast
.
literal_eval
(
target_string
)
return
ast
.
literal_eval
(
target_string
)
elif
len
(
target_string
)
>=
2
and
(
target_string
[
0
]
==
"["
)
and
(
target_string
[
-
1
]
==
"]"
):
elif
(
len
(
target_string
)
>=
2
and
(
target_string
[
0
]
==
"["
)
and
(
target_string
[
-
1
]
==
"]"
)
):
return
ast
.
literal_eval
(
target_string
)
return
ast
.
literal_eval
(
target_string
)
else
:
else
:
return
target_string
return
target_string
...
...
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