kitepy 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 (34) hide show
  1. kitepy-0.1.0/LICENSE +21 -0
  2. kitepy-0.1.0/PKG-INFO +394 -0
  3. kitepy-0.1.0/README.md +335 -0
  4. kitepy-0.1.0/kitepy/__init__.py +60 -0
  5. kitepy-0.1.0/kitepy/core/__init__.py +57 -0
  6. kitepy-0.1.0/kitepy/core/base.py +782 -0
  7. kitepy-0.1.0/kitepy/core/callbacks.py +374 -0
  8. kitepy-0.1.0/kitepy/core/config.py +467 -0
  9. kitepy-0.1.0/kitepy/core/engine.py +549 -0
  10. kitepy-0.1.0/kitepy/core/lr_finder.py +195 -0
  11. kitepy-0.1.0/kitepy/core/metrics.py +234 -0
  12. kitepy-0.1.0/kitepy/core/presets.py +500 -0
  13. kitepy-0.1.0/kitepy/core/utils.py +510 -0
  14. kitepy-0.1.0/kitepy/pillars/__init__.py +12 -0
  15. kitepy-0.1.0/kitepy/pillars/audio/__init__.py +13 -0
  16. kitepy-0.1.0/kitepy/pillars/audio/models.py +0 -0
  17. kitepy-0.1.0/kitepy/pillars/generative/__init__.py +13 -0
  18. kitepy-0.1.0/kitepy/pillars/generative/models.py +0 -0
  19. kitepy-0.1.0/kitepy/pillars/language/__init__.py +13 -0
  20. kitepy-0.1.0/kitepy/pillars/language/models.py +0 -0
  21. kitepy-0.1.0/kitepy/pillars/multimodal/__init__.py +13 -0
  22. kitepy-0.1.0/kitepy/pillars/multimodal/models.py +0 -0
  23. kitepy-0.1.0/kitepy/pillars/vision/__init__.py +22 -0
  24. kitepy-0.1.0/kitepy/pillars/vision/data.py +590 -0
  25. kitepy-0.1.0/kitepy/pillars/vision/models.py +207 -0
  26. kitepy-0.1.0/kitepy/pillars/vision/wrappers.py +510 -0
  27. kitepy-0.1.0/kitepy.egg-info/PKG-INFO +394 -0
  28. kitepy-0.1.0/kitepy.egg-info/SOURCES.txt +32 -0
  29. kitepy-0.1.0/kitepy.egg-info/dependency_links.txt +1 -0
  30. kitepy-0.1.0/kitepy.egg-info/requires.txt +39 -0
  31. kitepy-0.1.0/kitepy.egg-info/top_level.txt +1 -0
  32. kitepy-0.1.0/pyproject.toml +116 -0
  33. kitepy-0.1.0/setup.cfg +4 -0
  34. kitepy-0.1.0/tests/test_all_examples.py +335 -0
