pymlt 0.0.0__tar.gz → 0.0.9.dev0__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 (164) hide show
  1. pymlt-0.0.9.dev0/.dockerignore +2 -0
  2. pymlt-0.0.9.dev0/.github/CODEOWNERS +6 -0
  3. pymlt-0.0.9.dev0/.github/pull_request_template.md +35 -0
  4. pymlt-0.0.9.dev0/.github/workflows/cd.yml +35 -0
  5. pymlt-0.0.9.dev0/.github/workflows/ci.yml +32 -0
  6. pymlt-0.0.9.dev0/.gitignore +160 -0
  7. pymlt-0.0.9.dev0/CHANGELOG.md +0 -0
  8. pymlt-0.0.9.dev0/Dockerfile +32 -0
  9. pymlt-0.0.9.dev0/Makefile +79 -0
  10. pymlt-0.0.9.dev0/PKG-INFO +71 -0
  11. pymlt-0.0.9.dev0/README.md +23 -0
  12. pymlt-0.0.9.dev0/data/titanic.csv +892 -0
  13. pymlt-0.0.9.dev0/docs/HISTORY.md +17 -0
  14. pymlt-0.0.9.dev0/docs/bla.txt +0 -0
  15. pymlt-0.0.9.dev0/docs/datacamp-supervised-ml-models.pdf +137088 -0
  16. pymlt-0.0.9.dev0/docs/datacamp_develop-py-package.txt +135 -0
  17. pymlt-0.0.9.dev0/docs/datacamp_mlops.md +87 -0
  18. pymlt-0.0.9.dev0/docs/datacamp_shell.sh +107 -0
  19. pymlt-0.0.9.dev0/docs/datacamp_unit-testing.md +49 -0
  20. pymlt-0.0.9.dev0/docs/diskcache.md +39 -0
  21. pymlt-0.0.9.dev0/docs/flowchart.md +0 -0
  22. pymlt-0.0.9.dev0/docs/getting_started.md +21 -0
  23. pymlt-0.0.9.dev0/docs/getting_started_uv.txt +28 -0
  24. pymlt-0.0.9.dev0/docs/git.md +104 -0
  25. pymlt-0.0.9.dev0/docs/mlops_todo.txt +13 -0
  26. pymlt-0.0.9.dev0/docs/no_mouse.txt +28 -0
  27. pymlt-0.0.9.dev0/docs/setup_mac.md +161 -0
  28. pymlt-0.0.9.dev0/docs/story.md +19 -0
  29. pymlt-0.0.9.dev0/docs/todo.txt +2 -0
  30. pymlt-0.0.9.dev0/docs/todo_data_science.txt +39 -0
  31. pymlt-0.0.9.dev0/docs/todo_mlt.txt +80 -0
  32. pymlt-0.0.9.dev0/docs/todo_notebook_conventions.jpg +0 -0
  33. pymlt-0.0.9.dev0/docs/udemy_actions.txt +42 -0
  34. pymlt-0.0.9.dev0/docs/udemy_dockers..txt +98 -0
  35. pymlt-0.0.9.dev0/docs/xebia_airflow.txt +54 -0
  36. pymlt-0.0.9.dev0/docs/xebia_docker.txt +91 -0
  37. pymlt-0.0.9.dev0/models/.gitkeep +0 -0
  38. pymlt-0.0.9.dev0/notebooks/bolle_model_template_data_cleaning_feature_engineering.ipynb +558 -0
  39. pymlt-0.0.9.dev0/notebooks/bolle_model_template_feature_selection.ipynb +382 -0
  40. pymlt-0.0.9.dev0/notebooks/bolle_model_template_final_model_evaluation.ipynb +351 -0
  41. pymlt-0.0.9.dev0/notebooks/bolle_model_template_general_exploration.ipynb +866 -0
  42. pymlt-0.0.9.dev0/notebooks/bolle_model_template_model_framework_uitleg.ipynb +1137 -0
  43. pymlt-0.0.9.dev0/notebooks/bolle_model_template_modeling.ipynb +1186 -0
  44. pymlt-0.0.9.dev0/notebooks/calibrate.ipynb +545 -0
  45. pymlt-0.0.9.dev0/notebooks/datacamp_oop.ipynb +342 -0
  46. pymlt-0.0.9.dev0/notebooks/mlt_plots_roc.ipynb +113 -0
  47. pymlt-0.0.9.dev0/notebooks/shapley.ipynb +530 -0
  48. pymlt-0.0.9.dev0/out/20250719_plot.pdf +0 -0
  49. pymlt-0.0.9.dev0/pyproject.toml +101 -0
  50. pymlt-0.0.9.dev0/scripts/clf_train.py +87 -0
  51. pymlt-0.0.9.dev0/scripts/clf_train_aa.py +160 -0
  52. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_1_knn.py +34 -0
  53. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_1_knn_basic.py +25 -0
  54. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_1_knn_extra.py +52 -0
  55. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_1_knn_hyperparam.py +31 -0
  56. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_1_tree_hyperparam.py +31 -0
  57. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_2_regression.py +37 -0
  58. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_2_regression_lasso.py +27 -0
  59. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_2_regression_lasso2.py +25 -0
  60. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_2_regression_lasso3.py +62 -0
  61. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_3_knn_evaluation.py +27 -0
  62. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_3_logreg.py +60 -0
  63. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/24_4.py +63 -0
  64. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/logreg.py +28 -0
  65. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/skl_elasticnet.py +28 -0
  66. pymlt-0.0.9.dev0/scripts/datacamp/01_supervised_learning/skl_svm_final.py +92 -0
  67. pymlt-0.0.9.dev0/scripts/datacamp/02_unsupervised_learning/1_unsupervised_learning.py +43 -0
  68. pymlt-0.0.9.dev0/scripts/datacamp/02_unsupervised_learning/2_unsupervised_learning.py +34 -0
  69. pymlt-0.0.9.dev0/scripts/datacamp/02_unsupervised_learning/3_unsupervised_learning.py +36 -0
  70. pymlt-0.0.9.dev0/scripts/datacamp/02_unsupervised_learning/4_unsupervised_learning.py +52 -0
  71. pymlt-0.0.9.dev0/scripts/datacamp/02_unsupervised_learning/5_unsupervised_learning.py +36 -0
  72. pymlt-0.0.9.dev0/scripts/datacamp/03_linearclassifiers/1_linear_classifiers.py +43 -0
  73. pymlt-0.0.9.dev0/scripts/datacamp/03_linearclassifiers/3_linear_classifiers.py +29 -0
  74. pymlt-0.0.9.dev0/scripts/datacamp/04_tree_based_models/sklearn_trees.py +168 -0
  75. pymlt-0.0.9.dev0/scripts/datacamp/05_xgboost/datacamp_xgboost_clfs.py +125 -0
  76. pymlt-0.0.9.dev0/scripts/datacamp/05_xgboost/datacamp_xgboost_pipeline.py +66 -0
  77. pymlt-0.0.9.dev0/scripts/datacamp/05_xgboost/datacamp_xgboost_regr.py +159 -0
  78. pymlt-0.0.9.dev0/scripts/datacamp/08_preprocessing/preprocessing1.py +143 -0
  79. pymlt-0.0.9.dev0/scripts/datacamp/08_preprocessing/preprocessing2.py +38 -0
  80. pymlt-0.0.9.dev0/scripts/datacamp/11_modelvalidation/1_modelvalidation.py +98 -0
  81. pymlt-0.0.9.dev0/scripts/datacamp/11_modelvalidation/2_modelvalidation.py +52 -0
  82. pymlt-0.0.9.dev0/scripts/datacamp/11_modelvalidation/3_modelvalidation_extra.py +65 -0
  83. pymlt-0.0.9.dev0/scripts/datacamp/11_modelvalidation/extra_lift.py +124 -0
  84. pymlt-0.0.9.dev0/scripts/datacamp/21_pyspark/pyspark1_intro.py +151 -0
  85. pymlt-0.0.9.dev0/scripts/datacamp/21_pyspark/pyspark2_bigdatafundamentals.py +228 -0
  86. pymlt-0.0.9.dev0/scripts/datacamp/21_pyspark/pyspark5_machinelearning.py +288 -0
  87. pymlt-0.0.9.dev0/scripts/datacamp/21_pyspark/pyspark6_recommendationengines.py +54 -0
  88. pymlt-0.0.9.dev0/scripts/datacamp/21_pyspark/readme.md +8 -0
  89. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/datacamp_noise.py +29 -0
  90. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/datacamp_pipeline.py +17 -0
  91. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/datacamp_svc.py +16 -0
  92. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/pandas_1.py +32 -0
  93. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/postprocessing.py +27 -0
  94. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/preq_atom.txt +4 -0
  95. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/preq_functions.py +270 -0
  96. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/preq_oscommands.py +11 -0
  97. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/preq_pandas.py +46 -0
  98. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/preq_schedule.py +22 -0
  99. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/preq_venv.py +19 -0
  100. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/test.py +10 -0
  101. pymlt-0.0.9.dev0/scripts/datacamp/24_extra/try_test.py +4 -0
  102. pymlt-0.0.9.dev0/scripts/datacamp/datacamp_mlwithpy.md +36 -0
  103. pymlt-0.0.9.dev0/scripts/example_create_data.py +7 -0
  104. pymlt-0.0.9.dev0/scripts/example_retry.py +14 -0
  105. pymlt-0.0.9.dev0/scripts/example_uv-env.py +1 -0
  106. pymlt-0.0.9.dev0/scripts/examples/example_argparse.py +65 -0
  107. pymlt-0.0.9.dev0/scripts/examples/example_check.py +66 -0
  108. pymlt-0.0.9.dev0/scripts/examples/example_chunk.py +9 -0
  109. pymlt-0.0.9.dev0/scripts/examples/example_dates.py +63 -0
  110. pymlt-0.0.9.dev0/scripts/examples/example_feature_selection.py +50 -0
  111. pymlt-0.0.9.dev0/scripts/examples/example_grid.py +86 -0
  112. pymlt-0.0.9.dev0/scripts/examples/example_lightgbm.py +51 -0
  113. pymlt-0.0.9.dev0/scripts/examples/example_logreg_with_lift.py +53 -0
  114. pymlt-0.0.9.dev0/scripts/examples/example_mlflow.py +5 -0
  115. pymlt-0.0.9.dev0/scripts/examples/example_multiprocessing.py +54 -0
  116. pymlt-0.0.9.dev0/scripts/examples/example_postgres.py +48 -0
  117. pymlt-0.0.9.dev0/scripts/examples/example_steps.py +26 -0
  118. pymlt-0.0.9.dev0/scripts/examples/example_threshold.py +53 -0
  119. pymlt-0.0.9.dev0/scripts/predict.py +28 -0
  120. pymlt-0.0.9.dev0/scripts/progress.py +22 -0
  121. pymlt-0.0.9.dev0/scripts/save_plot.py +22 -0
  122. pymlt-0.0.9.dev0/scripts/train.py +29 -0
  123. pymlt-0.0.9.dev0/src/pymlt/__init__.py +5 -0
  124. pymlt-0.0.9.dev0/src/pymlt/aa_evaluate_grafana.py +198 -0
  125. pymlt-0.0.9.dev0/src/pymlt/aa_evaluate_model.py +476 -0
  126. pymlt-0.0.9.dev0/src/pymlt/aa_evaluate_shap.py +180 -0
  127. pymlt-0.0.9.dev0/src/pymlt/aa_explore.py +441 -0
  128. pymlt-0.0.9.dev0/src/pymlt/aa_load.py +252 -0
  129. pymlt-0.0.9.dev0/src/pymlt/aa_model.py +935 -0
  130. pymlt-0.0.9.dev0/src/pymlt/aa_transform.py +337 -0
  131. pymlt-0.0.9.dev0/src/pymlt/config.py +43 -0
  132. pymlt-0.0.9.dev0/src/pymlt/data_processing.py +36 -0
  133. pymlt-0.0.9.dev0/src/pymlt/evaluate.py +183 -0
  134. pymlt-0.0.9.dev0/src/pymlt/evaluate_datacamp.py +77 -0
  135. pymlt-0.0.9.dev0/src/pymlt/explore.py +81 -0
  136. pymlt-0.0.9.dev0/src/pymlt/explore_data_understanding.py +68 -0
  137. pymlt-0.0.9.dev0/src/pymlt/features_datacamp.py +63 -0
  138. pymlt-0.0.9.dev0/src/pymlt/load.py +46 -0
  139. pymlt-0.0.9.dev0/src/pymlt/mi_data_cleaning.py +133 -0
  140. pymlt-0.0.9.dev0/src/pymlt/mi_data_exploration.py +576 -0
  141. pymlt-0.0.9.dev0/src/pymlt/mi_feature_engineering.py +200 -0
  142. pymlt-0.0.9.dev0/src/pymlt/mi_feature_selection.py +268 -0
  143. pymlt-0.0.9.dev0/src/pymlt/mi_modeling.py +238 -0
  144. pymlt-0.0.9.dev0/src/pymlt/mi_pipeline_decorator.py +21 -0
  145. pymlt-0.0.9.dev0/src/pymlt/mi_predict_model.py +0 -0
  146. pymlt-0.0.9.dev0/src/pymlt/mi_train_model.py +0 -0
  147. pymlt-0.0.9.dev0/src/pymlt/model.py +114 -0
  148. pymlt-0.0.9.dev0/src/pymlt/model_train.py +37 -0
  149. pymlt-0.0.9.dev0/src/pymlt/transform.py +0 -0
  150. pymlt-0.0.9.dev0/src/pymlt/utils.py +202 -0
  151. pymlt-0.0.9.dev0/src/pymlt.egg-info/PKG-INFO +71 -0
  152. pymlt-0.0.9.dev0/src/pymlt.egg-info/SOURCES.txt +157 -0
  153. pymlt-0.0.9.dev0/src/pymlt.egg-info/requires.txt +8 -0
  154. pymlt-0.0.9.dev0/src/pymlt.egg-info/top_level.txt +1 -0
  155. pymlt-0.0.9.dev0/tests/test_load.py +147 -0
  156. pymlt-0.0.9.dev0/uv.lock +2881 -0
  157. pymlt-0.0.0/PKG-INFO +0 -5
  158. pymlt-0.0.0/README.md +0 -2
  159. pymlt-0.0.0/pymlt.egg-info/PKG-INFO +0 -5
  160. pymlt-0.0.0/pymlt.egg-info/SOURCES.txt +0 -6
  161. pymlt-0.0.0/pymlt.egg-info/top_level.txt +0 -1
  162. {pymlt-0.0.0 → pymlt-0.0.9.dev0}/LICENSE +0 -0
  163. {pymlt-0.0.0 → pymlt-0.0.9.dev0}/setup.cfg +0 -0
  164. {pymlt-0.0.0 → pymlt-0.0.9.dev0/src}/pymlt.egg-info/dependency_links.txt +0 -0
