stouputils 1.2.42__tar.gz → 1.2.44__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. {stouputils-1.2.42 → stouputils-1.2.44}/PKG-INFO +1 -1
  2. {stouputils-1.2.42 → stouputils-1.2.44}/pyproject.toml +1 -1
  3. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/config/set.py +3 -3
  4. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/technique.py +1 -1
  5. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/dataset/image_loader.py +1 -1
  6. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/dataset/xy_tuple.py +1 -1
  7. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras_utils/callbacks/progressive_unfreezing.py +1 -1
  8. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/model_interface.py +2 -2
  9. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/scripts/exhaustive_process.py +2 -2
  10. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/scripts/routine.py +2 -2
  11. {stouputils-1.2.42 → stouputils-1.2.44}/.gitignore +0 -0
  12. {stouputils-1.2.42 → stouputils-1.2.44}/LICENSE +0 -0
  13. {stouputils-1.2.42 → stouputils-1.2.44}/README.md +0 -0
  14. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/__init__.py +0 -0
  15. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/all_doctests.py +0 -0
  16. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/applications/__init__.py +0 -0
  17. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/applications/automatic_docs.py +0 -0
  18. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/applications/upscaler/__init__.py +0 -0
  19. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/applications/upscaler/config.py +0 -0
  20. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/applications/upscaler/image.py +0 -0
  21. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/applications/upscaler/video.py +0 -0
  22. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/archive.py +0 -0
  23. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/backup.py +0 -0
  24. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/collections.py +0 -0
  25. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/continuous_delivery/__init__.py +0 -0
  26. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/continuous_delivery/cd_utils.py +0 -0
  27. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/continuous_delivery/github.py +0 -0
  28. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/continuous_delivery/pypi.py +0 -0
  29. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/continuous_delivery/pyproject.py +0 -0
  30. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/ctx.py +0 -0
  31. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/config/get.py +0 -0
  32. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/__init__.py +0 -0
  33. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/auto_contrast.py +0 -0
  34. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/axis_flip.py +0 -0
  35. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/bias_field_correction.py +0 -0
  36. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/binary_threshold.py +0 -0
  37. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/blur.py +0 -0
  38. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/brightness.py +0 -0
  39. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/canny.py +0 -0
  40. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/clahe.py +0 -0
  41. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/common.py +0 -0
  42. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/contrast.py +0 -0
  43. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/curvature_flow_filter.py +0 -0
  44. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/denoise.py +0 -0
  45. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/histogram_equalization.py +0 -0
  46. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/invert.py +0 -0
  47. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/laplacian.py +0 -0
  48. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/median_blur.py +0 -0
  49. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/noise.py +0 -0
  50. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/normalize.py +0 -0
  51. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/random_erase.py +0 -0
  52. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/resize.py +0 -0
  53. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/rotation.py +0 -0
  54. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/salt_pepper.py +0 -0
  55. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/sharpening.py +0 -0
  56. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/shearing.py +0 -0
  57. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/threshold.py +0 -0
  58. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/translation.py +0 -0
  59. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image/zoom.py +0 -0
  60. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image_augmentation.py +0 -0
  61. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/image_preprocess.py +0 -0
  62. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/data_processing/prosthesis_detection.py +0 -0
  63. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/dataset/__init__.py +0 -0
  64. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/dataset/dataset.py +0 -0
  65. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/dataset/dataset_loader.py +0 -0
  66. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/dataset/grouping_strategy.py +0 -0
  67. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/metric_dictionnary.py +0 -0
  68. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/metric_utils.py +0 -0
  69. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/mlflow_utils.py +0 -0
  70. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/abstract_model.py +0 -0
  71. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/all.py +0 -0
  72. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/base_keras.py +0 -0
  73. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/all.py +0 -0
  74. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/convnext.py +0 -0
  75. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/densenet.py +0 -0
  76. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/efficientnet.py +0 -0
  77. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/mobilenet.py +0 -0
  78. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/resnet.py +0 -0
  79. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/squeezenet.py +0 -0
  80. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/vgg.py +0 -0
  81. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras/xception.py +0 -0
  82. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras_utils/callbacks/__init__.py +0 -0
  83. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras_utils/callbacks/colored_progress_bar.py +0 -0
  84. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras_utils/callbacks/learning_rate_finder.py +0 -0
  85. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras_utils/callbacks/warmup_scheduler.py +0 -0
  86. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras_utils/losses/__init__.py +0 -0
  87. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras_utils/losses/next_generation_loss.py +0 -0
  88. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/keras_utils/visualizations.py +0 -0
  89. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/models/sandbox.py +0 -0
  90. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/range_tuple.py +0 -0
  91. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/scripts/augment_dataset.py +0 -0
  92. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/scripts/preprocess_dataset.py +0 -0
  93. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/data_science/utils.py +0 -0
  94. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/decorators.py +0 -0
  95. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/dont_look/zip_file_override.py +0 -0
  96. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/image.py +0 -0
  97. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/installer/__init__.py +0 -0
  98. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/installer/common.py +0 -0
  99. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/installer/downloader.py +0 -0
  100. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/installer/linux.py +0 -0
  101. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/installer/main.py +0 -0
  102. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/installer/windows.py +0 -0
  103. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/io.py +0 -0
  104. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/parallel.py +0 -0
  105. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/print.py +0 -0
  106. {stouputils-1.2.42 → stouputils-1.2.44}/stouputils/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stouputils
