collie-mlops 0.1.1b0__py3-none-any.whl

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 (45) hide show
  1. collie/__init__.py +69 -0
  2. collie/_common/__init__.py +0 -0
  3. collie/_common/decorator.py +53 -0
  4. collie/_common/exceptions.py +104 -0
  5. collie/_common/mlflow_model_io/__init__.py +0 -0
  6. collie/_common/mlflow_model_io/base_flavor_handler.py +26 -0
  7. collie/_common/mlflow_model_io/flavor_registry.py +72 -0
  8. collie/_common/mlflow_model_io/model_flavors.py +259 -0
  9. collie/_common/mlflow_model_io/model_io.py +65 -0
  10. collie/_common/utils.py +13 -0
  11. collie/contracts/__init__.py +0 -0
  12. collie/contracts/event.py +79 -0
  13. collie/contracts/mlflow.py +444 -0
  14. collie/contracts/orchestrator.py +79 -0
  15. collie/core/__init__.py +41 -0
  16. collie/core/enums/__init__.py +0 -0
  17. collie/core/enums/components.py +26 -0
  18. collie/core/enums/ml_models.py +20 -0
  19. collie/core/evaluator/__init__.py +0 -0
  20. collie/core/evaluator/evaluator.py +147 -0
  21. collie/core/models.py +125 -0
  22. collie/core/orchestrator/__init__.py +0 -0
  23. collie/core/orchestrator/orchestrator.py +47 -0
  24. collie/core/pusher/__init__.py +0 -0
  25. collie/core/pusher/pusher.py +98 -0
  26. collie/core/trainer/__init__.py +0 -0
  27. collie/core/trainer/trainer.py +78 -0
  28. collie/core/transform/__init__.py +0 -0
  29. collie/core/transform/transform.py +87 -0
  30. collie/core/tuner/__init__.py +0 -0
  31. collie/core/tuner/tuner.py +84 -0
  32. collie/helper/__init__.py +0 -0
  33. collie/helper/pytorch/__init__.py +0 -0
  34. collie/helper/pytorch/callback/__init__.py +0 -0
  35. collie/helper/pytorch/callback/callback.py +155 -0
  36. collie/helper/pytorch/callback/earlystop.py +54 -0
  37. collie/helper/pytorch/callback/model_checkpoint.py +100 -0
  38. collie/helper/pytorch/model/__init__.py +0 -0
  39. collie/helper/pytorch/model/loader.py +55 -0
  40. collie/helper/pytorch/trainer.py +304 -0
  41. collie_mlops-0.1.1b0.dist-info/LICENSE +21 -0
  42. collie_mlops-0.1.1b0.dist-info/METADATA +259 -0
  43. collie_mlops-0.1.1b0.dist-info/RECORD +45 -0
  44. collie_mlops-0.1.1b0.dist-info/WHEEL +5 -0
  45. collie_mlops-0.1.1b0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,259 @@
