Environment Variables
All environment variables should be put in a .env file in the project root which will be loaded automatically. Alternatively they can be set manually using export VAR=VALUE at the start of each session.
Required Environment Variables:
ASPARAGUS_CONFIGS=/PATH/TO/CONFIG/DIR
ASPARAGUS_DATA=/PATH/TO/ASPARAGUS/DATA
ASPARAGUS_MODELS=/PATH/TO/ASPARAGUS/MODELS
ASPARAGUS_RESULTS=/PATH/TO/ASPARAGUS/RESULTS
ASPARAGUS_RAW_LABELS=/PATH/TO/ASPARAGUS/RAW_LABELS
ASPARAGUS_SOURCE=/PATH/TO/RAW/DATASETS
ASPARAGUS_CONFIGSpoints to the directory containing the default configs found in asparagus/configs. This variable is used in the training and inference scripts.ASPARAGUS_DATApoints to the directory containing preprocessed data. Preprocessing scripts must save processed data here. Data is stored as tensors: pretraining data as[C, H, W, D], segmentation data as[C+1, H, W, D](label is always the last channel), and classification/regression data as a list[tensor, label]. The 2D equivalents omit the D dimension.ASPARAGUS_MODELSpoints to the directory containing model checkpoints, test outputs (results only), logs and metadata.ASPARAGUS_RESULTSpoints to the directory containing predict outputs (output files and results).ASPARAGUS_RAW_LABELSpoints to the directory where preprocessing scripts save formatted but unpreprocessed labels. Formatting (e.g. remapping label values) should be applied; preprocessing (e.g. resampling to a target spacing) should not. These unmodified labels are used when computing final test metrics.ASPARAGUS_SOURCEpoints to the directory containing raw, unprocessed datasets. Preprocessing scripts use this variable to locate source data viaget_source_path()fromasparagus_preprocessing.paths, keeping scripts portable across users and environments.
Optional Environment Variables
(supports multiple colon-separated (":") paths):
ASPARAGUS_PRETRAIN_CONFIGS=/PATH1/TO/ADDITIONAL/PRETRAIN/CONFIG/DIR:PATH2/TO/ADDITIONAL/PRETRAIN/CONFIG/DIR:PATH3...
ASPARAGUS_TRAIN_CONFIGS=/PATH1/TO/ADDITIONAL/TRAIN/CONFIG/DIR:PATH2/TO/ADDITIONAL/TRAIN/CONFIG/DIR:PATH3...
ASPARAGUS_FINETUNE_CONFIGS=/PATH1/TO/ADDITIONAL/FINETUNE/CONFIG/DIR:PATH2/TO/ADDITIONAL/FINETUNECONFIG/DIR:PATH3...
ASPARAGUS_PRETRAIN_CONFIGSpoints to all directories containing pretraining configs. Whenasp_pretrain --config-name MyFancyPretrainConfigis called all the givenASPARAGUS_PRETRAIN_CONFIGSdirectories are scanned for MyFancyPretrainConfig.yaml.ASPARAGUS_TRAIN_CONFIGSpoints to all directories containing training from scratch configs. Whenasp_train_[cls,reg,seg] --config-name MyLovelyTrainConfigis called all the givenASPARAGUS_PRETRAIN_CONFIGSdirectories are scanned for MyLovelyTrainingConfig.yaml.ASPARAGUS_FINETUNE_CONFIGSpoints to all directories containing finetuning configs. Whenasp_finetune_[cls,reg,seg] --config-name MyAwesomeFinetuneConfigis called all the givenASPARAGUS_PRETRAIN_CONFIGSdirectories are scanned for MyAwesomeFinetuneConfig.yaml.