Metadata-Version: 2.4
Name: wyolo
Version: 1.0.1
Summary: Professional YOLO training library with MLOps integration
Project-URL: Homepage, https://github.com/wisrovi/wyoloservice2_worker
Project-URL: Documentation, https://wyolo.readthedocs.io/
Project-URL: Repository, https://github.com/wisrovi/wyoloservice2_worker.git
Project-URL: Bug Tracker, https://github.com/wisrovi/wyoloservice2_worker/issues
Author-email: William Steve Rodriguez Villamizar <wisrovi.rodriguez@gmail.com>
Maintainer-email: William Steve Rodriguez Villamizar <wisrovi.rodriguez@gmail.com>
License: MIT License
        
        Copyright (c) 2024 William Steve Rodriguez Villamizar
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: computer-vision,machine-learning,mlflow,mlops,yolo
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Requires-Dist: click>=8.0.0
Requires-Dist: dvc>=2.0.0
Requires-Dist: gputil>=1.4.0
Requires-Dist: loguru>=0.6.0
Requires-Dist: mlflow>=2.0.0
Requires-Dist: pillow>=9.0.0
Requires-Dist: psutil>=5.8.0
Requires-Dist: python-slugify>=6.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: redis>=4.0.0
Requires-Dist: ultralytics>=8.0.0
Requires-Dist: wredis>=0.1.0
Provides-Extra: dev
Requires-Dist: black>=22.0.0; extra == 'dev'
Requires-Dist: build>=0.8.0; extra == 'dev'
Requires-Dist: bump2version>=1.0.0; extra == 'dev'
Requires-Dist: flake8>=5.0.0; extra == 'dev'
Requires-Dist: isort>=5.10.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pre-commit>=2.20.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.8.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: twine>=4.0.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=8.5.0; extra == 'docs'
Requires-Dist: mkdocs>=1.4.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.19.0; extra == 'docs'
Provides-Extra: tune
Requires-Dist: ray[tune]>=2.0.0; extra == 'tune'
Description-Content-Type: text/markdown

# wyolo: Professional YOLO MLOps Orchestrator

[![Pylint Score](https://img.shields.io/badge/Pylint-9.5%2B-green.svg)](https://www.pylint.org/)
[![Security: Bandit](https://img.shields.io/badge/Security-Bandit-yellow.svg)](https://github.com/PyCQA/bandit)
[![Python 3.8+](https://img.shields.io/badge/Python-3.8%2B-blue.svg)](https://www.python.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

**wyolo** is an enterprise-grade framework designed to manage the full lifecycle of YOLO and RT-DETR models. By leveraging a robust **State Machine** architecture and native **MLOps** integrations, `wyolo` provides a high-resiliency environment for computer vision training, tracking, and deployment.

---

## 🏗️ Architecture & System Design

### 1. 🚶 Execution Walkthrough (State Machine)
The system operates as a deterministic pipeline governed by conditional logic. It ensures environment integrity before committing expensive GPU resources.

*For a visual flowchart, please refer to [README_GIT.md](README_GIT.md).*

### 2. 🗺️ Detailed System Workflow
Sequence of operations between the orchestrator, specialized states, and external MLOps entities.

*For the sequence interaction diagram, please refer to [README_GIT.md](README_GIT.md).*

### 3. 🗺️ Architecture Components
A layered view of the ecosystem, illustrating the separation between orchestration, business logic, and infrastructure.

*For the architectural mindmap, please refer to [README_GIT.md](README_GIT.md).*

---

## ✨ Key Features & Performance

- **🚀 State-Driven Orchestration:** Complex logic implemented via `wpipe` for maximum resiliency.
- **🛡️ Quality-First Design:** Maintains **Pylint > 9.5** and regular **Bandit** security audits.
- **📊 Native MLOps:** Built-in **MLflow** tracking, automated model registry, and **DVC** data versioning.
- **⚡ Resource Efficiency:** Real-time monitoring of Peak RAM, CPU usage, and VRAM optimization.
- **📦 Distributed Architecture:** Designed to run as an independent worker container (`wtrain-service`).

---

## ⚙️ Lifecycle Management

### a. Build Process (CI/CD)
1.  **Multi-Stage Dockerfile:** Optimizes image size while providing CUDA/CUDNN support.
2.  **Environment Isolation:** Automatic resolution of complex dependencies (RT-DETR, MLflow, Redis).
3.  **Sanity Checks:** Static analysis executed during the build phase.

### b. Runtime Process (Execution)
1.  **Initialization:** `train_service.sh` triggers the service wrapper.
2.  **Discovery:** Automatic discovery of GPU topology and dataset paths.
3.  **Orchestration:** The Pipeline engine manages retries, timeouts, and state transitions.
4.  **Persistence:** Results and logs are persisted to `wtrain.db` (SQLite WAL) for audit trails.

---

## 📂 File-by-File Guide

| Component | Description |
|:---|:---|
| `src/wyolo/app/main.py` | Entry point. Configures the `wpipe` state machine and orchestrates the worker. |
| `src/wyolo/app/states/` | Atomic state implementations (Check GPU, Dataset, MinIO, Train). |
| `src/wyolo/core/` | Core logic for the `TrainerWrapper` and `MLflowManager`. |
| `src/wyolo/docker/` | Production-ready orchestration scripts and requirements. |
| `src/wyolo/trainer/` | Specialized DTOs and implementation of the Elemental design pattern. |
| `Makefile` | The central command center for installation, testing, and deployment. |
| `index.html` | High-impact landing page for project stakeholders. |

---

## 📂 Project Structure
```text
src/wyolo
├── app
│   ├── main.py                <-- Orchestrator
│   └── states                 <-- State Machine Steps
│       ├── check/             <-- Validation Logic
│       ├── train/             <-- Training Execution
│       └── error_process/     <-- Resiliency Handling
├── core
│   ├── trainer_wrapper.py     <-- Engine Wrapper
│   └── mlflow_manager.py      <-- MLOps Tracking
└── docker
    ├── train_service.sh       <-- Production Entrypoint
    └── requirements.txt       <-- Locked Dependencies
```

---

## 🚀 Installation & Usage

```bash
# 1. Setup environment
make install

# 2. Run linting & security
make lint

# 3. Execute training suite
wyolo-train --config_path my_config.yaml
```

---

## 👨‍💻 Author
**William Rodríguez - wisrovi**  
*Technology Evangelist & AI Solutions Architect*  
[LinkedIn Profile](https://es.linkedin.com/in/wisrovi-rodriguez)

---

## 📄 Bibliography & Resources
- [Ultralytics Framework](https://docs.ultralytics.com/)
- [MLflow MLOps Platform](https://mlflow.org/)
- [wpipe Orchestration Library](https://github.com/wisrovi/wpipe)
