Skip to content

Commit b8ab627

Browse files
committed
Print the defaults as part of the argparse --help for the huggingface push scripts
1 parent 3b62820 commit b8ab627

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hugging_corenlp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def write_model_card(repo_local_path, lang, model):
6464
f.write(get_model_card(lang, model))
6565

6666
def parse_args():
67-
parser = argparse.ArgumentParser()
67+
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
6868
# "/home/john/extern_data/corenlp/"
6969
parser.add_argument('--input_dir', type=str, default="/u/nlp/data/StanfordCoreNLPModels", help='Directory for loading the CoreNLP models')
7070
# "/home/john/huggingface/hub"

hugging_stanza.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def write_model_card(repo_local_path, model):
5050
f.write(get_model_card(model))
5151

5252
def parse_args():
53-
parser = argparse.ArgumentParser()
53+
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
5454
parser.add_argument('--input_dir', type=str, default="/u/nlp/software/stanza/models/1.5.0", help='Directory for loading the stanza models')
5555
parser.add_argument('--version', type=str, default="1.5.0", help='Version of stanza models to upload')
5656
parser.add_argument('lang', nargs='*', help='List of languages. Will default to all languages')

0 commit comments

Comments
 (0)