MCPcopy Index your code
hub / github.com/deepspeedai/DeepSpeedExamples / get_argument_parser

Function get_argument_parser

bing_bert/utils.py:6–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6def get_argument_parser():
7 parser = argparse.ArgumentParser()
8
9 # Required_parameter
10 parser.add_argument("--config-file", "--cf",
11 help="pointer to the configuration file of the experiment", type=str, required=True)
12 parser.add_argument("--output_dir", default=None, type=str, required=True,
13 help="The output directory where the model checkpoints will be written.")
14
15 # Optional Params
16 parser.add_argument("--max_seq_length", default=512, type=int,
17 help="The maximum total input sequence length after WordPiece tokenization. Sequences "
18 "longer than this will be truncated, and sequences shorter than this will be padded.")
19 parser.add_argument("--max_predictions_per_seq", "--max_pred", default=80, type=int,
20 help="The maximum number of masked tokens in a sequence to be predicted.")
21 parser.add_argument('--seed',
22 type=int,
23 default=42,
24 help="random seed for initialization")
25
26 parser.add_argument("--do_lower_case",
27 default=True,
28 action='store_true',
29 help="Whether to lower case the input text. True for uncased models, False for cased models.")
30 parser.add_argument("--local_rank",
31 type=int,
32 default=-1,
33 help="local_rank for distributed training on gpus")
34
35 parser.add_argument('--use_pretrain',
36 default=False,
37 action='store_true',
38 help="Whether to use Bert Pretrain Weights or not")
39
40 parser.add_argument('--refresh_bucket_size',
41 type=int,
42 default=1,
43 help="This param makes sure that a certain task is repeated for this time steps to \
44 optimise on the back propogation speed with APEX's DistributedDataParallel")
45 parser.add_argument('--finetune',
46 default=False,
47 action='store_true',
48 help="Whether to finetune only")
49
50 parser.add_argument('--load_training_checkpoint', '--load_cp',
51 type=str,
52 default=None,
53 help="This is the path to the TAR file which contains model+opt state_dict() checkpointed.")
54 parser.add_argument('--load_checkpoint_id', '--load_cp_id',
55 type=str,
56 default=None,
57 help='Checkpoint identifier to load from checkpoint path')
58 parser.add_argument('--job_name',
59 type=str,
60 default=None,
61 help="This is the path to store the output and TensorBoard results.")
62
63 parser.add_argument('--rewarmup',

Callers 1

get_argumentsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected