Draft: adding a program config group to make all program configs available from a single entry point
Example
PYTHONPATH=src uv run src/geoai/group.py -h
PYTHONPATH=src uv run src/geoai/group.py -h
╭────────────────────────────────────────────────────────────────── Available Programs ───────────────────────────────────────────────────────────────────╮
│ │
│ _____ _____ │
│ / ____| /\ |_ _| │
│ | | __ ___ ___ / \ | | │
│ | | |_ |/ _ \/ _ \ / /\ \ | | │
│ | |__| | __/ (_) / ____ \ _| |_ │
│ \_____|\___|\___/_/ \_\_____| │
│ │
│ Usage: src/geoai/group.py.py {name} [-h] {args} │
│ │
│ program ┃ help │
│ ━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
│ train │ train a segmentation model using the provided datasets and configuration. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
None
and using the train config
PYTHONPATH=src uv run src/geoai/group.py train -h
[14:14:57] INFO Generating ArgParser for train argument_parser.py:64
Usage: group.py [-h] [--config-file CONFIG_FILE] [--rerun RERUN] [--no-tracking [NO_TRACKING]]
[loss] [augmentation] [metric] [model] [optimizer] [lr_scheduler] [data_config] [dataset] [task]
Positional Arguments:
loss [default Empty] [required] - Comma separated list of loss, available options are
{JaccardLoss|DiceLoss|TverskyLoss|FocalLoss|LovaszLoss|L1Loss|MSELoss|CrossEntropyLoss|BCELoss|BCEWithLogitsLoss|SmoothL1Loss|Sof
tMarginLoss|CosineEmbeddingLoss}
augmentation [default Empty] [required] - Comma separated list of augmentation, available options are
{AdvancedBlur|AutoContrast|Blur|CLAHE|ChannelDropout|ChromaticAberration|ColorJitter|Defocus|Downscale|Emboss|FancyPCA|FromFloat|
GlassBlur|HEStain|HueSaturationValue|ISONoise|Illumination|ImageCompression|InvertImg|MedianBlur|MotionBlur|MultiplicativeNoise|N
ormalize|PlanckianJitter|PlasmaBrightnessContrast|PlasmaShadow|Posterize|RGBShift|RandomBrightnessContrast|RandomFog|RandomGamma|
RandomGravel|RandomRain|RandomShadow|RandomSnow|RandomSunFlare|RandomToneCurve|RingingOvershoot|SaltAndPepper|Sharpen|ShotNoise|S
olarize|Spatter|Superpixels|TextImage|ToFloat|ToGray|ToRGB|ToSepia|UnsharpMask|ZoomBlur|Affine|AtLeastOneBBoxRandomCrop|BBoxSafeR
andomCrop|CenterCrop|CoarseDropout|ConstrainedCoarseDropout|Crop|CropAndPad|CropNonEmptyMaskIfExists|D4|ElasticTransform|Erasing|
FrequencyMasking|GridDistortion|GridDropout|GridElasticDeform|HorizontalFlip|LongestMaxSize|MaskDropout|Morphological|NoOp|Optica
lDistortion|OverlayElements|Pad|PadIfNeeded|Perspective|PiecewiseAffine|PixelDropout|RandomCrop|RandomCropFromBorders|RandomCropN
earBBox|RandomGridShuffle|RandomResizedCrop|RandomRotate90|RandomScale|RandomSizedBBoxSafeCrop|RandomSizedCrop|Resize|Rotate|Safe
Rotate|ShiftScaleRotate|SmallestMaxSize|ThinPlateSpline|TimeReverse|Transpose|VerticalFlip|XYMasking}
metric [default Empty] [required] - Comma separated list of metric, available options are
{Accuracy|Precision|Recall|F1Score|IoU|BalancedAccuracy}
model [default Empty] [required] - Name of the model, available options are
{Unet|UnetPlusPlus|FPN|PSPNet|DeepLabV3|DeepLabV3Plus|Linknet|MAnet|PAN|UPerNet|Segformer}
optimizer [default Empty] [required] - Name of the optimizer, available options are
{Adadelta|Adafactor|Adagrad|Adam|SparseAdam|Adamax|ASGD|LBFGS|NAdam|RAdam|RMSprop|SGD}
lr_scheduler [default Empty] [required] - Name of the lr_scheduler, available options are
{MultiplicativeLR|StepLR|MultiStepLR|ConstantLR|LinearLR|ExponentialLR|PolynomialLR|CosineAnnealingLR|ChainedScheduler|Sequential
LR|ReduceLROnPlateau|CyclicLR|OneCycleLR|CosineAnnealingWarmRestarts}
data_config [default Empty] [required] - Comma separated list of data_config, available options are {Flair}
dataset [default Empty] [required] - Comma separated list of dataset, available options are {Flair}
task [default Empty] [required] - Comma separated list of task, available options are {Train|Test|Predict}
Options:
-h Render help screen
--config-file CONFIG_FILE
Instead of providing all Arguments in the command line you can provide a path to a config file in json format using --config-file
PATH/TO/YOUR/FILE.json or `mlflow://<RUN_UUID>/PATH/TO/YOUR/FILE.json`
--rerun RERUN Rerun the program with the same arguments as before, form a given mlflow run by providing the run UUID --rerun <RUN_UUID>
--no-tracking [NO_TRACKING]
If set, the program will not track the run in MLflow.
Edited by Lukas Sanner