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
c40a012a
Commit
c40a012a
authored
Jul 14, 2025
by
Baber
Browse files
refactor: remove root_dir in iglob
parent
bfaf24cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+5
-3
No files found.
lm_eval/tasks/__init__.py
View file @
c40a012a
...
@@ -291,11 +291,13 @@ def iter_yaml_files(root: Path, ignore=_IGNORE_DIRS) -> Generator[Path, Any, Non
...
@@ -291,11 +291,13 @@ def iter_yaml_files(root: Path, ignore=_IGNORE_DIRS) -> Generator[Path, Any, Non
>>> for yaml_file in iter_yaml_files(Path("tasks")):
>>> for yaml_file in iter_yaml_files(Path("tasks")):
... print(f"Found task config: {yaml_file}")
... print(f"Found task config: {yaml_file}")
"""
"""
for
p
in
iglob
(
"**/*.yaml"
,
root_dir
=
root
,
recursive
=
True
):
for
p
in
iglob
(
str
(
root
/
"**/*.yaml"
)
,
recursive
=
True
):
# ignore check
# ignore check
if
Path
(
p
).
parts
[
0
]
in
ignore
:
path
=
Path
(
p
)
# Check if any parent directory is in the ignore list
if
any
(
part
in
ignore
for
part
in
path
.
parts
):
continue
continue
yield
root
/
p
yield
path
class
TaskManager
:
class
TaskManager
:
...
...
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