diff --git a/clinicadl/commandline/pipelines/prepare_data/prepare_data_cli.py b/clinicadl/commandline/pipelines/prepare_data/prepare_data_cli.py index 57a266d33..d1f51602b 100644 --- a/clinicadl/commandline/pipelines/prepare_data/prepare_data_cli.py +++ b/clinicadl/commandline/pipelines/prepare_data/prepare_data_cli.py @@ -12,12 +12,6 @@ preprocessing, ) from clinicadl.prepare_data.prepare_data import DeepLearningPrepareData -from clinicadl.prepare_data.prepare_data_config import ( - PrepareDataImageConfig, - PrepareDataPatchConfig, - PrepareDataROIConfig, - PrepareDataSliceConfig, -) from clinicadl.utils.enum import ( BIDSModality, DTIMeasure, diff --git a/clinicadl/config/config/pipelines/__init__.py b/clinicadl/config/config/pipelines/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/clinicadl/interpret/config.py b/clinicadl/interpret/config.py index 7b7509f1e..9fad6ac1a 100644 --- a/clinicadl/interpret/config.py +++ b/clinicadl/interpret/config.py @@ -10,12 +10,10 @@ load_data_test, ) from clinicadl.caps_dataset.dataloader_config import DataLoaderConfig -from clinicadl.config.config import ( - ComputationalConfig, - CrossValidationConfig, - MapsManagerConfig, - ValidationConfig, -) +from clinicadl.config.config.computational import ComputationalConfig +from clinicadl.config.config.cross_validation import CrossValidationConfig +from clinicadl.config.config.maps_manager import MapsManagerConfig +from clinicadl.config.config.validation import ValidationConfig from clinicadl.interpret.gradients import GradCam, Gradients, VanillaBackProp from clinicadl.utils.enum import InterpretationMethod diff --git a/clinicadl/predict/predict_manager.py b/clinicadl/predict/predict_manager.py index 0b0368ac2..e278ef371 100644 --- a/clinicadl/predict/predict_manager.py +++ b/clinicadl/predict/predict_manager.py @@ -11,7 +11,7 @@ from torch.utils.data import DataLoader from torch.utils.data.distributed import DistributedSampler -from clinicadl.caps_dataset.data_utils import ( +from clinicadl.caps_dataset.data import ( return_dataset, ) from clinicadl.interpret.config import InterpretConfig diff --git a/clinicadl/quality_check/pet_linear/cli.py b/clinicadl/quality_check/pet_linear/cli.py index 5ebe4e299..12f2de38d 100644 --- a/clinicadl/quality_check/pet_linear/cli.py +++ b/clinicadl/quality_check/pet_linear/cli.py @@ -1,7 +1,12 @@ import click -from clinicadl.config import arguments -from clinicadl.config.options import data, dataloader, modality, preprocessing +from clinicadl.commandline import arguments +from clinicadl.commandline.modules_options import ( + data, + dataloader, + modality, + preprocessing, +) @click.command(name="pet-linear", no_args_is_help=True) diff --git a/clinicadl/quality_check/t1_linear/cli.py b/clinicadl/quality_check/t1_linear/cli.py index 0e08da5f4..08ce5fe03 100755 --- a/clinicadl/quality_check/t1_linear/cli.py +++ b/clinicadl/quality_check/t1_linear/cli.py @@ -2,8 +2,8 @@ import click -from clinicadl.config import arguments -from clinicadl.config.options import ( +from clinicadl.commandline import arguments +from clinicadl.commandline.modules_options import ( computational, data, dataloader, diff --git a/clinicadl/quality_check/t1_volume/cli.py b/clinicadl/quality_check/t1_volume/cli.py index 39fdae26a..b6ef712dc 100644 --- a/clinicadl/quality_check/t1_volume/cli.py +++ b/clinicadl/quality_check/t1_volume/cli.py @@ -1,7 +1,7 @@ import click -from clinicadl.config import arguments -from clinicadl.config.options import ( +from clinicadl.commandline import arguments +from clinicadl.commandline.modules_options import ( computational, data, dataloader, diff --git a/clinicadl/trainer/config/classification.py b/clinicadl/trainer/config/classification.py index e55403048..0fef7dadc 100644 --- a/clinicadl/trainer/config/classification.py +++ b/clinicadl/trainer/config/classification.py @@ -4,8 +4,8 @@ from pydantic import computed_field, field_validator from clinicadl.caps_dataset.data_config import DataConfig as BaseDataConfig -from clinicadl.config.config import NetworkConfig as BaseNetworkConfig -from clinicadl.config.config import ValidationConfig as BaseValidationConfig +from clinicadl.config.config.validation import ValidationConfig as BaseValidationConfig +from clinicadl.network.config import NetworkConfig as BaseNetworkConfig from clinicadl.trainer.config.train import TrainConfig from clinicadl.utils.enum import ClassificationLoss, ClassificationMetric, Task diff --git a/clinicadl/trainer/config/reconstruction.py b/clinicadl/trainer/config/reconstruction.py index 67a2a3e92..b727328c6 100644 --- a/clinicadl/trainer/config/reconstruction.py +++ b/clinicadl/trainer/config/reconstruction.py @@ -4,8 +4,8 @@ from pydantic import PositiveFloat, PositiveInt, computed_field, field_validator -from clinicadl.config.config import NetworkConfig as BaseNetworkConfig -from clinicadl.config.config import ValidationConfig as BaseValidationConfig +from clinicadl.config.config.validation import ValidationConfig as BaseValidationConfig +from clinicadl.network.config import NetworkConfig as BaseNetworkConfig from clinicadl.trainer.config.train import TrainConfig from clinicadl.utils.enum import ( Normalization, diff --git a/clinicadl/trainer/config/regression.py b/clinicadl/trainer/config/regression.py index b514ce37e..42e7d603b 100644 --- a/clinicadl/trainer/config/regression.py +++ b/clinicadl/trainer/config/regression.py @@ -5,8 +5,8 @@ from pydantic import PositiveFloat, PositiveInt, computed_field, field_validator from clinicadl.caps_dataset.data_config import DataConfig as BaseDataConfig -from clinicadl.config.config import NetworkConfig as BaseNetworkConfig -from clinicadl.config.config import ValidationConfig as BaseValidationConfig +from clinicadl.config.config.validation import ValidationConfig as BaseValidationConfig +from clinicadl.network.config import NetworkConfig as BaseNetworkConfig from clinicadl.trainer.config.train import TrainConfig from clinicadl.utils.enum import RegressionLoss, RegressionMetric, Task diff --git a/clinicadl/trainer/config/train.py b/clinicadl/trainer/config/train.py index 2bf7603ae..cabde5d04 100644 --- a/clinicadl/trainer/config/train.py +++ b/clinicadl/trainer/config/train.py @@ -10,21 +10,19 @@ from clinicadl.callbacks.config import CallbacksConfig from clinicadl.caps_dataset.data_config import DataConfig from clinicadl.caps_dataset.dataloader_config import DataLoaderConfig -from clinicadl.config.config import ( - ComputationalConfig, - CrossValidationConfig, - EarlyStoppingConfig, - LRschedulerConfig, - MapsManagerConfig, - ReproducibilityConfig, - SSDAConfig, - TransferLearningConfig, - TransformsConfig, - ValidationConfig, -) +from clinicadl.config.config.computational import ComputationalConfig +from clinicadl.config.config.cross_validation import CrossValidationConfig +from clinicadl.config.config.early_stopping import EarlyStoppingConfig +from clinicadl.config.config.lr_scheduler import LRschedulerConfig +from clinicadl.config.config.maps_manager import MapsManagerConfig +from clinicadl.config.config.reproducibility import ReproducibilityConfig +from clinicadl.config.config.ssda import SSDAConfig +from clinicadl.config.config.transfer_learning import TransferLearningConfig +from clinicadl.config.config.validation import ValidationConfig from clinicadl.network.config import NetworkConfig from clinicadl.optimizer.optimization import OptimizationConfig from clinicadl.optimizer.optimizer import OptimizerConfig +from clinicadl.transforms.config import TransformsConfig from clinicadl.utils.enum import Task logger = getLogger("clinicadl.training_config") diff --git a/clinicadl/trainer/trainer.py b/clinicadl/trainer/trainer.py index a8c205d59..5126e3dcf 100644 --- a/clinicadl/trainer/trainer.py +++ b/clinicadl/trainer/trainer.py @@ -14,7 +14,7 @@ from torch.utils.data import DataLoader from torch.utils.data.distributed import DistributedSampler -from clinicadl.caps_dataset.data_utils import return_dataset +from clinicadl.caps_dataset.data import return_dataset from clinicadl.utils.early_stopping import EarlyStopping from clinicadl.utils.exceptions import MAPSError from clinicadl.utils.maps_manager.ddp import DDP, cluster