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
0ed5527a
Commit
0ed5527a
authored
Sep 14, 2023
by
Chris
Browse files
Fix "local variable 'docs' referenced before assignment" error in write_out.py
parent
6ba2a2b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
scripts/write_out.py
scripts/write_out.py
+3
-1
No files found.
scripts/write_out.py
View file @
0ed5527a
...
@@ -38,13 +38,15 @@ def main():
...
@@ -38,13 +38,15 @@ def main():
iters
=
[]
iters
=
[]
for
set
in
args
.
sets
.
split
(
","
):
for
set
in
args
.
sets
.
split
(
","
):
docs
=
None
if
set
==
"train"
and
task
.
has_training_docs
():
if
set
==
"train"
and
task
.
has_training_docs
():
docs
=
task
.
training_docs
()
docs
=
task
.
training_docs
()
if
set
==
"val"
and
task
.
has_validation_docs
():
if
set
==
"val"
and
task
.
has_validation_docs
():
docs
=
task
.
validation_docs
()
docs
=
task
.
validation_docs
()
if
set
==
"test"
and
task
.
has_test_docs
():
if
set
==
"test"
and
task
.
has_test_docs
():
docs
=
task
.
test_docs
()
docs
=
task
.
test_docs
()
iters
.
append
(
docs
)
if
docs
is
not
None
:
iters
.
append
(
docs
)
docs
=
join_iters
(
iters
)
docs
=
join_iters
(
iters
)
...
...
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