"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e81cb010f8d68ef7317f66ae727e52098f8ae1ab"
Unverified Commit 00fc9217 authored by Rahul A R's avatar Rahul A R Committed by GitHub
Browse files

Fixed bug which caused overwrite_cache to always be True (#19000)

* fixed bug which caused overwrite_cache to always be True (#18967).

* reformatting changes
parent 420f6c5e
...@@ -183,7 +183,7 @@ def parse_args(): ...@@ -183,7 +183,7 @@ def parse_args():
help="The number of processes to use for the preprocessing.", help="The number of processes to use for the preprocessing.",
) )
parser.add_argument( parser.add_argument(
"--overwrite_cache", type=bool, default=False, help="Overwrite the cached training and evaluation sets" "--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets"
) )
parser.add_argument( parser.add_argument(
"--no_keep_linebreaks", action="store_true", help="Do not keep line breaks when using TXT files." "--no_keep_linebreaks", action="store_true", help="Do not keep line breaks when using TXT files."
......
...@@ -190,7 +190,7 @@ def parse_args(): ...@@ -190,7 +190,7 @@ def parse_args():
help="The number of processes to use for the preprocessing.", help="The number of processes to use for the preprocessing.",
) )
parser.add_argument( parser.add_argument(
"--overwrite_cache", type=bool, default=False, help="Overwrite the cached training and evaluation sets" "--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets"
) )
parser.add_argument( parser.add_argument(
"--mlm_probability", type=float, default=0.15, help="Ratio of tokens to mask for masked language modeling loss" "--mlm_probability", type=float, default=0.15, help="Ratio of tokens to mask for masked language modeling loss"
......
...@@ -232,7 +232,7 @@ def parse_args(): ...@@ -232,7 +232,7 @@ def parse_args():
), ),
) )
parser.add_argument( parser.add_argument(
"--overwrite_cache", type=bool, default=False, help="Overwrite the cached training and evaluation sets" "--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets"
) )
parser.add_argument( parser.add_argument(
"--max_predict_samples", "--max_predict_samples",
......
...@@ -253,7 +253,7 @@ def parse_args(): ...@@ -253,7 +253,7 @@ def parse_args():
), ),
) )
parser.add_argument( parser.add_argument(
"--overwrite_cache", type=bool, default=False, help="Overwrite the cached training and evaluation sets" "--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets"
) )
parser.add_argument( parser.add_argument(
"--max_predict_samples", "--max_predict_samples",
......
...@@ -138,7 +138,7 @@ def parse_args(): ...@@ -138,7 +138,7 @@ def parse_args():
help="The number of processes to use for the preprocessing.", help="The number of processes to use for the preprocessing.",
) )
parser.add_argument( parser.add_argument(
"--overwrite_cache", type=bool, default=None, help="Overwrite the cached training and evaluation sets" "--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets"
) )
parser.add_argument( parser.add_argument(
"--max_target_length", "--max_target_length",
......
...@@ -168,7 +168,7 @@ def parse_args(): ...@@ -168,7 +168,7 @@ def parse_args():
help="The number of processes to use for the preprocessing.", help="The number of processes to use for the preprocessing.",
) )
parser.add_argument( parser.add_argument(
"--overwrite_cache", type=bool, default=None, help="Overwrite the cached training and evaluation sets" "--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets"
) )
parser.add_argument( parser.add_argument(
"--max_length", "--max_length",
......
...@@ -135,9 +135,7 @@ parser.add_argument( ...@@ -135,9 +135,7 @@ parser.add_argument(
parser.add_argument( parser.add_argument(
"--preprocessing_num_workers", type=int, default=4, help="A csv or a json file containing the training data." "--preprocessing_num_workers", type=int, default=4, help="A csv or a json file containing the training data."
) )
parser.add_argument( parser.add_argument("--overwrite_cache", action="store_true", help="Overwrite the cached training and evaluation sets")
"--overwrite_cache", type=bool, default=False, help="Overwrite the cached training and evaluation sets"
)
parser.add_argument( parser.add_argument(
"--fp16", "--fp16",
action="store_true", action="store_true",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment