Skip to content

Commit

Permalink
Merge branch 'release_05'
Browse files Browse the repository at this point in the history
  • Loading branch information
brettinanl committed Jun 6, 2022
2 parents 7d50c4f + b6ab4ff commit f6a3da8
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions common/parsing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,48 +19,48 @@
"name": "config_file",
"type": str,
"default": argparse.SUPPRESS,
"help": "specify model configuration file",
"help": "Specify alternate model configuration file",
},
{
"name": "data_type",
"abv": "d",
"type": str,
"default": argparse.SUPPRESS,
"choices": ["f16", "f32", "f64"],
"help": "default floating point.",
"help": "Specify default floating points precision",
},
{
"name": "rng_seed",
"abv": "r",
"type": int,
"default": argparse.SUPPRESS,
"help": "random number generator seed.",
"help": "Random number generator seed",
},
{
"name": "train_bool",
"type": hutils.str2bool,
"default": True,
"help": "train model.",
"help": "Flag to toggle model training",
},
{
"name": "eval_bool",
"type": hutils.str2bool,
"default": argparse.SUPPRESS,
"help": "evaluate model (use it for inference).",
"help": "Flag to evaluate model (use it for inference).",
},
{
"name": "timeout",
"action": "store",
"type": int,
"default": argparse.SUPPRESS,
"help": "seconds allowed to train model (default: no timeout).",
"help": "Maximum time in seconds allowed to train model (default: no timeout).",
},
{
"name": "gpus",
"nargs": "+",
"type": int,
"default": argparse.SUPPRESS,
"help": "set IDs of GPUs to use.",
"help": "Set IDs of GPUs to use.",
},
{
"name": "profiling",
Expand All @@ -77,64 +77,64 @@
"abv": "s",
"type": str,
"default": argparse.SUPPRESS,
"help": "file path to save model snapshots.",
"help": "File path to save model snapshots.",
},
{
"name": "model_name",
"type": str,
"default": argparse.SUPPRESS,
"help": "specify model name to use when building filenames for saving.",
"help": "Specify model name to use when building filenames for saving.",
},
{
"name": "home_dir",
"type": str,
"default": argparse.SUPPRESS,
"help": "set home directory.",
"help": "Set home directory.",
},
{
"name": "train_data",
"action": "store",
"type": str,
"default": argparse.SUPPRESS,
"help": "training data filename.",
"help": "Training data filename.",
},
{
"name": "val_data",
"action": "store",
"type": str,
"default": argparse.SUPPRESS,
"help": "validation data filename.",
"help": "Validation data filename.",
},
{
"name": "test_data",
"type": str,
"action": "store",
"default": argparse.SUPPRESS,
"help": "testing data filename.",
"help": "Testing data filename.",
},
{
"name": "output_dir",
"type": str,
"default": argparse.SUPPRESS,
"help": "output directory.",
"help": "Set output directory.",
},
{
"name": "data_url",
"type": str,
"default": argparse.SUPPRESS,
"help": "set data source url.",
"help": "Set data source url.",
},
{
"name": "experiment_id",
"type": str,
"default": "EXP000",
"help": "set the experiment unique identifier.",
"help": "Set the experiment unique identifier.",
},
{
"name": "run_id",
"type": str,
"default": "RUN000",
"help": "set the run unique identifier.",
"help": "Set the run unique identifier.",
},
]

