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
275857a1
Commit
275857a1
authored
May 13, 2023
by
lintangsutawika
Browse files
changes to import and loading yaml
parent
2196490c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
main.py
main.py
+3
-3
No files found.
main.py
View file @
275857a1
...
...
@@ -67,20 +67,20 @@ def main():
"WARNING: --limit SHOULD ONLY BE USED FOR TESTING. REAL METRICS SHOULD NOT BE COMPUTED USING LIMIT."
)
if
args
.
tasks
is
None
:
if
args
.
tasks
!=
None
:
if
os
.
path
.
isdir
(
args
.
tasks
):
import
glob
task_names
=
[]
yaml_path
=
os
.
path
.
join
(
args
.
tasks
,
"*.yaml"
)
for
yaml_file
in
glob
.
glob
(
yaml_path
):
config
=
utils
.
get_yaml_config
(
yaml_file
)
config
=
yaml
.
full_load
(
yaml_file
)
task_names
.
append
(
config
)
else
:
tasks_list
=
args
.
tasks
.
split
(
","
)
task_names
=
pattern_match
(
tasks_list
,
ALL_TASKS
)
for
task
in
[
task
for
task
in
tasks_list
if
task
not
in
task_names
]:
if
os
.
path
.
isfile
(
task
):
config
=
utils
.
get_yaml_config
(
config_files
)
config
=
utils
.
get_yaml_config
(
task
)
task_names
.
append
(
config
)
# # Tas
...
...
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