3
- Version: 1.2.42
3
+ Version: 1.2.44
4
4
  Summary: Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more.
5
5
  Project-URL: Homepage, https://github.com/Stoupy51/stouputils
6
6
  Project-URL: Issues, https://github.com/Stoupy51/stouputils/issues
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
 
6
6
  [project]
7
7
  name = "stouputils"
8
- version = "1.2.42"
8
+ version = "1.2.44"
9
9
  description = "Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more."
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.10"
@@ -24,13 +24,13 @@ class DataScienceConfig:
24
24
  """ Log level for errors for all functions. """
25
25
 
26
26
  AUGMENTED_FILE_SUFFIX: str = "_aug_"
27
- """ Suffix for augmented files, ex: 'image_008_aug_1.png'. """
27
+ """ Suffix for augmented files, e.g. 'image_008_aug_1.png'. """
28
28
 
29
29
  AUGMENTED_DIRECTORY_PREFIX: str = "aug_"
30
- """ Prefix for augmented directories, ex: 'data/hip_implant' -> 'data/aug_hip_implant'. """
30
+ """ Prefix for augmented directories, e.g. 'data/hip_implant' -> 'data/aug_hip_implant'. """
31
31
 
32
32
  PREPROCESSED_DIRECTORY_SUFFIX: str = "_preprocessed"
33
- """ Suffix for preprocessed directories, ex: 'data/hip_implant' -> 'data/hip_implant_preprocessed'. """
33
+ """ Suffix for preprocessed directories, e.g. 'data/hip_implant' -> 'data/hip_implant_preprocessed'. """
34
34
 
35
35
 
36
36
  # Directories
@@ -104,7 +104,7 @@ class ProcessingTechnique(NamedTuple):
104
104
  Should be used on techniques like "axis_flip" or "random_erase"
