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
6e65ef38
Unverified
Commit
6e65ef38
authored
Jan 23, 2024
by
Baber Abbasi
Committed by
GitHub
Jan 23, 2024
Browse files
skip "benchmarks" in changed_tasks (#1336)
parent
84357a46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tests/utils.py
tests/utils.py
+3
-2
No files found.
tests/utils.py
View file @
6e65ef38
...
...
@@ -22,12 +22,13 @@ def load_changed_files(file_path: str) -> List[str]:
# checks the txt file for list of changed files.
# if file ends with .yaml then check yaml for task name
# if file ends with .py then parse the folder for all yaml files
# skips benchmarks folder
def
parser
(
full_path
:
List
[
str
])
->
List
[
str
]:
_output
=
set
()
for
x
in
full_path
:
if
x
.
endswith
(
".yaml"
):
if
x
.
endswith
(
".yaml"
)
and
"benchmarks"
not
in
x
:
_output
.
add
(
load_yaml_config
(
x
)[
"task"
])
elif
x
.
endswith
(
".py"
):
elif
x
.
endswith
(
".py"
)
and
"benchmarks"
not
in
x
:
path
=
[
str
(
x
)
for
x
in
(
list
(
Path
(
x
).
parent
.
glob
(
"*.yaml"
)))]
_output
|=
{
load_yaml_config
(
x
)[
"task"
]
for
x
in
path
}
return
list
(
_output
)
...
...
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