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
46cb513b
"stubs/torch/vscode:/vscode.git/clone" did not exist on "35d4129f81523c279fac193cffc909bb8214acec"
Commit
46cb513b
authored
Jan 17, 2025
by
Baber
Browse files
handle None
parent
2b56339e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lm_eval/utils.py
lm_eval/utils.py
+4
-2
No files found.
lm_eval/utils.py
View file @
46cb513b
...
@@ -10,7 +10,7 @@ import os
...
@@ -10,7 +10,7 @@ import os
import
re
import
re
from
dataclasses
import
asdict
,
is_dataclass
from
dataclasses
import
asdict
,
is_dataclass
from
itertools
import
islice
from
itertools
import
islice
from
typing
import
Any
,
Callable
,
Generator
,
List
,
Tuple
from
typing
import
Any
,
Callable
,
Generator
,
List
,
Optional
,
Tuple
import
numpy
as
np
import
numpy
as
np
import
yaml
import
yaml
...
@@ -93,12 +93,14 @@ def sanitize_list(sub):
...
@@ -93,12 +93,14 @@ def sanitize_list(sub):
return
str
(
sub
)
return
str
(
sub
)
def
simple_parse_args_string
(
args_string
)
:
def
simple_parse_args_string
(
args_string
:
Optional
[
str
])
->
dict
:
"""
"""
Parses something like
Parses something like
args1=val1,arg2=val2
args1=val1,arg2=val2
Into a dictionary
Into a dictionary
"""
"""
if
args_string
is
None
:
return
{}
args_string
=
args_string
.
strip
()
args_string
=
args_string
.
strip
()
if
not
args_string
:
if
not
args_string
:
return
{}
return
{}
...
...
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