kitepy-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ExtraKaizen
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.
kitepy-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,394 @@
1
+ Metadata-Version: 2.4
2
+ Name: kitepy
3
+ Version: 0.1.0
4
+ Summary: Dead Simple Deep Learning - Build and train models with minimal code
5
+ Author-email: Your Name <you@example.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yourusername/kitepy
8
+ Project-URL: Documentation, https://kitepy.readthedocs.io
9
+ Project-URL: Repository, https://github.com/yourusername/kitepy
10
+ Project-URL: Bug Tracker, https://github.com/yourusername/kitepy/issues
11
+ Keywords: deep learning,machine learning,pytorch,neural networks,ai
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: torch>=2.0.0
26
+ Requires-Dist: torchvision>=0.15.0
27
+ Requires-Dist: timm>=0.9.0
28
+ Requires-Dist: pyyaml>=6.0
29
+ Requires-Dist: numpy>=1.21.0
30
+ Provides-Extra: llm
31
+ Requires-Dist: transformers>=4.30.0; extra == "llm"
32
+ Requires-Dist: datasets>=2.12.0; extra == "llm"
33
+ Requires-Dist: tokenizers>=0.13.0; extra == "llm"
34
+ Provides-Extra: distributed
35
+ Requires-Dist: deepspeed>=0.9.0; extra == "distributed"
36
+ Requires-Dist: accelerate>=0.20.0; extra == "distributed"
37
+ Provides-Extra: tracking
38
+ Requires-Dist: wandb>=0.15.0; extra == "tracking"
39
+ Requires-Dist: tensorboard>=2.13.0; extra == "tracking"
40
+ Provides-Extra: advanced
41
+ Requires-Dist: flash-attn>=2.0.0; extra == "advanced"
42
+ Requires-Dist: bitsandbytes>=0.41.0; extra == "advanced"
43
+ Provides-Extra: dev
44
+ Requires-Dist: pytest>=7.3.0; extra == "dev"
45
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
46
+ Requires-Dist: black>=23.3.0; extra == "dev"
47
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
48
+ Requires-Dist: mypy>=1.3.0; extra == "dev"
49
+ Requires-Dist: isort>=5.12.0; extra == "dev"
50
+ Provides-Extra: all
51
+ Requires-Dist: transformers>=4.30.0; extra == "all"
52
+ Requires-Dist: datasets>=2.12.0; extra == "all"
53
+ Requires-Dist: tokenizers>=0.13.0; extra == "all"
54
+ Requires-Dist: deepspeed>=0.9.0; extra == "all"
55
+ Requires-Dist: accelerate>=0.20.0; extra == "all"
56
+ Requires-Dist: wandb>=0.15.0; extra == "all"
57
+ Requires-Dist: tensorboard>=2.13.0; extra == "all"
58
+ Dynamic: license-file
59
+
60
+ # kitepy - Dead Simple Deep Learning 🚀
61
+
62
+ Build and train deep learning models with **one line of code**.
63
+
64
+ ```python
65
+ from kitepy import CNN
66
+ CNN("resnet18").train("cifar10")
67
+ ```
68
+
69
+ That's it. No boilerplate. No configuration hell. Just magic. ✨
70
+
71
+ ---
72
+
73
+ ## Features
74
+
75
+ - **🎯 One-Line Training**: `CNN("resnet18").train("cifar10")`
76
+ - **🔧 Zero Configuration**: Smart defaults that just work
77
+ - **🎨 Full Customization**: Override anything when needed
78
+ - **🌐 Multi-Modal**: CNNs & Transformers (LLMs, VLMs coming soon)
79
+ - **⚡ Production Ready**: Built on PyTorch and timm (HuggingFace coming soon)
80
+ - **🚄 Fast**: Automatic mixed precision (multi-GPU & distributed coming soon)
81
+
82
+ ---
83
+
84
+ ## Installation
85
+
86
+ ```bash
87
+ # Minimal install (CNN support)
88
+ pip install kitepy
89
+
90
+ # With LLM support
91
+ pip install kitepy[llm]
92
+
93
+ # Full install (all features)
94
+ pip install kitepy[all]
95
+
96
+ # Development install
97
+ git clone https://github.com/ExtraKaizen/kitepy
98
+ cd kitepy
99
+ pip install -e .
100
+ ```
101
+
102
+ ---
103
+
104
+ ## Quick Start
105
+
106
+ ### Example 1: Simplest Possible
107
+
108
+ ```python
109
+ from kitepy import CNN
110
+
111
+ # Train ResNet-18 on CIFAR-10
112
+ CNN("resnet18").train("cifar10")
113
+ ```
114
+
115
+ ### Example 2: Custom Settings
116
+
117
+ ```python
118
+ # Override any parameter
119
+ CNN("resnet50").train(
120
+ data="cifar100",
121
+ epochs=50,
122
+ batch_size=128,
123
+ lr=0.001,
124
+ )
125
+ ```
126
+
127
+ ### Example 3: Save and Load
128
+
129
+ ```python
130
+ # Train and save
131
+ model = CNN("resnet18")
132
+ model.train("cifar10", epochs=10)
133
+ model.save("my_model.pt")
134
+
135
+ # Load and use
136
+ loaded = CNN.load("my_model.pt")
137
+ predictions = loaded.predict(my_images)
138
+ ```
139
+
140
+ ### Example 4: Custom PyTorch Model
141
+
142
+ ```python
143
+ import torch.nn as nn
144
+
145
+ # Use your own model
146
+ my_model = nn.Sequential(
147
+ nn.Conv2d(3, 64, 3),
148
+ nn.ReLU(),
149
+ # ... your architecture
150
+ )
151
+
152
+ CNN(my_model).train("my_dataset")
153
+ ```
154
+
155
+ ---
156
+
157
+ ## Supported Models
158
+
159
+ ### CNNs (Vision)
160
+ - **ResNet**: `resnet18`, `resnet34`, `resnet50`, `resnet101`, `resnet152`
161
+ - **EfficientNet**: `efficientnet_b0` through `efficientnet_b7`
162
+ - **MobileNet**: `mobilenet_v2`, `mobilenet_v3_small`, `mobilenet_v3_large`
163
+ - **VGG**: `vgg11`, `vgg13`, `vgg16`, `vgg19`
164
+ - **DenseNet**: `densenet121`, `densenet169`, `densenet201`
165
+ - **And 800+ more from timm!**
166
+
167
+ ### Vision Transformers
168
+ - **ViT**: `vit_tiny`, `vit_small`, `vit_base`, `vit_large`, `vit_huge`
169
+ - **DeiT**: `deit_tiny`, `deit_small`, `deit_base`
170
+ - **Swin**: `swin_tiny`, `swin_small`, `swin_base`, `swin_large`
171
+
172
+ ### Coming Soon (Phase 2+)
173
+ - **LLMs**: GPT, LLaMA, Mistral (Phase 3)
174
+ - **VLMs**: CLIP, BLIP, Flamingo (Phase 4)
175
+ - **Audio**: Whisper, AST (Phase 5)
176
+ - **Diffusion**: Stable Diffusion (Phase 5)
177
+
178
+ ---
179
+
180
+ ## Supported Datasets
181
+
182
+ ### Built-in Vision Datasets
183
+ - `cifar10`, `cifar100`
184
+ - `mnist`, `fashion_mnist`
185
+ - `imagenet` (requires manual download)
186
+
187
+ ### Custom Datasets
188
+ ```python
189
+ # From path (ImageFolder structure)
190
+ CNN("resnet18").train("/path/to/my/dataset")
191
+
192
+ # From PyTorch DataLoader
193
+ from torch.utils.data import DataLoader
194
+ my_loader = DataLoader(...)
195
+ CNN("resnet18").train(my_loader)
196
+ ```
197
+
198
+ ---
199
+
200
+ ## Advanced Usage
201
+
202
+ ### Configuration System
203
+
204
+ ```python
205
+ from kitepy import CNN, CNNConfig, TrainingConfig
206
+
207
+ # Method 1: Config objects
208
+ model_config = CNNConfig(
209
+ depth=50,
210
+ num_classes=100,
211
+ dropout=0.5
212
+ )
213
+
214
+ train_config = TrainingConfig(
215
+ epochs=100,
216
+ batch_size=256,
217
+ lr=0.01,
218
+ optimizer="adamw",
219
+ scheduler="cosine",
220
+ )
221
+
222
+ model = CNN("resnet50", config=model_config)
223
+ model.train("cifar100", **train_config.to_dict())
224
+ ```
225
+
226
+ ### YAML Configuration
227
+
228
+ ```yaml
229
+ # config.yaml
230
+ model:
231
+ arch: resnet
232
+ depth: 50
233
+ num_classes: 100
234
+
235
+ training:
236
+ epochs: 100
237
+ batch_size: 256
238
+ lr: 0.01
239
+ optimizer: adamw
240
+ ```
241
+
242
+ ```python
243
+ model = CNN(config="config.yaml")
244
+ model.train("cifar100")
245
+ ```
246
+
247
+ ### Model Inspection
248
+
249
+ ```python
250
+ model = CNN("resnet18")
251
+
252
+ # Show architecture and config
253
+ model.describe()
254
+
255
+ # Show parameter count
256
+ model.summary()
257
+
258
+ # Show all config options
259
+ model.explain_config()
260
+
261
+ # Get underlying PyTorch model
262
+ pytorch_model = model.unwrap()
263
+ ```
264
+
265
+ ### List Available Models
266
+
267
+ ```python
268
+ from kitepy import list_models, list_datasets
269
+
270
+ # List all CNN models
271
+ models = list_models("cnn")
272
+ print(models) # ['resnet18', 'resnet50', ...]
273
+
274
+ # List all datasets
275
+ datasets = list_datasets()
276
+ print(datasets) # ['cifar10', 'imagenet', ...]
277
+ ```
278
+
279
+ ### Register Custom Presets
280
+
281
+ ```python
282
+ from kitepy import register_preset
283
+
284
+ register_preset("cnn", "my_custom_resnet", {
285
+ "arch": "resnet",
286
+ "depth": 101,
287
+ "width_multiplier": 2.0,
288
+ })
289
+
290
+ # Now use it
291
+ CNN("my_custom_resnet").train("imagenet")
292
+ ```
293
+
294
+ ---
295
+
296
+ ## API Reference
297
+
298
+ ### CNN
299
+
300
+ ```python
301
+ CNN(
302
+ model: str | nn.Module, # Model name or custom PyTorch model
303
+ config: dict | Config | str, # Config dict, object, or YAML path
304
+ **kwargs # Override any config value
305
+ )
306
+ ```
307
+
308
+ **Methods:**
309
+ - `.train(data, epochs, **kwargs)` - Train the model
310
+ - `.evaluate(data)` - Evaluate on test data
311
+ - `.predict(input)` - Run inference
312
+ - `.save(path)` - Save checkpoint
313
+ - `.load(path)` - Load checkpoint (classmethod)
314
+ - `.describe()` - Print model info
315
+ - `.summary()` - Print parameter count
316
+ - `.explain_config()` - Show config options
317
+ - `.unwrap()` - Get PyTorch model
318
+
319
+ ---
320
+
321
+ ## Architecture
322
+
323
+ ```
324
+ kitepy/
325
+ ├── api/ # Public APIs (CNN, LLM, VLM, etc.)
326
+ ├── core/ # Core engines (training, data, optimization)
327
+ ├── config/ # Configuration system
328
+ ├── models/ # Architecture templates
329
+ ├── data/ # Data loading
330
+ ├── wrappers/ # timm, HuggingFace wrappers
331
+ └── utils/ # Utilities
332
+ ```
333
+
334
+ **Key Principle**: We wrap existing ecosystems (PyTorch, timm, HuggingFace) instead of reimplementing.
335
+
336
+ ---
337
+
338
+ ## Development Roadmap
339
+
340
+ - [x] **Phase 1**: CNN Module ✅
341
+ - [x] **Phase 2**: Vision Transformers ✅
342
+ - [ ] **Phase 3**: LLM Module (Coming Soon)
343
+ - [ ] **Phase 4**: VLM Module (Planned)
344
+ - [ ] **Phase 5**: Audio & Diffusion (Planned)
345
+
346
+ ---
347
+
348
+ ## Requirements
349
+
350
+ - Python >= 3.8
351
+ - PyTorch >= 2.0.0
352
+ - timm >= 0.9.0 (for vision models)
353
+ - transformers >= 4.30.0 (for LLMs, optional)
354
+
355
+ ---
356
+
357
+ ## Contributing
358
+
359
+ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
360
+
361
+ ---
362
+
363
+ ## License
364
+
365
+ MIT License - see [LICENSE](LICENSE) for details.
366
+
367
+ ---
368
+
369
+ ## Citation
370
+
371
+ If you use kitepy in your research, please cite:
372
+
373
+ ```bibtex
374
+ @software{kitepy2026,
375
+ title={kitepy: Dead Simple Deep Learning},
376
+ author={ExtraKaizen},
377
+ year={2026},
378
+ url={https://github.com/ExtraKaizen/kitepy}
379
+ }
380
+ ```
381
+
382
+ ---
383
+
384
+ ## Acknowledgments
385
+
386
+ Built on the shoulders of giants:
387
+ - [PyTorch](https://pytorch.org/)
388
+ - [timm](https://github.com/huggingface/pytorch-image-models)
389
+ - [HuggingFace Transformers](https://huggingface.co/transformers)
390
+ - [PyTorch Lightning](https://lightning.ai/)
391
+
392
+ ---
393
+
394
+ **Made with ❤️ for the AI community**