Expand All @@ -144,7 +144,7 @@
"abv": "v",
"type": hutils.str2bool,
"default": False,
"help": "increase output verbosity.",
"help": "Increase output verbosity.",
},
{"name": "logfile", "abv": "l", "type": str, "default": None, "help": "log file"},
]
Expand All @@ -155,19 +155,19 @@
"type": str,
"default": argparse.SUPPRESS,
"choices": ["minabs", "minmax", "std", "none"],
"help": "type of feature scaling; 'minabs': to [-1,1]; 'minmax': to [0,1], 'std': standard unit normalization; 'none': no normalization.",
"help": "Type of feature scaling; 'minabs': to [-1,1]; 'minmax': to [0,1], 'std': standard unit normalization; 'none': no normalization.",
},
{
"name": "shuffle",
"type": hutils.str2bool,
"default": False,
"help": "randomly shuffle data set (produces different training and testing partitions each run depending on the seed)",
"help": "Randomly shuffle data set (produces different training and testing partitions each run depending on the seed)",
},
{
"name": "feature_subsample",
"type": int,
"default": argparse.SUPPRESS,
"help": "number of features to randomly sample from each category (cellline expression, drug descriptors, etc), 0 means using all features",
"help": "Number of features to randomly sample from each category (cellline expression, drug descriptors, etc), 0 means using all features",
},
]

Expand All @@ -176,83 +176,83 @@
"name": "dense",
"nargs": "+",
"type": int,
"help": "number of units in fully connected layers in an integer array.",
"help": "Number of units in fully connected layers in an integer array.",
},
{
"name": "conv",
"nargs": "+",
"type": int,
"default": argparse.SUPPRESS,
"help": "integer array describing convolution layers: conv1_filters, conv1_filter_len, conv1_stride, conv2_filters, conv2_filter_len, conv2_stride ....",
"help": "Integer array describing convolution layers: conv1_filters, conv1_filter_len, conv1_stride, conv2_filters, conv2_filter_len, conv2_stride ....",
},
{
"name": "locally_connected",
"type": hutils.str2bool,
"default": argparse.SUPPRESS,
"help": "use locally connected layers instead of convolution layers.",
"help": "Use locally connected layers instead of convolution layers.",
},
{
"name": "activation",
"abv": "a",
"type": str,
"default": argparse.SUPPRESS,
"help": "keras activation function to use in inner layers: relu, tanh, sigmoid...",
"help": "Activation function to use in inner layers: relu, tanh, sigmoid...",
},
{
"name": "out_activation",
"type": str,
"default": argparse.SUPPRESS,
"help": "keras activation function to use in out layer: softmax, linear, ...",
"help": "Activation function to use in out layer: softmax, linear, ...",
},
{
"name": "lstm_size",
"nargs": "+",
"type": int,
"default": argparse.SUPPRESS,
"help": "integer array describing size of LSTM internal state per layer.",
"help": "Integer array describing size of LSTM internal state per layer.",
},
{
"name": "recurrent_dropout",
"action": "store",
"type": float,
"default": argparse.SUPPRESS,
"help": "ratio of recurrent dropout.",
"help": "Ratio of recurrent dropout.",
},
{
"name": "dropout",
"type": float,
"default": argparse.SUPPRESS,
"help": "ratio of dropout used in fully connected layers.",
"help": "Ratio of dropout used in fully connected layers.",
},
{
"name": "pool",
"type": int,
"default": argparse.SUPPRESS,
"help": "pooling layer length.",
"help": "Pooling layer length.",
},
{
"name": "batch_normalization",
"type": hutils.str2bool,
"default": argparse.SUPPRESS,
"help": "use batch normalization.",
"help": "Use batch normalization.",
},
{
"name": "loss",
"type": str,
"default": argparse.SUPPRESS,
"help": "keras loss function to use: mse, ...",
"help": "Loss function to use: mse, ...",
},
{
"name": "optimizer",
"type": str,
"default": argparse.SUPPRESS,
"help": "keras optimizer to use: sgd, rmsprop, ...",
"help": "Optimizer to use: sgd, rmsprop, ...",
},
{
"name": "metrics",
"type": str,
"default": argparse.SUPPRESS,
"help": "metrics to evaluate performance: accuracy, ...",
"help": "Metrics to evaluate performance: accuracy, ...",
},
]

