stable-pretraining 0.1.0__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 (264) hide show
  1. stable_pretraining-0.1.0/.circleci/config.yml +180 -0
  2. stable_pretraining-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +15 -0
  3. stable_pretraining-0.1.0/.github/workflows/circleci.yml +24 -0
  4. stable_pretraining-0.1.0/.github/workflows/pre-commit.yml +17 -0
  5. stable_pretraining-0.1.0/.github/workflows/release.yaml +36 -0
  6. stable_pretraining-0.1.0/.github/workflows/testing.yml +79 -0
  7. stable_pretraining-0.1.0/.gitignore +162 -0
  8. stable_pretraining-0.1.0/.pre-commit-config.yaml +49 -0
  9. stable_pretraining-0.1.0/CODE_OF_CONDUCT.md +128 -0
  10. stable_pretraining-0.1.0/LICENSE +21 -0
  11. stable_pretraining-0.1.0/PKG-INFO +485 -0
  12. stable_pretraining-0.1.0/README.md +432 -0
  13. stable_pretraining-0.1.0/RELEASES.rst +16 -0
  14. stable_pretraining-0.1.0/TESTING.md +103 -0
  15. stable_pretraining-0.1.0/assets/cli/plot_metric.py +63 -0
  16. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/Changes +237 -0
  17. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/FAQ +55 -0
  18. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/FontLog.txt +237 -0
  19. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/Fontmap.CMU +33 -0
  20. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/INSTALL +78 -0
  21. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/OFL-FAQ.txt +223 -0
  22. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/OFL.txt +103 -0
  23. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/README +40 -0
  24. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/TODO +6 -0
  25. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbbx.ttf +0 -0
  26. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbi.ttf +0 -0
  27. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbl.ttf +0 -0
  28. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbmo.ttf +0 -0
  29. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbmr.ttf +0 -0
  30. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbso.ttf +0 -0
  31. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbsr.ttf +0 -0
  32. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbtl.ttf +0 -0
  33. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbto.ttf +0 -0
  34. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbx.ttf +0 -0
  35. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunbxo.ttf +0 -0
  36. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunci.ttf +0 -0
  37. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunit.ttf +0 -0
  38. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunobi.ttf +0 -0
  39. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunobx.ttf +0 -0
  40. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunorm.ttf +0 -0
  41. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunoti.ttf +0 -0
  42. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunrb.ttf +0 -0
  43. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunrm.ttf +0 -0
  44. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunsi.ttf +0 -0
  45. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunsl.ttf +0 -0
  46. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunso.ttf +0 -0
  47. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunss.ttf +0 -0
  48. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunssdc.ttf +0 -0
  49. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunst.ttf +0 -0
  50. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunsx.ttf +0 -0
  51. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmuntb.ttf +0 -0
  52. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunti.ttf +0 -0
  53. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmuntt.ttf +0 -0
  54. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmuntx.ttf +0 -0
  55. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunui.ttf +0 -0
  56. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunvi.ttf +0 -0
  57. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/cmunvt.ttf +0 -0
  58. stable_pretraining-0.1.0/assets/cm-unicode-0.7.0 2/fonts.scale +517 -0
  59. stable_pretraining-0.1.0/benchmarks/README.md +54 -0
  60. stable_pretraining-0.1.0/benchmarks/cifar10/barlow-resnet18.py +168 -0
  61. stable_pretraining-0.1.0/benchmarks/cifar10/byol-resnet18.py +199 -0
  62. stable_pretraining-0.1.0/benchmarks/cifar10/nnclr-resnet18.py +170 -0
  63. stable_pretraining-0.1.0/benchmarks/cifar10/simclr-resnet18.py +166 -0
  64. stable_pretraining-0.1.0/benchmarks/cifar10/vicreg-resnet18.py +172 -0
  65. stable_pretraining-0.1.0/benchmarks/diffusiondb2m/clip-vitb.py +260 -0
  66. stable_pretraining-0.1.0/benchmarks/imagenet100/barlow-resnet18.py +173 -0
  67. stable_pretraining-0.1.0/benchmarks/imagenet100/byol-resnet18.py +201 -0
  68. stable_pretraining-0.1.0/benchmarks/imagenet100/clip-vitb-finetune.py +155 -0
  69. stable_pretraining-0.1.0/benchmarks/imagenet100/nnclr-resnet18.py +183 -0
  70. stable_pretraining-0.1.0/benchmarks/imagenet100/simclr-resnet18.py +171 -0
  71. stable_pretraining-0.1.0/benchmarks/imagenet100/vicreg-resnet50.py +174 -0
  72. stable_pretraining-0.1.0/benchmarks/utils.py +47 -0
  73. stable_pretraining-0.1.0/codecov.yml +37 -0
  74. stable_pretraining-0.1.0/docs/.DS_Store +0 -0
  75. stable_pretraining-0.1.0/docs/Makefile +21 -0
  76. stable_pretraining-0.1.0/docs/make.bat +35 -0
  77. stable_pretraining-0.1.0/docs/source/_templates/myclass_template.rst +14 -0
  78. stable_pretraining-0.1.0/docs/source/_templates/myfunc_template.rst +8 -0
  79. stable_pretraining-0.1.0/docs/source/api/backbone.rst +47 -0
  80. stable_pretraining-0.1.0/docs/source/api/data.rst +91 -0
  81. stable_pretraining-0.1.0/docs/source/api/forward.rst +372 -0
  82. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.ConvMixer.rst +15 -0
  83. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.EvalOnly.rst +15 -0
  84. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.MLP.rst +15 -0
  85. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.Resnet9.rst +15 -0
  86. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.TeacherStudentModule.rst +15 -0
  87. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.from_timm.rst +9 -0
  88. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.from_torchvision.rst +9 -0
  89. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.mae.rst +15 -0
  90. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.backbone.set_embedding_dim.rst +9 -0
  91. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.EarlyStopping.rst +15 -0
  92. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.ImageRetrieval.rst +15 -0
  93. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.LiDAR.rst +15 -0
  94. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.LoggingCallback.rst +15 -0
  95. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.ModuleSummary.rst +15 -0
  96. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.OnlineKNN.rst +15 -0
  97. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.OnlineProbe.rst +15 -0
  98. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.OnlineWriter.rst +15 -0
  99. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.RankMe.rst +15 -0
  100. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.SklearnCheckpoint.rst +15 -0
  101. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.callbacks.TrainerInfo.rst +15 -0
  102. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.Categorical.rst +15 -0
  103. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.Collator.rst +15 -0
  104. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.DataModule.rst +15 -0
  105. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.ExponentialMixtureNoiseModel.rst +15 -0
  106. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.ExponentialNormalNoiseModel.rst +15 -0
  107. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.FromTorchDataset.rst +15 -0
  108. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.GMM.rst +15 -0
  109. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.HFDataset.rst +15 -0
  110. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.MinariStepsDataset.rst +15 -0
  111. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.RandomBatchSampler.rst +15 -0
  112. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.RepeatedRandomSampler.rst +15 -0
  113. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.Subset.rst +15 -0
  114. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.SupervisedBatchSampler.rst +15 -0
  115. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.bulk_download.rst +9 -0
  116. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.dataset.rst +15 -0
  117. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.download.rst +9 -0
  118. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.fold_views.rst +9 -0
  119. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.random_split.rst +9 -0
  120. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.data.transforms.rst +15 -0
  121. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.losses.BarlowTwinsLoss.rst +15 -0
  122. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.losses.NTXEntLoss.rst +15 -0
  123. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.losses.NegativeCosineSimilarity.rst +15 -0
  124. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.losses.VICRegLoss.rst +15 -0
  125. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.manager.Manager.rst +15 -0
  126. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.module.Module.rst +15 -0
  127. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.optim.CosineDecayer.rst +15 -0
  128. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.optim.LARS.rst +15 -0
  129. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.optim.LinearWarmup.rst +15 -0
  130. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.optim.LinearWarmupCosineAnnealing.rst +15 -0
  131. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.optim.LinearWarmupCyclicAnnealing.rst +15 -0
  132. stable_pretraining-0.1.0/docs/source/api/gen_modules/stable_pretraining.optim.LinearWarmupThreeStepsAnnealing.rst +15 -0
  133. stable_pretraining-0.1.0/docs/source/api/losses.rst +14 -0
  134. stable_pretraining-0.1.0/docs/source/api/manager.rst +15 -0
  135. stable_pretraining-0.1.0/docs/source/api/module.rst +73 -0
  136. stable_pretraining-0.1.0/docs/source/api/monitors.rst +49 -0
  137. stable_pretraining-0.1.0/docs/source/api/optim.rst +28 -0
  138. stable_pretraining-0.1.0/docs/source/bibliography.rst +5 -0
  139. stable_pretraining-0.1.0/docs/source/conf.py +127 -0
  140. stable_pretraining-0.1.0/docs/source/contributing.rst +87 -0
  141. stable_pretraining-0.1.0/docs/source/figures/logo.jpg +0 -0
  142. stable_pretraining-0.1.0/docs/source/index.rst +28 -0
  143. stable_pretraining-0.1.0/docs/source/references.bib +88 -0
  144. stable_pretraining-0.1.0/docs/source/releases.rst +6 -0
  145. stable_pretraining-0.1.0/docs/source/sg_execution_times.rst +46 -0
  146. stable_pretraining-0.1.0/examples/README.rst +6 -0
  147. stable_pretraining-0.1.0/examples/imbalance_supervised_learning.py +129 -0
  148. stable_pretraining-0.1.0/examples/multi_layer_probe.py +286 -0
  149. stable_pretraining-0.1.0/examples/multi_probe.yaml +31 -0
  150. stable_pretraining-0.1.0/examples/simclr_cifar10_config.yaml +221 -0
  151. stable_pretraining-0.1.0/examples/supervised_learning.py +172 -0
  152. stable_pretraining-0.1.0/examples/wandb_figures.py +129 -0
  153. stable_pretraining-0.1.0/examples/wandb_reader.py +10 -0
  154. stable_pretraining-0.1.0/pyproject.toml +112 -0
  155. stable_pretraining-0.1.0/pytest.ini +21 -0
  156. stable_pretraining-0.1.0/setup.cfg +40 -0
  157. stable_pretraining-0.1.0/stable_pretraining/__about__.py +24 -0
  158. stable_pretraining-0.1.0/stable_pretraining/__init__.py +163 -0
  159. stable_pretraining-0.1.0/stable_pretraining/_version.py +1 -0
  160. stable_pretraining-0.1.0/stable_pretraining/backbone/__init__.py +33 -0
  161. stable_pretraining-0.1.0/stable_pretraining/backbone/convmixer.py +52 -0
  162. stable_pretraining-0.1.0/stable_pretraining/backbone/mae.py +375 -0
  163. stable_pretraining-0.1.0/stable_pretraining/backbone/mlp.py +48 -0
  164. stable_pretraining-0.1.0/stable_pretraining/backbone/resnet9.py +176 -0
  165. stable_pretraining-0.1.0/stable_pretraining/backbone/utils.py +393 -0
  166. stable_pretraining-0.1.0/stable_pretraining/callbacks/__init__.py +35 -0
  167. stable_pretraining-0.1.0/stable_pretraining/callbacks/checkpoint_sklearn.py +174 -0
  168. stable_pretraining-0.1.0/stable_pretraining/callbacks/clip_zero_shot.py +125 -0
  169. stable_pretraining-0.1.0/stable_pretraining/callbacks/earlystop.py +85 -0
  170. stable_pretraining-0.1.0/stable_pretraining/callbacks/embedding_cache.py +80 -0
  171. stable_pretraining-0.1.0/stable_pretraining/callbacks/factories.py +24 -0
  172. stable_pretraining-0.1.0/stable_pretraining/callbacks/image_retrieval.py +196 -0
  173. stable_pretraining-0.1.0/stable_pretraining/callbacks/knn.py +248 -0
  174. stable_pretraining-0.1.0/stable_pretraining/callbacks/latent_viz.py +417 -0
  175. stable_pretraining-0.1.0/stable_pretraining/callbacks/lidar.py +250 -0
  176. stable_pretraining-0.1.0/stable_pretraining/callbacks/probe.py +274 -0
  177. stable_pretraining-0.1.0/stable_pretraining/callbacks/queue.py +373 -0
  178. stable_pretraining-0.1.0/stable_pretraining/callbacks/rankme.py +104 -0
  179. stable_pretraining-0.1.0/stable_pretraining/callbacks/teacher_student.py +111 -0
  180. stable_pretraining-0.1.0/stable_pretraining/callbacks/trainer_info.py +171 -0
  181. stable_pretraining-0.1.0/stable_pretraining/callbacks/utils.py +385 -0
  182. stable_pretraining-0.1.0/stable_pretraining/callbacks/writer.py +158 -0
  183. stable_pretraining-0.1.0/stable_pretraining/cli.py +154 -0
  184. stable_pretraining-0.1.0/stable_pretraining/config.py +172 -0
  185. stable_pretraining-0.1.0/stable_pretraining/data/__init__.py +70 -0
  186. stable_pretraining-0.1.0/stable_pretraining/data/collate.py +101 -0
  187. stable_pretraining-0.1.0/stable_pretraining/data/dataset_stats.py +32 -0
  188. stable_pretraining-0.1.0/stable_pretraining/data/datasets.py +161 -0
  189. stable_pretraining-0.1.0/stable_pretraining/data/download.py +165 -0
  190. stable_pretraining-0.1.0/stable_pretraining/data/masking.py +142 -0
  191. stable_pretraining-0.1.0/stable_pretraining/data/module.py +235 -0
  192. stable_pretraining-0.1.0/stable_pretraining/data/sampler.py +219 -0
  193. stable_pretraining-0.1.0/stable_pretraining/data/synthetic_data.py +386 -0
  194. stable_pretraining-0.1.0/stable_pretraining/data/transforms.py +857 -0
  195. stable_pretraining-0.1.0/stable_pretraining/data/utils.py +151 -0
  196. stable_pretraining-0.1.0/stable_pretraining/forward.py +293 -0
  197. stable_pretraining-0.1.0/stable_pretraining/losses.py +326 -0
  198. stable_pretraining-0.1.0/stable_pretraining/manager.py +568 -0
  199. stable_pretraining-0.1.0/stable_pretraining/module.py +543 -0
  200. stable_pretraining-0.1.0/stable_pretraining/optim/__init__.py +19 -0
  201. stable_pretraining-0.1.0/stable_pretraining/optim/lars.py +156 -0
  202. stable_pretraining-0.1.0/stable_pretraining/optim/lr_scheduler.py +397 -0
  203. stable_pretraining-0.1.0/stable_pretraining/optim/utils.py +148 -0
  204. stable_pretraining-0.1.0/stable_pretraining/run.py +57 -0
  205. stable_pretraining-0.1.0/stable_pretraining/static.py +348 -0
  206. stable_pretraining-0.1.0/stable_pretraining/tests/README.md +135 -0
  207. stable_pretraining-0.1.0/stable_pretraining/tests/conftest.py +44 -0
  208. stable_pretraining-0.1.0/stable_pretraining/tests/integration/__init__.py +0 -0
  209. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_backbone.py +62 -0
  210. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_checkpointing.py +100 -0
  211. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_datasets.py +184 -0
  212. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_image_retrieval.py +207 -0
  213. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_mae.py +250 -0
  214. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_mnist.py +257 -0
  215. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_probing.py +263 -0
  216. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_samplers.py +81 -0
  217. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_simclr.py +327 -0
  218. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_supervised.py +309 -0
  219. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_transforms.py +77 -0
  220. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_video_loading.py +242 -0
  221. stable_pretraining-0.1.0/stable_pretraining/tests/integration/test_writer.py +310 -0
  222. stable_pretraining-0.1.0/stable_pretraining/tests/scripts/test_wandb_callback.py +93 -0
  223. stable_pretraining-0.1.0/stable_pretraining/tests/scripts/train_simclr_cifar10_multigpu.py +180 -0
  224. stable_pretraining-0.1.0/stable_pretraining/tests/scripts/train_simclr_cifar10_multiopt.py +160 -0
  225. stable_pretraining-0.1.0/stable_pretraining/tests/scripts/train_supervised_multigpu_requeue.py +155 -0
  226. stable_pretraining-0.1.0/stable_pretraining/tests/unit/__init__.py +0 -0
  227. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_backbone.py +81 -0
  228. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_checkpointing.py +132 -0
  229. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_clip_zero_shot.py +391 -0
  230. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_datasets.py +222 -0
  231. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_image_retrieval.py +194 -0
  232. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_mae.py +207 -0
  233. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_masking.py +124 -0
  234. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_metrics.py +59 -0
  235. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_mnist.py +234 -0
  236. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_nn_modules.py +332 -0
  237. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_nnclr.py +89 -0
  238. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_probing.py +241 -0
  239. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_queue_callback.py +227 -0
  240. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_samplers.py +71 -0
  241. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_simclr.py +223 -0
  242. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_supervised.py +230 -0
  243. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_symmetric_contrastive_loss.py +126 -0
  244. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_transforms.py +93 -0
  245. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_video_loading.py +177 -0
  246. stable_pretraining-0.1.0/stable_pretraining/tests/unit/test_writer.py +179 -0
  247. stable_pretraining-0.1.0/stable_pretraining/tests/utils.py +78 -0
  248. stable_pretraining-0.1.0/stable_pretraining/utils/__init__.py +91 -0
  249. stable_pretraining-0.1.0/stable_pretraining/utils/batch_utils.py +41 -0
  250. stable_pretraining-0.1.0/stable_pretraining/utils/config.py +152 -0
  251. stable_pretraining-0.1.0/stable_pretraining/utils/data_generation.py +134 -0
  252. stable_pretraining-0.1.0/stable_pretraining/utils/distance_metrics.py +91 -0
  253. stable_pretraining-0.1.0/stable_pretraining/utils/distributed.py +70 -0
  254. stable_pretraining-0.1.0/stable_pretraining/utils/inspection_utils.py +81 -0
  255. stable_pretraining-0.1.0/stable_pretraining/utils/lightning_patch.py +112 -0
  256. stable_pretraining-0.1.0/stable_pretraining/utils/log_reader.py +595 -0
  257. stable_pretraining-0.1.0/stable_pretraining/utils/nn_modules.py +402 -0
  258. stable_pretraining-0.1.0/stable_pretraining/utils/visualization.py +226 -0
  259. stable_pretraining-0.1.0/stable_pretraining.egg-info/PKG-INFO +485 -0
  260. stable_pretraining-0.1.0/stable_pretraining.egg-info/SOURCES.txt +263 -0
  261. stable_pretraining-0.1.0/stable_pretraining.egg-info/dependency_links.txt +1 -0
  262. stable_pretraining-0.1.0/stable_pretraining.egg-info/entry_points.txt +5 -0
  263. stable_pretraining-0.1.0/stable_pretraining.egg-info/requires.txt +53 -0
  264. stable_pretraining-0.1.0/stable_pretraining.egg-info/top_level.txt +1 -0