105
105
  where the probability of applying the technique is not 100%. """
106
106
  custom: Callable[..., NDArray[Any]] | None = None
107
- """ Custom processing technique (callable), name must be "custom", ex: ProcessingTechnique("custom", custom=f) """
107
+ """ Custom processing technique (callable), name must be "custom", e.g. ProcessingTechnique("custom", custom=f) """
108
108
 
109
109
  def __str__(self) -> str:
110
110
  return (
@@ -74,7 +74,7 @@ def load_images_from_directory(
74
74
 
75
75
  # Add channel dimension if grayscale
76
76
  if is_grayscale:
77
- img_array = np.expand_dims(img_array, axis=-1) # Add channel dimension, ex: (224, 224, 1)
77
+ img_array = np.expand_dims(img_array, axis=-1) # Add channel dimension, e.g. (224, 224, 1)
78
78
 
79
79
  return img_array, img_path
80
80
 
@@ -125,7 +125,7 @@ class XyTuple(tuple[list[list[Any]], list[Any], tuple[tuple[str, ...], ...]]):
125
125
  self.filepaths: tuple[tuple[str, ...], ...] = self[2]
126
126
  """ List of filepaths corresponding to the features (one file = list with one element) """
127
127
  self.augmented_files: dict[str, str] = self.update_augmented_files()
128
- """ Dictionary mapping all files to their original filepath, ex: {"file1_aug_1.jpg": "file1.jpg"} """
128
+ """ Dictionary mapping all files to their original filepath, e.g. {"file1_aug_1.jpg": "file1.jpg"} """
129
129
 
130
130
  @property
131
131
  def n_samples(self) -> int:
@@ -41,7 +41,7 @@ class ProgressiveUnfreezing(Callback):
41
41
  reset_weights (bool): If True, reset weights after each unfreeze.
42
42
  reset_optimizer_function (Callable | None):
43
43
  If set, use this function to reset the optimizer every update_interval.
44
- The function should return a compiled optimizer, ex: `lambda: model._get_optimizer(AdamW(...))`.
44
+ The function should return a compiled optimizer, e.g. `lambda: model._get_optimizer(AdamW(...))`.
45
45
  update_per_epoch (bool): If True, unfreeze per epoch, else per batch.
46
46
  update_interval (int): Number of steps between each unfreeze to allow model to stabilize.
47
47
  progressive_freeze (bool): If True, start with all layers unfrozen and progressively freeze them.
@@ -386,7 +386,7 @@ class ModelInterface(AbstractModel):
386
386
  return mlflow_utils.get_weights_path(from_string=str(run.info.artifact_uri))
387
387
 
388
388
  def _get_total_layers(self) -> int:
389
- """ Get the total number of layers in the model architecture, ex: 427 for DenseNet121.
389
+ """ Get the total number of layers in the model architecture, e.g. 427 for DenseNet121.
390
390
 
391
391
  Compatible with Keras/TensorFlow and PyTorch models.
392
392
 
@@ -465,7 +465,7 @@ class ModelInterface(AbstractModel):
465
465
  Args:
466
466
  y_train (NDArray[Any]): Training labels
467
467
  Returns:
468
- dict[int, float]: Dictionary mapping class indices to weights, ex: {0: 0.34, 1: 0.66}
468
+ dict[int, float]: Dictionary mapping class indices to weights, e.g. {0: 0.34, 1: 0.66}
469
469
  """
470
470
  # Get the true classes (one-hot -> class indices)
471
471
  true_classes: NDArray[Any] = Utils.convert_to_class_indices(y_train)
@@ -47,8 +47,8 @@ def exhaustive_process(
47
47
 
48
48
  Args:
49
49
  datasets_to_process (list[tuple[str, str]]): List of dataset paths to process.
50
- Each tuple contains (dataset_path, based_of_path), ex: [("aug_preprocessed_path", "preprocessed_path")].
51
- main_script_path (str): Path to the main script, ex: "src/main.py"
50
+ Each tuple contains (dataset_path, based_of_path), e.g. [("aug_preprocessed_path", "preprocessed_path")].
51
+ main_script_path (str): Path to the main script, e.g. "src/main.py"
52
52
  default_model (str): Default model architecture to use for training.
53
53
  default_kfold (int): Default number of folds for k-fold cross validation.
54
54
  default_transfer_learning (str): Default source for transfer learning.
@@ -13,8 +13,8 @@ from ..models.all import ALL_MODELS, CLASS_MAP, ModelInterface
13
13
 
14
14
  # Constants
15
15
  MODEL_HELP: str = "Model(s) name or alias to use"
16
- INPUT_HELP: str = "Path to the dataset, ex: 'data/aug_hip_implant'"
17
- BASED_OF_HELP: str = "Path to the base dataset for filtering train/test, ex: 'data/hip_implant'"
16
+ INPUT_HELP: str = "Path to the dataset, e.g. 'data/aug_hip_implant'"
17
+ BASED_OF_HELP: str = "Path to the base dataset for filtering train/test, e.g. 'data/hip_implant'"
18
18
  TRANSFER_LEARNING_HELP: str = "Transfer learning source (imagenet, None, 'data/dataset_folder')"
19
19
  GROUPING_HELP: str = "Grouping strategy for the dataset"
20
20
  K_FOLD_HELP: str = "Number of folds for k-fold cross validation (0 = no k-fold, negative = LeavePOut)"
File without changes
File without changes
File without changes