in assets/training/finetune_acft_image/src/medimage_insight_adapter_finetune/medimage_train.py [0:0]
def get_parser():
"""
Add arguments and returns the parser. Here we add all the arguments for all the tasks.
Those arguments that are not relevant for the input task should be ignored.
"""
parser = argparse.ArgumentParser(description='Process medical images and get embeddings', allow_abbrev=False)
parser.add_argument(
"--task_name",
type=str,
required=True,
help="The name of the task to be executed",
)
parser.add_argument(
'--train_data_path',
type=str,
required=True,
help='The path to the training data.'
)
parser.add_argument(
'--validation_data_path',
type=str,
required=True,
help='The path to the validation data.'
)
parser.add_argument(
"--train_text_tsv",
type=str,
help="Path to evaluation text TSV file.",
required=True
)
parser.add_argument(
"--validation_text_tsv",
type=str,
help="Path to training text TSV file.",
required=True
)
parser.add_argument(
'--train_dataloader_batch_size',
type=int,
required=True,
help='Batch size for the training dataloader.'
)
parser.add_argument(
'--validation_dataloader_batch_size',
type=int,
required=True,
help='Batch size for the validation dataloader.'
)
parser.add_argument(
'--train_dataloader_workers',
type=int,
required=True,
help='Number of workers for the training dataloader.'
)
parser.add_argument(
'--validation_dataloader_workers',
type=int,
required=True,
help='Number of workers for the validation dataloader.'
)
parser.add_argument(
'--label_file',
type=str,
help='Path to label file.'
)
parser.add_argument(
'--hidden_dimensions',
type=int,
required=True,
help='Number of hidden dimensions.'
)
parser.add_argument(
'--input_channels',
type=int,
required=True,
help='Number of input channels.'
)
parser.add_argument(
'--learning_rate',
type=float,
required=True,
help='Learning rate for the model.'
)
parser.add_argument(
'--max_epochs',
type=int,
required=True,
help='Maximum number of epochs for training.'
)
parser.add_argument(
'--track_metric',
type=str,
required=True,
help='Metric to track when calculating best model. acc or auc supported.'
)
parser.add_argument(
'--output_model_path',
type=str,
required=True,
help='Path to save the output model.'
)
return parser