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
57569bbb
Unverified
Commit
57569bbb
authored
Feb 27, 2022
by
Leo Gao
Committed by
GitHub
Feb 27, 2022
Browse files
remove flags
parent
bf19a7a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
17 deletions
+0
-17
main.py
main.py
+0
-17
No files found.
main.py
View file @
57569bbb
...
...
@@ -35,25 +35,12 @@ def parse_args():
parser
.
add_argument
(
'--output_path'
,
default
=
None
)
parser
.
add_argument
(
'--limit'
,
type
=
int
,
default
=
None
)
parser
.
add_argument
(
'--no_cache'
,
action
=
"store_true"
)
parser
.
add_argument
(
'--decontaminate'
,
action
=
"store_true"
)
parser
.
add_argument
(
'--decontaminate_ngrams_path'
,
default
=
None
)
parser
.
add_argument
(
'--decontaminate_ngrams_n_size'
,
type
=
int
,
default
=
None
)
parser
.
add_argument
(
'--description_dict_path'
,
default
=
None
)
parser
.
add_argument
(
'--check_integrity'
,
action
=
"store_true"
)
return
parser
.
parse_args
()
def
ensure_correct_decontamination_params
(
args
):
valid
=
True
if
args
.
decontaminate
:
if
not
args
.
decontaminate_ngrams_n_size
:
print
(
"Please specify n size of training set n-grams. (--ngrams_n_size)"
)
valid
=
False
if
not
args
.
decontaminate_ngrams_path
:
print
(
"Please specify path containing training set n-grams. (--ngrams_path)"
)
valid
=
False
return
valid
# Returns a list containing all values of the source_list that
# match at least one of the patterns
...
...
@@ -66,8 +53,6 @@ def pattern_match(patterns, source_list):
def
main
():
args
=
parse_args
()
if
not
ensure_correct_decontamination_params
(
args
):
return
assert
not
args
.
provide_description
# not implemented
...
...
@@ -96,9 +81,7 @@ def main():
no_cache
=
args
.
no_cache
,
limit
=
args
.
limit
,
description_dict
=
description_dict
,
decontaminate
=
args
.
decontaminate
,
decontaminate_ngrams_path
=
args
.
decontaminate_ngrams_path
,
decontaminate_ngrams_n_size
=
args
.
decontaminate_ngrams_n_size
check_integrity
=
args
.
check_integrity
)
...
...
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