collie-mlops 0.1.0b0__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.

Potentially problematic release.


This version of collie-mlops might be problematic. Click here for more details.

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.0b0.dist-info/METADATA +217 -0
  42. collie_mlops-0.1.0b0.dist-info/RECORD +45 -0
  43. collie_mlops-0.1.0b0.dist-info/WHEEL +5 -0
  44. collie_mlops-0.1.0b0.dist-info/licenses/LICENSE +21 -0
  45. collie_mlops-0.1.0b0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,217 @@
1
+ Metadata-Version: 2.4
2
+ Name: collie-mlops
3
+ Version: 0.1.0b0
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
+ Dynamic: license-file
45
+
46
+ # Collie 🐕
47
+
48
+ [![PyPI version](https://badge.fury.io/py/collie-mlops.svg)](https://badge.fury.io/py/collie-mlops)
49
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
50
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
51
+ [![Documentation](https://img.shields.io/badge/docs-sphinx-blue.svg)](docs/_build/html/index.html)
52
+ [![codecov](https://codecov.io/gh/ChingHuanChiu/collie/branch/main/graph/badge.svg)](https://codecov.io/gh/ChingHuanChiu/collie)
53
+
54
+ A Lightweight MLOps Framework for Machine Learning Workflows
55
+
56
+
57
+ ## Overview
58
+
59
+ 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.
60
+
61
+ ## Features
62
+
63
+ - **Component-Based Architecture**: Modular design with specialized components for each ML workflow stage
64
+ - **MLflow Integration**: Built-in experiment tracking, model registration, and deployment capabilities
65
+ - **Pipeline Orchestration**: Seamless workflow management with event-driven architecture
66
+ - **Model Management**: Automated model versioning, staging, and promotion
67
+ - **Framework Agnostic**: Supports multiple ML frameworks (PyTorch, scikit-learn, XGBoost, LightGBM, Transformers)
68
+
69
+ ## Architecture
70
+
71
+ Collie follows an event-driven architecture with the following core components:
72
+
73
+ - **Transformer**: Data preprocessing and feature engineering
74
+ - **Tuner**: Hyperparameter optimization
75
+ - **Trainer**: Model training and validation
76
+ - **Evaluator**: Model evaluation and comparison
77
+ - **Pusher**: Model deployment and registration
78
+ - **Orchestrator**: Workflow coordination and execution
79
+
80
+ ## Quick Start
81
+
82
+ ### Installation
83
+
84
+ ```bash
85
+ pip install collie-mlops
86
+ ```
87
+
88
+ This will install Collie with all supported ML frameworks including:
89
+ - scikit-learn
90
+ - PyTorch
91
+ - XGBoost
92
+ - LightGBM
93
+ - Transformers (with Sentence Transformers)
94
+
95
+ ### Prerequisites
96
+
97
+ - Python >= 3.10
98
+ - MLflow tracking server (can be local or remote)
99
+
100
+
101
+ ## Components
102
+
103
+ ### Transformer
104
+ Handles data preprocessing, feature engineering, and data validation.
105
+
106
+ ```python
107
+ class CustomTransformer(Transformer):
108
+ def handle(self, event) -> Event:
109
+ # Process your data
110
+ processed_data = self.preprocess(raw_data)
111
+ return Event(payload=TransformerPayload(train_data=processed_data))
112
+ ```
113
+
114
+ ### Tuner
115
+ Performs hyperparameter optimization using various strategies.
116
+
117
+ ```python
118
+ class CustomTuner(Tuner):
119
+ def handle(self, event) -> Event:
120
+ # Optimize hyperparameters
121
+ best_params = self.optimize(search_space)
122
+ return Event(payload=TunerPayload(hyperparameters=best_params))
123
+ ```
124
+
125
+ ### Trainer
126
+ Trains machine learning models with automatic experiment tracking.
127
+
128
+ ```python
129
+ class CustomTrainer(Trainer):
130
+ def handle(self, event) -> Event:
131
+ # Train your model
132
+ model = self.train(data, hyperparameters)
133
+ return Event(payload=TrainerPayload(model=model))
134
+ ```
135
+
136
+ ### Evaluator
137
+ Evaluates model performance and decides on deployment.
138
+
139
+ ```python
140
+ class CustomEvaluator(Evaluator):
141
+ def handle(self, event) -> Event:
142
+ # Evaluate model performance
143
+ metrics = self.evaluate(model, test_data)
144
+ is_better = self.compare_with_production(metrics)
145
+ return Event(payload=EvaluatorPayload(
146
+ metrics=metrics,
147
+ is_better_than_production=is_better
148
+ ))
149
+ ```
150
+
151
+ ### Pusher
152
+ Handles model deployment and registration.
153
+
154
+ ```python
155
+ class CustomPusher(Pusher):
156
+ def handle(self, event) -> Event:
157
+ # Deploy model to production
158
+ model_uri = self.deploy(model)
159
+ return Event(payload=PusherPayload(model_uri=model_uri))
160
+ ```
161
+
162
+ ## Configuration
163
+
164
+ ### MLflow Setup
165
+
166
+ Start MLflow tracking server:
167
+
168
+ ```bash
169
+ mlflow server \
170
+ --backend-store-uri sqlite:///mlflow.db \
171
+ --default-artifact-root ./mlruns \
172
+ --host 0.0.0.0 \
173
+ --port 5000
174
+ ```
175
+
176
+ ## Supported Frameworks
177
+
178
+ Collie supports multiple ML frameworks through its model flavor system currently:
179
+
180
+ - **PyTorch**
181
+ - **scikit-learn**
182
+ - **XGBoost**
183
+ - **LightGBM**
184
+ - **Transformers**
185
+
186
+
187
+ ## Documentation
188
+
189
+ [Here you are]( https://collie-mlops.readthedocs.io/en/latest/getting_started.html )
190
+
191
+ ## Roadmap
192
+
193
+ - [ ] TensorFlow/Keras support
194
+ - [ ] Model monitoring and drift detection
195
+ - [ ] Integration with Airflow/Kubeflow
196
+ - [ ] Integrate an LLM training/fine-tuning framework
197
+ - [ ] Solve the issue about heavy import and installation.
198
+
199
+ ## License
200
+
201
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
202
+
203
+ ## Citation
204
+
205
+ If you use Collie in your research, please cite:
206
+
207
+ ```bibtex
208
+ @software{collie2025,
209
+ author = {ChingHuanChiu},
210
+ title = {Collie: A Lightweight MLOps Framework},
211
+ year = {2025},
212
+ url = {https://github.com/ChingHuanChiu/collie}
213
+ }
214
+ ```
215
+
216
+ ---
217
+
@@ -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.0b0.dist-info/licenses/LICENSE,sha256=10_zh6gMsjITzBc30M8T7A2Kv5xPNJ5x4Y0gYmk-Zvs,1070
42
+ collie_mlops-0.1.0b0.dist-info/METADATA,sha256=LKIx5sDmwiPaM6ADSmbkR65li06BVKyftDChJQv2BEw,6964
43
+ collie_mlops-0.1.0b0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
44
+ collie_mlops-0.1.0b0.dist-info/top_level.txt,sha256=7Br75OZSTintD5Mvq6h42yDMf0oR_5n1Ec2u6FuTxAY,7
45
+ collie_mlops-0.1.0b0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ChingHuanChiu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ collie