1
+ Metadata-Version: 2.1
2
+ Name: collie-mlops
3
+ Version: 0.1.1b0
4
+ Summary: A Lightweight MLOps Framework for Machine Learning Workflows
5
+ Home-page: https://github.com/ChingHuanChiu/collie
6
+ Author: ChingHuanChiu
7
+ Author-email: ChingHuanChiu <stevenchiou8@gmail.com>
8
+ Maintainer-email: ChingHuanChiu <stevenchiou8@gmail.com>
9
+ License: MIT
10
+ Project-URL: Homepage, https://github.com/ChingHuanChiu/collie
11
+ Project-URL: Documentation, https://github.com/ChingHuanChiu/collie/blob/main/README.md
12
+ Project-URL: Repository, https://github.com/ChingHuanChiu/collie
13
+ Project-URL: Bug Tracker, https://github.com/ChingHuanChiu/collie/issues
14
+ Project-URL: Changelog, https://github.com/ChingHuanChiu/collie/blob/main/CHANGELOG.md
15
+ Keywords: mlops,machine-learning,mlflow,pipeline,orchestration,deep-learning,experiment-tracking
16
+ Classifier: Development Status :: 4 - Beta
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: License :: OSI Approved :: MIT License
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Programming Language :: Python :: 3 :: Only
27
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Classifier: Typing :: Typed
30
+ Requires-Python: >=3.10
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: mlflow >=2.0.0
34
+ Requires-Dist: pydantic >=2.0.0
35
+ Requires-Dist: pandas >=1.3.0
36
+ Requires-Dist: numpy <2.0.0,>=1.20.0
37
+ Requires-Dist: scikit-learn >=1.0.0
38
+ Requires-Dist: xgboost >=1.5.0
39
+ Requires-Dist: torch >=1.9.0
40
+ Requires-Dist: pytorch-lightning >=2.0.0
41
+ Requires-Dist: lightgbm >=3.0.0
42
+ Requires-Dist: transformers >=4.0.0
43
+ Requires-Dist: sentence-transformers >=2.0.0
44
+ Provides-Extra: all
45
+ Requires-Dist: scikit-learn >=1.0.0 ; extra == 'all'
46
+ Requires-Dist: xgboost >=1.5.0 ; extra == 'all'
47
+ Requires-Dist: torch >=1.9.0 ; extra == 'all'
48
+ Requires-Dist: pytorch-lightning >=2.0.0 ; extra == 'all'
49
+ Requires-Dist: lightgbm >=3.0.0 ; extra == 'all'
50
+ Requires-Dist: transformers >=4.0.0 ; extra == 'all'
51
+ Requires-Dist: sentence-transformers >=2.0.0 ; extra == 'all'
52
+ Requires-Dist: PyYAML >=5.4.0 ; extra == 'all'
53
+ Requires-Dist: toml >=0.10.0 ; extra == 'all'
54
+ Provides-Extra: config
55
+ Requires-Dist: PyYAML >=5.4.0 ; extra == 'config'
56
+ Requires-Dist: toml >=0.10.0 ; extra == 'config'
57
+ Provides-Extra: dev
58
+ Requires-Dist: pytest >=6.0.0 ; extra == 'dev'
59
+ Requires-Dist: pytest-cov >=3.0.0 ; extra == 'dev'
60
+ Requires-Dist: pytest-mock >=3.6.0 ; extra == 'dev'
61
+ Requires-Dist: black >=22.0.0 ; extra == 'dev'
62
+ Requires-Dist: isort >=5.10.0 ; extra == 'dev'
63
+ Requires-Dist: flake8 >=4.0.0 ; extra == 'dev'
64
+ Requires-Dist: mypy >=0.950 ; extra == 'dev'
65
+ Requires-Dist: pre-commit >=2.15.0 ; extra == 'dev'
66
+ Requires-Dist: twine >=4.0.0 ; extra == 'dev'
67
+ Requires-Dist: build >=0.7.0 ; extra == 'dev'
68
+ Provides-Extra: docs
69
+ Requires-Dist: sphinx >=4.0.0 ; extra == 'docs'
70
+ Requires-Dist: sphinx-rtd-theme >=1.0.0 ; extra == 'docs'
71
+ Requires-Dist: sphinx-autodoc-typehints >=1.12.0 ; extra == 'docs'
72
+ Requires-Dist: myst-parser >=0.18.0 ; extra == 'docs'
73
+ Provides-Extra: lightgbm
74
+ Requires-Dist: lightgbm >=3.0.0 ; extra == 'lightgbm'
75
+ Provides-Extra: pytorch
76
+ Requires-Dist: torch >=1.9.0 ; extra == 'pytorch'
77
+ Requires-Dist: pytorch-lightning >=2.0.0 ; extra == 'pytorch'
78
+ Provides-Extra: sklearn
79
+ Requires-Dist: scikit-learn >=1.0.0 ; extra == 'sklearn'
80
+ Provides-Extra: test
81
+ Requires-Dist: pytest >=6.0.0 ; extra == 'test'
82
+ Requires-Dist: pytest-cov >=3.0.0 ; extra == 'test'
83
+ Requires-Dist: pytest-mock >=3.6.0 ; extra == 'test'
84
+ Provides-Extra: transformers
85
+ Requires-Dist: transformers >=4.0.0 ; extra == 'transformers'
86
+ Requires-Dist: sentence-transformers >=2.0.0 ; extra == 'transformers'
87
+ Provides-Extra: xgboost
88
+ Requires-Dist: xgboost >=1.5.0 ; extra == 'xgboost'
89
+
90
+ # Collie
91
+
92
+ [![PyPI version](https://badge.fury.io/py/collie-mlops.svg)](https://badge.fury.io/py/collie-mlops)
93
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
94
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
95
+ [![Documentation](https://img.shields.io/badge/docs-sphinx-blue.svg)](docs/_build/html/index.html)
96
+ [![codecov](https://codecov.io/gh/ChingHuanChiu/collie/branch/main/graph/badge.svg)](https://codecov.io/gh/ChingHuanChiu/collie)
97
+
98
+ A Lightweight MLOps Framework for Machine Learning Workflows
99
+
100
+
101
+ ## Overview
102
+
103
+ Collie is a modern MLOps framework designed to streamline machine learning workflows by providing a component-based architecture integrated with MLflow. It enables data scientists and ML engineers to build, deploy, and manage ML pipelines with ease through modular components that handle different stages of the ML lifecycle.
104
+
105
+ ## Features
106
+
107
+ - **Component-Based Architecture**: Modular design with specialized components for each ML workflow stage
108
+ - **MLflow Integration**: Built-in experiment tracking, model registration, and deployment capabilities
109
+ - **Pipeline Orchestration**: Seamless workflow management with event-driven architecture
110
+ - **Model Management**: Automated model versioning, staging, and promotion
111
+ - **Framework Agnostic**: Supports multiple ML frameworks (PyTorch, scikit-learn, XGBoost, LightGBM, Transformers)
112
+
113
+ ## Architecture
114
+
115
+ Collie follows an event-driven architecture with the following core components:
116
+
117
+ - **Transformer**: Data preprocessing and feature engineering
118
+ - **Tuner**: Hyperparameter optimization
119
+ - **Trainer**: Model training and validation
120
+ - **Evaluator**: Model evaluation and comparison
121
+ - **Pusher**: Model deployment and registration
122
+ - **Orchestrator**: Workflow coordination and execution
123
+
124
+ ## Quick Start
125
+
126
+ ### Installation
127
+
128
+ ```bash
129
+ pip install collie-mlops
130
+ ```
131
+
132
+ This will install Collie with all supported ML frameworks including:
133
+ - scikit-learn
134
+ - PyTorch
135
+ - XGBoost
136
+ - LightGBM
137
+ - Transformers (with Sentence Transformers)
138
+
139
+ ### Prerequisites
140
+
141
+ - Python >= 3.10
142
+ - MLflow tracking server (can be local or remote)
143
+
144
+
145
+ ## Components
146
+
147
+ ### Transformer
148
+ Handles data preprocessing, feature engineering, and data validation.
149
+
150
+ ```python
151
+ class CustomTransformer(Transformer):
152
+ def handle(self, event) -> Event:
153
+ # Process your data
154
+ processed_data = ...
155
+ return Event(payload=TransformerPayload(train_data=processed_data))
156
+ ```
157
+
158
+ ### Tuner
159
+ Performs hyperparameter optimization using various strategies.
160
+
161
+ ```python
162
+ class CustomTuner(Tuner):
163
+ def handle(self, event) -> Event:
164
+ # Optimize hyperparameters
165
+ best_params = ...
166
+ return Event(payload=TunerPayload(hyperparameters=best_params))
167
+ ```
168
+
169
+ ### Trainer
170
+ Trains machine learning models with automatic experiment tracking.
171
+
172
+ ```python
173
+ class CustomTrainer(Trainer):
174
+ def handle(self, event) -> Event:
175
+ # Train your model
176
+ model = ...
177
+ return Event(payload=TrainerPayload(model=model))
178
+ ```
179
+
180
+ ### Evaluator
181
+ Evaluates model performance and decides on deployment.
182
+
183
+ ```python
184
+ class CustomEvaluator(Evaluator):
185
+ def handle(self, event) -> Event:
186
+ # Evaluate model performance
187
+ metrics = ...
188
+ is_better: bool = ...
189
+ return Event(payload=EvaluatorPayload(
190
+ metrics=metrics,
191
+ is_better_than_production=is_better
192
+ ))
193
+ ```
194
+
195
+ ### Pusher
196
+ Handles model deployment and registration.
197
+
198
+ ```python
199
+ class CustomPusher(Pusher):
200
+ def handle(self, event) -> Event:
201
+ # Deploy model to production
202
+ model_uri = ...
203
+ return Event(payload=PusherPayload(model_uri=model_uri))
204
+ ```
205
+
206
+ ## Configuration
207
+
208
+ ### MLflow Setup
209
+
210
+ Start MLflow tracking server:
211
+
212
+ ```bash
213
+ mlflow server \
214
+ --backend-store-uri sqlite:///mlflow.db \
215
+ --default-artifact-root ./mlruns \
216
+ --host 0.0.0.0 \
217
+ --port 5000
218
+ ```
219
+
220
+ ## Supported Frameworks
221
+
222
+ Collie supports multiple ML frameworks through its model flavor system currently:
223
+
224
+ - **PyTorch**
225
+ - **scikit-learn**
226
+ - **XGBoost**
227
+ - **LightGBM**
228
+ - **Transformers**
229
+
230
+
231
+ ## Documentation
232
+
233
+ [Here you are]( https://collie-mlops.readthedocs.io/en/latest/getting_started.html )
234
+
235
+ ## Roadmap
236
+
237
+ - [ ] TensorFlow/Keras support
238
+ - [ ] Model monitoring and drift detection
239
+ - [ ] Integrate an LLM training/fine-tuning framework
240
+
241
+ ## License
242
+
243
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
244
+
245
+ ## Citation
246
+
247
+ If you use Collie in your research, please cite:
248
+
249
+ ```bibtex
250
+ @software{collie2025,
251
+ author = {ChingHuanChiu},
252
+ title = {Collie: A Lightweight MLOps Framework},
253
+ year = {2025},
254
+ url = {https://github.com/ChingHuanChiu/collie}
255
+ }
256
+ ```
257
+
258
+ ---
259
+
@@ -0,0 +1,45 @@
1
+ collie/__init__.py,sha256=2WdIuiEzRvQWcfVcwu0jEk-72R-T2oQVlNnRQePeL1g,1834
2
+ collie/_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ collie/_common/decorator.py,sha256=9Kj6bSM6q38h7-Z32VYsHDeUAtHqWKmtLE7oLrkWGqg,1636
4
+ collie/_common/exceptions.py,sha256=cjctM4jEcD5lRxm4gtKiSJ3c8r8tIcyOL_raVJMxQAY,3836
5
+ collie/_common/utils.py,sha256=9vBstA9cUyhKQkxaggrNg-nYrdub-aVYYIsSVhssKWk,339
6
+ collie/_common/mlflow_model_io/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ collie/_common/mlflow_model_io/base_flavor_handler.py,sha256=sSYfigwwwy8fSo8G_0laW91tftVhPDWPUiUyGBYw6mE,535
8
+ collie/_common/mlflow_model_io/flavor_registry.py,sha256=Cw_Og7Ewl2coCaf-Phw1LF5Zp_LxAG6OAyrm7MT8iZ8,2607
9
+ collie/_common/mlflow_model_io/model_flavors.py,sha256=LCW53SAvB_bcR62XnPak_M97SWCf-QgwBJDzmzlrva0,9171
10
+ collie/_common/mlflow_model_io/model_io.py,sha256=y5NcOEItkH0pC3bpqWmc_js9GvfAcqNnIv4oN7LN4pg,1879
11
+ collie/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ collie/contracts/event.py,sha256=vQWZbT5V_3qsU78TCwkrq2gYiq8isxbL8dOEXSKUgic,2207
13
+ collie/contracts/mlflow.py,sha256=dhCTDvKMo3bxW9AjEBp50G_s13uc0RjhieHHs9stTBM,14496
14
+ collie/contracts/orchestrator.py,sha256=eXFQHmzPJ1By3rrQ0_FA-khD0oDyzLqSVaoqlNbZM_w,2136
15
+ collie/core/__init__.py,sha256=RugxaCy6wiyHp4lYQxP9_RGypXQKGOqjbE9ut9HgIC4,956
16
+ collie/core/models.py,sha256=4FhAzXJjQs4712SppniRgydaig4XeA7K5WQWXRpUFzM,3258
17
+ collie/core/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
+ collie/core/enums/components.py,sha256=6ENOAugVAuUzU_jBT-eopeVlkHoSjbjnlT4smhPMJBE,545
19
+ collie/core/enums/ml_models.py,sha256=xoD7aO038wWpryNw35qkMLfkO6dRyKcD_aTlYCIpmwM,386
20
+ collie/core/evaluator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ collie/core/evaluator/evaluator.py,sha256=K5n2Wma0BMVN6EqMK7ObRCxRWgJn7wTXP8W_u735Hjg,4559
22
+ collie/core/orchestrator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ collie/core/orchestrator/orchestrator.py,sha256=9CTuTsysbohKN0cGWyVWxwJdFVT1OpkhDROOiWjko5c,1538
24
+ collie/core/pusher/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ collie/core/pusher/pusher.py,sha256=57nINSau_2xHKCa0P9DzdoEFmueY7-gX44JY7chu5Ss,4008
26
+ collie/core/trainer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
+ collie/core/trainer/trainer.py,sha256=De0t3UHU2205sO9vLhvL1mJISr2HPfO9TbzTj-C1HeM,2421
28
+ collie/core/transform/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
+ collie/core/transform/transform.py,sha256=Xso4DZRVDE6P8YtCYrOKkI_GuMD_ygUDc5OOn-B7I-A,2858
30
+ collie/core/tuner/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
+ collie/core/tuner/tuner.py,sha256=knB7pkB_D-dhM6qKvSwoHTPKnLdP_47sZAMj5GvarHg,2560
32
+ collie/helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ collie/helper/pytorch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
+ collie/helper/pytorch/trainer.py,sha256=TJb-ISRh3PMCeqY_rEbtqRGlSGGY0VuRZmayj4OFOhE,10921
35
+ collie/helper/pytorch/callback/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
+ collie/helper/pytorch/callback/callback.py,sha256=NHfhUBen8odZp9XJKkRU-NbLeKjEZbKtrimejpWiGf4,3539
37
+ collie/helper/pytorch/callback/earlystop.py,sha256=8smHSn23Dl_jo2omJJiB9rCO-SgOYY2AvcEwh6Fgr1I,1498
38
+ collie/helper/pytorch/callback/model_checkpoint.py,sha256=ZYQ0EjG1p-A9s8igr9ck0FA-AF-9ISz8QbpwPkTz_uc,3680
39
+ collie/helper/pytorch/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
+ collie/helper/pytorch/model/loader.py,sha256=ocGXKelpjSXDfG_ZHKl1-1xi7NyoF6BPoVs3TCqJs9k,2239
41
+ collie_mlops-0.1.1b0.dist-info/LICENSE,sha256=10_zh6gMsjITzBc30M8T7A2Kv5xPNJ5x4Y0gYmk-Zvs,1070
42
+ collie_mlops-0.1.1b0.dist-info/METADATA,sha256=mFHHGUbz2A1S5NkordLv1MMla4i-WQorHHf3xMWlIe8,8763
43
+ collie_mlops-0.1.1b0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
44
+ collie_mlops-0.1.1b0.dist-info/top_level.txt,sha256=7Br75OZSTintD5Mvq6h42yDMf0oR_5n1Ec2u6FuTxAY,7
45
+ collie_mlops-0.1.1b0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.42.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ collie