stouputils.data_science.config.set module#
Configuration file for the project.
- class DataScienceConfig[source]#
Bases:
object
Configuration class for the project.
- SEED: int = 42#
Seed for the random number generator.
- AUGMENTED_FILE_SUFFIX: str = '_aug_'#
Suffix for augmented files, e.g. ‘image_008_aug_1.png’.
- AUGMENTED_DIRECTORY_PREFIX: str = 'aug_'#
Prefix for augmented directories, e.g. ‘data/hip_implant’ -> ‘data/aug_hip_implant’.
- PREPROCESSED_DIRECTORY_SUFFIX: str = '_preprocessed'#
Suffix for preprocessed directories, e.g. ‘data/hip_implant’ -> ‘data/hip_implant_preprocessed’.
- ROOT: str = '/home/runner/work/stouputils/stouputils'#
Root directory of the project.
- MLFLOW_FOLDER: str = '/home/runner/work/stouputils/stouputils/mlruns'#
Folder containing the mlflow data.
- MLFLOW_URI: str = 'file:///home/runner/work/stouputils/stouputils/mlruns'#
URI to the mlflow data.
- DATA_FOLDER: str = '/home/runner/work/stouputils/stouputils/data'#
Folder containing all the data (e.g. subfolders containing images).
- TEMP_FOLDER: str = '/home/runner/work/stouputils/stouputils/temp'#
Folder containing temporary files (e.g. models checkpoints, plots, etc.).
- LOGS_FOLDER: str = '/home/runner/work/stouputils/stouputils/logs'#
Folder containing the logs.
- TENSORBOARD_FOLDER: str = '/home/runner/work/stouputils/stouputils/tensorboard'#
Folder containing the tensorboard logs.
- TEST_SIZE: float = 0.2#
Size of the test set by default (0.2 means 80% training, 20% test).
- VALIDATION_SIZE: float = 0.2#
Size of the validation set by default (0.2 means 80% training, 20% validation).
- SAVE_MODEL: bool = False#
If the model should be saved in the mlflow folder using mlflow.*.save_model.
- DO_SALIENCY_AND_GRADCAM: bool = True#
If the saliency and gradcam should be done during the run.
- DO_LEARNING_RATE_FINDER: Literal[0, 1, 2] = 1#
If the learning rate finder should be done during the run. 0: no, 1: only plot, 2: plot and use value for the remaining run
- DO_UNFREEZE_FINDER: Literal[0, 1, 2] = 0#
If the unfreeze finder should be done during the run. 0: no, 1: only plot, 2: plot and use value for the remaining run
- DO_FIT_IN_SUBPROCESS: bool = True#
If the model should be fitted in a subprocess. Is memory efficient, and more stable. Turn it off only if you are having issues.
Note: This allow a program to make lots of runs without getting killed by the OS for using too much resources. (e.g. LeaveOneOut Cross Validation, Grid Search, etc.)
- MIXED_PRECISION_POLICY: Literal['mixed_float16', 'mixed_bfloat16', 'float32'] = 'mixed_float16'#
Mixed precision policy to use. Turn back to “float32” if you are having issues with a specific model or metrics. See: https://www.tensorflow.org/guide/mixed_precision
- TENSORFLOW_DEVICE: str = '/gpu:1'#
TensorFlow device to use.