Expand All @@ -262,33 +262,33 @@
"type": int,
"abv": "e",
"default": argparse.SUPPRESS,
"help": "number of training epochs.",
"help": "Number of training epochs.",
},
{
"name": "batch_size",
"type": int,
"abv": "z",
"default": argparse.SUPPRESS,
"help": "batch size.",
"help": "Batch size.",
},
{
"name": "learning_rate",
"abv": "lr",
"type": float,
"default": argparse.SUPPRESS,
"help": "overrides the learning rate for training.",
"help": "Overrides the default learning rate for training.",
},
{
"name": "early_stop",
"type": hutils.str2bool,
"default": argparse.SUPPRESS,
"help": "activates keras callback for early stopping of training in function of the monitored variable specified.",
"help": "Activates keras callback for early stopping of training in function of the monitored variable specified.",
},
{
"name": "momentum",
"type": float,
"default": argparse.SUPPRESS,
"help": "overrides the momentum to use in the SGD optimizer when training.",
"help": "Overrides the default momentum to use in the SGD optimizer when training.",
},
{
"name": "initialization",
Expand All @@ -303,43 +303,43 @@
"lecun_uniform",
"he_normal",
],
"help": "type of weight initialization; 'constant': to 0; 'uniform': to [-0.05,0.05], 'normal': mean 0, stddev 0.05; 'glorot_uniform': [-lim,lim] with lim = sqrt(6/(fan_in+fan_out)); 'lecun_uniform' : [-lim,lim] with lim = sqrt(3/fan_in); 'he_normal' : mean 0, stddev sqrt(2/fan_in).",
"help": "Type of weight initialization; 'constant': to 0; 'uniform': to [-0.05,0.05], 'normal': mean 0, stddev 0.05; 'glorot_uniform': [-lim,lim] with lim = sqrt(6/(fan_in+fan_out)); 'lecun_uniform' : [-lim,lim] with lim = sqrt(3/fan_in); 'he_normal' : mean 0, stddev sqrt(2/fan_in).",
},
{
"name": "val_split",
"type": float,
"default": argparse.SUPPRESS,
"help": "fraction of data to use in validation.",
"help": "Fraction of data to use in validation.",
},
{
"name": "train_steps",
"type": int,
"default": argparse.SUPPRESS,
"help": "overrides the number of training batches per epoch if set to nonzero.",
"help": "Overrides the number of training batches per epoch if set to nonzero.",
},
{
"name": "val_steps",
"type": int,
"default": argparse.SUPPRESS,
"help": "overrides the number of validation batches per epoch if set to nonzero.",
"help": "Overrides the number of validation batches per epoch if set to nonzero.",
},
{
"name": "test_steps",
"type": int,
"default": argparse.SUPPRESS,
"help": "overrides the number of test batches per epoch if set to nonzero.",
"help": "Overrides the number of test batches per epoch if set to nonzero.",
},
{
"name": "train_samples",
"type": int,
"default": argparse.SUPPRESS,
"help": "overrides the number of training samples if set to nonzero.",
"help": "Overrides the number of training samples if set to nonzero.",
},
{
"name": "val_samples",
"type": int,
"default": argparse.SUPPRESS,
"help": "overrides the number of validation samples if set to nonzero.",
"help": "Overrides the number of validation samples if set to nonzero.",
},
]

Expand All @@ -362,19 +362,19 @@
"name": "clr_base_lr",
"type": float,
"default": argparse.SUPPRESS,
"help": "Base lr for cycle lr.",
"help": "Base lr for cyclic lr.",
},
{
"name": "clr_max_lr",
"type": float,
"default": argparse.SUPPRESS,
"help": "Max lr for cycle lr.",
"help": "Max lr for cyclic lr.",
},
{
"name": "clr_gamma",
"type": float,
"default": argparse.SUPPRESS,
"help": "Gamma parameter for learning cycle LR.",
"help": "Gamma parameter for cyclic LR.",
},
]

Expand Down

0 comments on commit f6a3da8

Please sign in to comment.