@@ -0,0 +1,2 @@
1
+ # todo: ignore among other things src folder, install should com from pypi
2
+
@@ -0,0 +1,6 @@
1
+ # specify who owns the code in this repo
2
+ # owner will automatically be included in PR
3
+
4
+ * @benvliet
5
+ *.py @benvliet
6
+ /docs/ @benvliet
@@ -0,0 +1,35 @@
1
+ ### Description
2
+
3
+ Tl;dr if the context of the change is long.
4
+ A few sentences on the high level context for the change. Link to relevant design docs or discussion.
5
+ Change is ideally < 500 lines if possible. < 150 is ideal.
6
+
7
+ ### Checklist
8
+ - [ ] I have performed a self-review of my own code.
9
+ - [ ] I have commented my code, particularly in hard-to-understand areas.
10
+ - [ ] I have made corresponding changes to the documentation.
11
+ - [ ] I have added tests that prove my fix is effective or that my feature works.
12
+ - [ ] I have tested these changes locally
13
+ - [ ] I have linked any relevant issues or tickets
14
+
15
+ ## Related Issues
16
+
17
+ Closes #123
18
+ Relates to #456
19
+
20
+ ## Changes
21
+
22
+ - Added ...
23
+ - Refactored ...
24
+ - Fixed ...
25
+
26
+ ## How to Test
27
+
28
+ 1. Run `...`
29
+ 2. Visit `...`
30
+ 3. Expect to see `...`
31
+
32
+ ## Notes
33
+
34
+ - This depends on...
35
+ - Known limitations...
@@ -0,0 +1,35 @@
1
+ name: CD
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - v*.*.*
7
+
8
+ jobs:
9
+ cd:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ with:
15
+ fetch-depth: 0
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v6
19
+
20
+ - name: Install dependencies
21
+ run: uv sync --all-extras
22
+
23
+ - name: Build package
24
+ run: uv build -q
25
+
26
+ - name: Publish package
27
+ run: uv publish -t ${{ secrets.PYPI_TOKEN }}
28
+
29
+ - name: Publish image
30
+ run: |
31
+ VERSION=$(git describe --tags --always)
32
+ echo 'build version: $VERSION'
33
+ docker build -t .
34
+ docker tag ghcr.io/benvliet/pymlt:$VERSION ghcr.io/benvliet/pymlt:latest
35
+ docker push ghcr.io/benvliet/pymlt:$VERSION ghcr.io/benvliet/pymlt:latest
@@ -0,0 +1,32 @@
1
+ name: CI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ types: [opened, synchronize, reopened]
7
+
8
+ # permissions:
9
+ # contents: read
10
+
11
+ jobs:
12
+ ci:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v6
21
+
22
+ - name: Ruff format check
23
+ run: echo uvx ruff format --check . # todo: fix ruff errors
24
+
25
+ - name: Ruff lint check
26
+ run: echo uvx ruff check . # todo: fix ruff errors
27
+
28
+ - name: Sync project env
29
+ run: uv sync --all-extras
30
+
31
+ - name: Run tests
32
+ run: uv run pytest --cov=src/
@@ -0,0 +1,160 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
159
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160
+ .idea/
File without changes
@@ -0,0 +1,32 @@
1
+ FROM python:3.12-slim
2
+
3
+ # install git
4
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
5
+
6
+ # update pip
7
+ RUN python -m pip install --upgrade pip
8
+
9
+ # install uv
10
+ RUN pip install uv
11
+
12
+ COPY .git .git
13
+ COPY pyproject.toml pyproject.toml
14
+ COPY src/ src/
15
+ COPY scripts/ scripts/
16
+
17
+ ## copy the scripts from the local directory to the container
18
+ ## note: pymlt package is installed via uv from pypi
19
+ #COPY ./ /app/
20
+ #
21
+ ## set the working directory in the container
22
+ #WORKDIR /app
23
+ #
24
+ ## set the environment variable
25
+ #ENV PYTHONPATH="/app"
26
+
27
+ # install package
28
+ RUN uv sync # --all-groups
29
+
30
+ # Default command
31
+ ENTRYPOINT ["python", "-u"]
32
+ CMD ["scripts/train.py"]
@@ -0,0 +1,79 @@
1
+ help:
2
+ @echo available commands: clean, env, format, lint, run, test, wip
3
+
4
+ remove_env:
5
+ rm -rf env/
6
+
7
+ create_env:
8
+ python3 -m venv env
9
+ env/bin/pip install --upgrade pip
10
+ env/bin/pip install -r requirements.txt
11
+ env/bin/pip install -e .
12
+ rm -rf *.egg-info
13
+ @echo done!
14
+
15
+ upgrade_env:
16
+ env/bin/pip install -r requirements.txt --upgrade
17
+
18
+ env: remove_env create_env
19
+
20
+ create_reqs:
21
+ pipreqs
22
+
23
+ run:
24
+ python3 scripts/clf_train.py
25
+ pyclean . -q
26
+
27
+ # todo: add docker commands
28
+
29
+ mlflow:
30
+ open http://127.0.0.1:5000/#/
31
+
32
+ mlflow-clean:
33
+ rm -rf mlruns
34
+
35
+ lab_add_env:
36
+ python -m pip install ipykernel
37
+ python -m ipykernel install --name=env
38
+
39
+ lab_list_env:
40
+ jupyter kernelspec list
41
+
42
+ lab_uninstall_env:
43
+ jupyter kernelspec uninstall env
44
+
45
+ lab:
46
+ jupyter lab
47
+
48
+ clean:
49
+ pyclean . -q
50
+
51
+ clean-project: clean
52
+ rm -rf build/
53
+ rm -rf logs/
54
+ rm -rf mlruns/
55
+ rm -rf out/
56
+
57
+ clean-mlflow:
58
+ rm -rf mlruns
59
+
60
+ format:
61
+ black scripts/ -q
62
+ black src/ -q
63
+ black tests/ -q
64
+ isort scripts/ -q
65
+ isort src/ -q
66
+ isort tests/ -q
67
+
68
+ lint:
69
+ flake8 scripts/*.py
70
+ flake8 src/*.py
71
+
72
+ test:
73
+ pytest . -v -x --cov=src --cov-fail-under=0
74
+ rm -rf .pytest_cache
75
+
76
+ wip: format test
77
+ git add .
78
+ git commit -m wip
79
+ git push
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.4
2
+ Name: pymlt
3
+ Version: 0.0.9.dev0
4
+ Summary: Python Machine Learning Toolkit
5
+ Author-email: Ben van Vliet <benvliet@icloud.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2023 Ben van Vliet
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: repository, https://github.com/benvliet/pymlt
29
+ Project-URL: issues, https://github.com/benvliet/pymlt/issues
30
+ Project-URL: homepage, https://pypi.org/project/pymlt/
31
+ Keywords: pymlt,machine learning,data science,toolkit,python
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Natural Language :: English
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.12
37
+ Requires-Python: >=3.7
38
+ Description-Content-Type: text/markdown
39
+ License-File: LICENSE
40
+ Requires-Dist: ruff
41
+ Requires-Dist: pandas>=1.1.5
42
+ Requires-Dist: seaborn>=0.12.2
43
+ Provides-Extra: test
44
+ Requires-Dist: pytest>=6.0; extra == "test"
45
+ Requires-Dist: pytest-cov; extra == "test"
46
+ Requires-Dist: tox; extra == "test"
47
+ Dynamic: license-file
48
+
49
+ # pymlt
50
+ python machine learning template
51
+
52
+ ## links
53
+ https://pypi.org/project/pymlt
54
+ https://hub.docker.com/r/benvliet/pymlt # todo: move to ghcr.io
55
+ https://pepy.tech/projects/pymlt # todo: add badges
56
+ https://codecov.io/gh/benvliet/pymlt # todo: add to pipeline
57
+
58
+ ## project structure
59
+
60
+ ```
61
+ .
62
+ ├── .github/ # Github Actions pipelines
63
+ ├── data/ # Data Files for example runs
64
+ ├── docs/ # Documentation and templates
65
+ ├── src/ # source code
66
+ │ ├── pymlt/ # pymlt package modules
67
+ ├── .../ # ...
68
+ ├── .../ # ...
69
+ ├── .../ # ...
70
+ ├── .../ # ...
71
+ ```
@@ -0,0 +1,23 @@
1
+ # pymlt
2
+ python machine learning template
3
+
4
+ ## links
5
+ https://pypi.org/project/pymlt
6
+ https://hub.docker.com/r/benvliet/pymlt # todo: move to ghcr.io
7
+ https://pepy.tech/projects/pymlt # todo: add badges
8
+ https://codecov.io/gh/benvliet/pymlt # todo: add to pipeline
9
+
10
+ ## project structure
11
+
12
+ ```
13
+ .
14
+ ├── .github/ # Github Actions pipelines
15
+ ├── data/ # Data Files for example runs
16
+ ├── docs/ # Documentation and templates
17
+ ├── src/ # source code
18
+ │ ├── pymlt/ # pymlt package modules
19
+ ├── .../ # ...
20
+ ├── .../ # ...
21
+ ├── .../ # ...
22
+ ├── .../ # ...
23
+ ```