def parse_arguments() -> argparse.Namespace: """Setup CLI interface""" parser = argparse.ArgumentParser(description="") parser.add_argument( "-et", "--evaluation_type", type=str, default="results", choices=[ "results", # "evaluate_batch_epoch", "attention_weights", # "make_plots_hypa", # "make_plots_clr", # "audio", "delete_bad_models", "evaluate_model_area", ], help="Which evaluation to perform", ) tra_types = [w for w in words_types.keys() if not w.startswith("_")] parser.add_argument( "-tw", "--train_words_type", type=str, default="f1", choices=tra_types, help="Words the dataset was trained on", ) rec_types = [w for w in words_types.keys() if not w.startswith("_")] rec_types.append("train") parser.add_argument( "-rw", "--rec_words_type", type=str, default="train", choices=rec_types, help="Words to record and test", ) parser.add_argument( "-mn", "--model_name", type=str, default="VAN_opa1_lr03_bs32_en15_dsaug07_wnum_noval", help="Which model to use", ) # last line to parse the args args = parser.parse_args() return args
def parse_arguments() -> argparse.Namespace: """Setup CLI interface""" parser = argparse.ArgumentParser(description="") parser.add_argument( "-et", "--evaluation_type", type=str, default="results", choices=[ "results", "evaluate_augmentation", "build_megacomparison_v01", "build_megacomparison_v02", "build_megacomparison_v03", "evaluate_loud_section", "evaluate_model_cm", "evaluate_model_cm_all", ], help="Which evaluation to perform", ) tra_types = [w for w in words_types.keys() if not w.startswith("_")] parser.add_argument( "-tw", "--train_words_type", type=str, default="f1", choices=tra_types, help="Words the dataset was trained on", ) rec_types = [w for w in words_types.keys() if not w.startswith("_")] rec_types.append("train") parser.add_argument( "-rw", "--rec_words_type", type=str, default="train", choices=rec_types, help="Words to record and test", ) parser.add_argument( "-mn", "--model_name", type=str, default="VAN_opa1_lr03_bs32_en15_dsaug07_wnum_noval", help="Which model to use", ) # last line to parse the args args = parser.parse_args() return args
def parse_arguments() -> argparse.Namespace: """Setup CLI interface""" parser = argparse.ArgumentParser(description="") parser.add_argument( "-et", "--evaluation_type", type=str, default="results", choices=[ "results", "model", "audio", "delete_bad_models", "make_plots_hypa", "make_plots", ], help="Which evaluation to perform", ) tra_types = [w for w in words_types.keys() if not w.startswith("_")] parser.add_argument( "-tw", "--train_words_type", type=str, default="f2", choices=tra_types, help="Words the dataset was trained on", ) rec_types = [w for w in words_types.keys() if not w.startswith("_")] rec_types.append("train") parser.add_argument( "-rw", "--rec_words_type", type=str, default="train", choices=rec_types, help="Words to record and test", ) parser.add_argument( "-dn", "--dataset_name", type=str, default="mel01", help="Name of the dataset folder", ) # last line to parse the args args = parser.parse_args() return args
def parse_arguments() -> argparse.Namespace: """Setup CLI interface""" parser = argparse.ArgumentParser(description="") parser.add_argument( "-pt", "--preprocess_type", type=str, default="test_audio_generator", choices=["test_get_generator_mean_var", "test_audio_generator"], help="Which preprocess to perform", ) tra_types = [w for w in words_types.keys() if not w.startswith("_")] parser.add_argument( "-wt", "--words_type", type=str, default="f2", choices=tra_types, help="Words to train on when testing", ) # last line to parse the args args = parser.parse_args() return args
def parse_arguments(): """Setup CLI interface""" parser = argparse.ArgumentParser(description="") parser.add_argument( "-et", "--evaluation_type", type=str, default="results", choices=[ "results", "evaluate_batch_epoch", "attention_weights", "make_plots_hypa", "make_plots_clr", "audio", "delete_bad_models", "compare_augmentation", ], help="Which evaluation to perform", ) tra_types = [w for w in words_types.keys() if not w.startswith("_")] parser.add_argument( "-tw", "--train_words_type", type=str, default="f2", choices=tra_types, help="Words the dataset was trained on", ) rec_types = [w for w in words_types.keys() if not w.startswith("_")] rec_types.append("train") parser.add_argument( "-rw", "--rec_words_type", type=str, default="train", choices=rec_types, help="Words to record and test", ) # last line to parse the args args = parser.parse_args() return args
def parse_arguments(): """Setup CLI interface""" parser = argparse.ArgumentParser(description="") parser.add_argument( "-tt", "--training_type", type=str, default="smallCNN", choices=["smallCNN"], help="Which training to execute", ) tra_types = [w for w in words_types.keys() if not w.startswith("_")] parser.add_argument( "-wt", "--words_type", type=str, default="f2", choices=tra_types, help="Words to preprocess", ) parser.add_argument( "-lrf", "--do_find_best_lr", dest="do_find_best_lr", action="store_true", help="Find the best values for the learning rate", ) parser.add_argument( "-ft", "--force_retrain", dest="force_retrain", action="store_true", help="Force the training and overwrite the previous results", ) parser.add_argument( "-nv", "--no_use_validation", dest="use_validation", action="store_false", help="Do not use validation data while training", ) parser.add_argument( "-dr", "--dry_run", action="store_true", help="Do a dry run for the hypa grid", ) # last line to parse the args args = parser.parse_args() return args
def parse_arguments() -> argparse.Namespace: """Setup CLI interface""" parser = argparse.ArgumentParser(description="") parser.add_argument( "-et", "--evaluation_type", type=str, default="ltts", choices=["ltts"], help="Which evaluation to perform", ) parser.add_argument( "-at", "--architecture_type", type=str, default="cnn", choices=["cnn", "attention", "area"], help="Which architecture to use", ) tra_types = [w for w in words_types.keys() if not w.startswith("_")] parser.add_argument( "-tw", "--train_words_type", type=str, default="f2", choices=tra_types, help="Words the dataset was trained on", ) parser.add_argument( "-dn", "--dataset_name", type=str, default="mel01", help="Name of the dataset folder", ) parser.add_argument( "-sid", "--sentence_index", type=int, default=0, help="Which sentence to show", ) # last line to parse the args args = parser.parse_args() return args
def parse_arguments(): """Setup CLI interface""" parser = argparse.ArgumentParser(description="") parser.add_argument( "-pt", "--preprocess_type", type=str, default="preprocess_spec", choices=["preprocess_spec", "compose_spec", "preprocess_split"], help="Which preprocess to perform", ) parser.add_argument( "-dn", "--dataset_name", type=str, default="mel01", help="Name of the output dataset folder", ) parser.add_argument( "-wt", "--words_type", type=str, default="f2", choices=words_types.keys(), help="Words to preprocess", ) parser.add_argument( "-fp", "--force_preprocess", dest="force_preprocess", action="store_true", help="Force the preprocess and overwrite the previous results", ) # last line to parse the args args = parser.parse_args() return args
def parse_arguments() -> argparse.Namespace: """Setup CLI interface""" parser = argparse.ArgumentParser(description="") aug_dict = get_aug_dict() aug_keys = list(aug_dict.keys()) aug_keys.extend(["2345", "6789", "10123", "14567"]) aug_keys.extend(["auA1234", "auA5678"]) parser.add_argument( "-at", "--augmentation_type", type=str, default="aug01", choices=aug_keys, help="Which augmentation to perform", ) parser.add_argument( "-wt", "--words_type", type=str, default="f2", choices=words_types.keys(), help="Words to augment", ) parser.add_argument( "-fp", "--force_augment", dest="force_augment", action="store_true", help="Force the augment and overwrite the previous results", ) # last line to parse the args args = parser.parse_args() return args