@@ -0,0 +1,180 @@
1
+ # Tagging a commit with [circle front] will build the front page and perform test-doc.
2
+ # Tagging a commit with [circle full] will build everything.
3
+ version: 2
4
+ jobs:
5
+ build_docs:
6
+ docker:
7
+ - image: cimg/python:3.10
8
+ resource_class: medium
9
+ steps:
10
+ - checkout
11
+ - run:
12
+ name: Set BASH_ENV
13
+ command: |
14
+ echo "set -e" >> $BASH_ENV
15
+ echo "export DISPLAY=:99" >> $BASH_ENV
16
+ echo "export OPENBLAS_NUM_THREADS=4" >> $BASH_ENV
17
+ echo "BASH_ENV:"
18
+ cat $BASH_ENV
19
+
20
+ - run:
21
+ name: Merge with upstream
22
+ command: |
23
+ echo $(git log -1 --pretty=%B) | tee gitlog.txt
24
+ echo ${CI_PULL_REQUEST//*pull\//} | tee merge.txt
25
+ if [[ $(cat merge.txt) != "" ]]; then
26
+ echo "Merging $(cat merge.txt)";
27
+ git remote add upstream https://github.com/rbalestr-lab/stable-pretraining;
28
+ git pull --ff-only upstream "refs/pull/$(cat merge.txt)/merge";
29
+ git fetch upstream main;
30
+ fi
31
+
32
+ # Load our data
33
+ - restore_cache:
34
+ keys:
35
+ - data-cache-0
36
+ - pip-cache
37
+
38
+ - run:
39
+ name: Install ffmpeg
40
+ command: |
41
+ sudo apt update
42
+ sudo apt install ffmpeg
43
+
44
+ - run:
45
+ name: Get Python running
46
+ command: |
47
+ python -m pip install --user --upgrade --progress-bar off pip
48
+ python -m pip install --user -e .[all]
49
+ python -m pip install --user .[doc]
50
+
51
+ - save_cache:
52
+ key: pip-cache
53
+ paths:
54
+ - ~/.cache/pip
55
+
56
+ # Look at what we have and fail early if there is some library conflict
57
+ - run:
58
+ name: Check installation
59
+ command: |
60
+ which python
61
+ python -c "import stable_pretraining"
62
+ which sphinx-build
63
+
64
+ - run:
65
+ name: make html
66
+ command: |
67
+ cd docs;
68
+ make html;
69
+ no_output_timeout: 30m
70
+
71
+ # Save the outputs
72
+ - store_artifacts:
73
+ path: docs/build/html/
74
+ destination: dev
75
+ - persist_to_workspace:
76
+ root: docs/build
77
+ paths:
78
+ - html
79
+
80
+ deploy_main:
81
+ docker:
82
+ - image: cimg/python:3.10
83
+ steps:
84
+ - attach_workspace:
85
+ at: /tmp/build
86
+ - run:
87
+ name: Fetch docs
88
+ command: |
89
+ set -e
90
+ mkdir -p ~/.ssh
91
+ echo -e "Host *\nStrictHostKeyChecking no" > ~/.ssh/config
92
+ chmod og= ~/.ssh/config
93
+ if [ ! -d ~/stable-pretraining.github.io ]; then
94
+ git clone git@github.com:/rbalestr-lab/stable-pretraining.github.io ~/stable-pretraining.github.io --depth=1
95
+ fi
96
+ - run:
97
+ name: Deploy docs
98
+ command: |
99
+ set -e;
100
+ if [ "${CIRCLE_BRANCH}" == "main" ]; then
101
+ git config --global user.email "circle@stable-pretraining.github.io";
102
+ git config --global user.name "Circle CI";
103
+ cd ~/stable-pretraining.github.io;
104
+ git checkout main
105
+ git remote -v
106
+ git fetch origin
107
+ git reset --hard origin/main
108
+ git clean -xdf
109
+ echo "Deploying dev docs for ${CIRCLE_BRANCH}.";
110
+ cd dev
111
+ cp -a /tmp/build/html/* .;
112
+ touch .nojekyll;
113
+ git add -A;
114
+ git commit -m "CircleCI update of dev docs (${CIRCLE_BUILD_NUM}).";
115
+ git pull origin main;
116
+ git push origin main;
117
+ else
118
+ echo "No deployment (build: ${CIRCLE_BRANCH}).";
119
+ fi
120
+
121
+ deploy_tag:
122
+ docker:
123
+ - image: cimg/python:3.10
124
+ steps:
125
+ - attach_workspace:
126
+ at: /tmp/build
127
+ - run:
128
+ name: Fetch docs
129
+ command: |
130
+ set -e
131
+ mkdir -p ~/.ssh
132
+ echo -e "Host *\nStrictHostKeyChecking no" > ~/.ssh/config
133
+ chmod og= ~/.ssh/config
134
+ if [ ! -d ~/stable-pretraining.github.io ]; then
135
+ git clone git@github.com:/rbalestr-lab/stable-pretraining.github.io ~/stable-pretraining.github.io --depth=1
136
+ fi
137
+ - run:
138
+ name: Deploy docs
139
+ command: |
140
+ set -e;
141
+ git config --global user.email "circle@stable-pretraining.github.io";
142
+ git config --global user.name "Circle CI";
143
+ cd ~/stable-pretraining.github.io;
144
+ git checkout main
145
+ git remote -v
146
+ git fetch origin
147
+ git reset --hard origin/main
148
+ git clean -xdf
149
+ echo "Deploying dev docs for ${CIRCLE_BRANCH}.";
150
+ cp -a /tmp/build/html/* .;
151
+ touch .nojekyll;
152
+ git add -A;
153
+ git commit -m "CircleCI update of dev docs (${CIRCLE_BUILD_NUM}).";
154
+ git pull origin main;
155
+ git push origin main;
156
+
157
+ workflows:
158
+ version: 2
159
+
160
+ default:
161
+ jobs:
162
+ - build_docs:
163
+ filters:
164
+ tags:
165
+ only: /[0-9]+(\.[0-9]+)*$/
166
+ - deploy_main:
167
+ requires:
168
+ - build_docs
169
+ filters:
170
+ branches:
171
+ only:
172
+ - main
173
+ - deploy_tag:
174
+ requires:
175
+ - build_docs
176
+ filters:
177
+ branches:
178
+ ignore: /.*/
179
+ tags:
180
+ only: /[0-9]+(\.[0-9]+)*$/
@@ -0,0 +1,15 @@
1
+ ## Description
2
+
3
+ <!--- What types of changes does your code introduce? -->
4
+
5
+ <!--- Please link to an existing issue here if one exists. -->
6
+
7
+
8
+ ## Checklist
9
+
10
+ <!-- - Go over all the following points, and put an `x` in all the boxes that apply. -->
11
+
12
+ - [ ] I have read the [**Contributing**](https://rbalestr-lab.github.io/stable-SSL.github.io/dev/contributing.html#) document.
13
+ - [ ] The documentation is up-to-date with the changes I made (check build artifacts).
14
+ - [ ] All tests passed, and additional code has been **covered with new tests**.
15
+ - [ ] I have added the PR to the [**RELEASES.rst**](../RELEASES.rst) file.
@@ -0,0 +1,24 @@
1
+ name: circleci-redirector
2
+ on: [status]
3
+ permissions: read-all
4
+ jobs:
5
+ circleci_artifacts_redirector_job:
6
+ runs-on: ubuntu-latest
7
+ if: "${{ github.event.context == 'ci/circleci: build_docs' }}"
8
+ permissions:
9
+ statuses: write
10
+ name: Run CircleCI artifacts redirector
11
+ steps:
12
+ - name: GitHub Action step
13
+ id: step1
14
+ uses: scientific-python/circleci-artifacts-redirector-action@v1
15
+ with:
16
+ api-token: ${{ secrets.CIRCLE_TOKEN }}
17
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
18
+ artifact-path: 0/dev/index.html
19
+ circleci-jobs: build_docs
20
+ job-title: Check the rendered docs here!
21
+ - name: Check the URL
22
+ if: github.event.status != 'pending'
23
+ run: |
24
+ curl --fail ${{ steps.step1.outputs.url }} | grep $GITHUB_SHA
@@ -0,0 +1,17 @@
1
+ name: pre-commit
2
+
3
+ on:
4
+ pull_request:
5
+ branches: [main]
6
+ push:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ pre-commit:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - uses: actions/setup-python@v3
15
+ - run: pip install setuptools
16
+ - run: pip install pre-commit
17
+ - run: pre-commit run --all-files --verbose --show-diff-on-failure
@@ -0,0 +1,36 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ # Publish on any tag starting with a `v`, e.g., v1.2.3
7
+ - v*
8
+
9
+ jobs:
10
+ pypi:
11
+ name: Publish to PyPI
12
+ runs-on: ubuntu-latest
13
+ # Environment and permissions trusted publishing.
14
+ environment:
15
+ # Create this environment in the GitHub repository under Settings -> Environments
16
+ name: release
17
+ permissions:
18
+ id-token: write
19
+ contents: read
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v5
23
+ - name: Install uv
24
+ uses: astral-sh/setup-uv@v6
25
+ - name: Install Python 3.10
26
+ run: uv python install 3.10
27
+ - name: Build
28
+ run: uv build
29
+ # Optional smoke tests.
30
+ # Check that basic features work and we didn't miss to include crucial files
31
+ # - name: Smoke test (wheel)
32
+ # run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py
33
+ # - name: Smoke test (source distribution)
34
+ # run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py
35
+ - name: Publish
36
+ run: uv publish
@@ -0,0 +1,79 @@
1
+ name: Testing
2
+ on:
3
+ workflow_dispatch:
4
+ pull_request:
5
+ branches:
6
+ - "main"
7
+ push:
8
+ branches:
9
+ - "main"
10
+ create:
11
+ branches:
12
+ - "main"
13
+ tags:
14
+ - "**"
15
+
16
+ jobs:
17
+ Test:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ fail-fast: false
21
+ defaults:
22
+ run:
23
+ shell: bash -l {0}
24
+ steps:
25
+ # Install stable-pretraining
26
+ - name: Checking Out Repository
27
+ uses: actions/checkout@v2
28
+ # Install Python & Packages
29
+ - uses: actions/setup-python@v4
30
+ with:
31
+ python-version: "3.10"
32
+ - run: which python
33
+ - name: Install dependencies
34
+ run: |
35
+ python -m pip install --user --upgrade --progress-bar off pip
36
+ - name: Install 'stable_pretraining' package
37
+ run: |
38
+ python -m pip install --user -e .[all,dev]
39
+ # Run Tests
40
+ - name: Run Unit Tests
41
+ run: pytest stable_pretraining/ -m unit --verbose --cov=stable_pretraining --cov-report term
42
+ # Codecov
43
+ - name: Upload coverage reports to Codecov
44
+ uses: codecov/codecov-action@v4.0.1
45
+ with:
46
+ token: ${{ secrets.CODECOV_TOKEN }}
47
+ slug: ${{ github.repository }}
48
+
49
+ Test-minimal:
50
+ runs-on: ubuntu-latest
51
+ strategy:
52
+ fail-fast: false
53
+ defaults:
54
+ run:
55
+ shell: bash -l {0}
56
+ steps:
57
+ # Install stable_pretraining
58
+ - name: Checking Out Repository
59
+ uses: actions/checkout@v2
60
+ # Install Python & Packages
61
+ - uses: actions/setup-python@v4
62
+ with:
63
+ python-version: "3.10"
64
+ - run: which python
65
+ - name: Install dependencies
66
+ run: |
67
+ python -m pip install --user --upgrade --progress-bar off pip
68
+ - name: Install 'stable_pretraining' package
69
+ run: |
70
+ python -m pip install --user -e .[all,dev]
71
+ # Run Tests
72
+ - name: Run Unit Tests
73
+ run: pytest stable_pretraining/ -m unit --verbose --cov=stable_pretraining --cov-report term
74
+ # Codecov
75
+ - name: Upload coverage reports to Codecov
76
+ uses: codecov/codecov-action@v4.0.1
77
+ with:
78
+ token: ${{ secrets.CODECOV_TOKEN }}
79
+ slug: ${{ github.repository }}
@@ -0,0 +1,162 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ logs/
4
+ *.py[cod]
5
+ *.jsonl
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+ cover/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+ db.sqlite3
64
+ db.sqlite3-journal
65
+
66
+ # Flask stuff:
67
+ instance/
68
+ .webassets-cache
69
+
70
+ # Scrapy stuff:
71
+ .scrapy
72
+
73
+ # Sphinx documentation
74
+ docs/_build/
75
+
76
+ # PyBuilder
77
+ .pybuilder/
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ .pdm.toml
88
+ .pdm-python
89
+ .pdm-build/
90
+
91
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
92
+ __pypackages__/
93
+
94
+ # Celery stuff
95
+ celerybeat-schedule
96
+ celerybeat.pid
97
+
98
+ # SageMath parsed files
99
+ *.sage.py
100
+
101
+ # Environments
102
+ .env
103
+ .venv
104
+ env/
105
+ venv/
106
+ ENV/
107
+ env.bak/
108
+ venv.bak/
109
+
110
+ # Spyder project settings
111
+ .spyderproject
112
+ .spyproject
113
+
114
+ # Rope project settings
115
+ .ropeproject
116
+
117
+ # mkdocs documentation
118
+ /site
119
+
120
+ # mypy
121
+ .mypy_cache/
122
+ .dmypy.json
123
+ dmypy.json
124
+
125
+ # Pyre type checker
126
+ .pyre/
127
+
128
+ # pytype static type analyzer
129
+ .pytype/
130
+
131
+ # Cython debug symbols
132
+ cython_debug/
133
+
134
+ # PyCharm
135
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
136
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
137
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
138
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
139
+ #.idea/
140
+
141
+ # Docs
142
+ docs/source/auto_examples/
143
+ docs/source/gen_modules/
144
+
145
+ outputs/
146
+ multirun/
147
+ ./data/
148
+ examples/data/
149
+ wandb/
150
+
151
+ *.ckpt
152
+ *.pt
153
+ *.out
154
+ .vscode/launch.json
155
+ *.lock
156
+
157
+ *.sbatch
158
+ *.sh
159
+ *.err
160
+ *.out
161
+
162
+ ._version.py
@@ -0,0 +1,49 @@
1
+ default_language_version:
2
+ python: python3
3
+
4
+ repos:
5
+ - repo: https://github.com/astral-sh/ruff-pre-commit
6
+ rev: v0.12.8
7
+ hooks:
8
+ # Run the linter.
9
+ - id: ruff
10
+ types_or: [ python, pyi ]
11
+ args:
12
+ - --fix
13
+ - --exclude=examples/
14
+ # Run the formatter.
15
+ - id: ruff-format
16
+ types_or: [ python, pyi ]
17
+
18
+ - repo: https://github.com/pre-commit/pre-commit-hooks
19
+ rev: v6.0.0
20
+ hooks:
21
+ # list of supported hooks: https://pre-commit.com/hooks.html
22
+ - id: trailing-whitespace
23
+ - id: end-of-file-fixer
24
+ - id: check-docstring-first
25
+ - id: check-yaml
26
+ - id: debug-statements
27
+ - id: detect-private-key
28
+ - id: check-executables-have-shebangs
29
+ - id: check-toml
30
+ - id: check-case-conflict
31
+ - id: check-added-large-files
32
+ - id: check-merge-conflict
33
+
34
+ # shell scripts linter
35
+ - repo: https://github.com/shellcheck-py/shellcheck-py
36
+ rev: v0.11.0.1
37
+ hooks:
38
+ - id: shellcheck
39
+ require_serial: true
40
+
41
+ # word spelling linter
42
+ - repo: https://github.com/codespell-project/codespell
43
+ rev: v2.4.1
44
+ hooks:
45
+ - id: codespell
46
+ require_serial: true
47
+ args:
48
+ - --skip=logs/**,data/**,*.ipynb
49
+ - --ignore-words-list=socio-economic
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ - Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ - The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ vanasselhugues@gmail.com.
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ https://www.contributor-covenant.org/faq. Translations are available at
126
+ https://www.contributor-covenant.org/translations.
127
+
128
+ [homepage]: https://www.contributor-covenant.org