Metadata-Version: 2.4
Name: automl_self_improvement
Version: 1.0.1
Summary: Autonomous AI model optimization framework with meta-learning and hybrid tuning
Author-email: Krishna Bajpai <krishna@krishnabajpai.me>
License-Expression: MIT
Project-URL: Homepage, https://github.com/krish567366/automl-self-improvement
Project-URL: Documentation, https://github.com/krish567366/automl_self_improvement/tree/main/docs
Project-URL: Repository, https://github.com/krish567366/automl-self-improvement
Project-URL: Consulting, https://krishnabajpai.me
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
Requires-Dist: torch>=2.0.0
Requires-Dist: optuna>=3.2.0
Requires-Dist: fastapi>=0.95.0
Requires-Dist: stable-baselines3>=2.0.0
Requires-Dist: diffusers>=0.16.0
Requires-Dist: pymoo>=0.6.0
Requires-Dist: scikit-learn>=1.2.0
Requires-Dist: ray[tune]>=2.5.0
Requires-Dist: python-jose>=3.3.0
Requires-Dist: uvicorn>=0.21.0

# AI Self-Improvement & AutoML Framework 🚀

[![PyPI Version](https://img.shields.io/pypi/v/automl_self_improvement)](https://pypi.org/project/automl_self_improvement/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Documentation](https://img.shields.io/badge/docs-available-brightgreen)](https://your-docs-site.com)
[![Consulting](https://img.shields.io/badge/Consulting-Krishna%20Bajpai-blue?style=flat-square&logo=github)](https://krishnabajpai.me)

**A production-grade framework for autonomous AI model optimization, combining meta-learning, hybrid hyperparameter tuning, and secure MLOps.**  
Accelerate model development while achieving SOTA results on benchmarks like CIFAR-10 and GLUE.

---

## 📌 Key Features

- **Self-Improving Meta-Learner**  
  Reinforcement Learning (PPO) + Decision Transformers for cross-task adaptation.
- **Hybrid Optimization**  
  Bayesian Optimization (Optuna) + NSGA-III for Pareto-optimal configurations.
- **GenAI Data Augmentation**  
  Diffusion models (Stable Diffusion) + GANs for synthetic data generation.
- **Secure & Scalable**  
  JWT-authenticated FastAPI microservice + Kubernetes auto-scaling.
- **Quantization Ready**  
  ONNX/TensorRT support for 3x inference speedup.

---

## 🛠 Installation

### PyPI (Lightweight)
```bash
pip install automl_self_improvement
```

### Docker (Full Stack)
```bash
docker build -t automl:latest . 
docker run -p 8000:8000 automl:latest
```

### From Source
```bash
git clone https://github.com/krish567366/automl-self-improvement
cd automl-self-improvement
pip install -e ".[dev]"
```

---

## 🚀 Quick Start

### 1. Launch the Microservice
```bash
uvicorn src.automl.api.app:app --reload
```

### 2. Train a Model via API
```python
import requests

# Authenticate
token = requests.post(
    "http://localhost:8000/token",
    data={"username": "admin", "password": "secret"}
).json()["access_token"]

# Start training job
response = requests.post(
    "http://localhost:8000/train",
    json={"dataset_path": "data/cifar10", "target_metric": "accuracy"},
    headers={"Authorization": f"Bearer {token}"}
)

print(response.json())  # {"job_id": "123", "status": "started"}
```

### 3. Monitor Progress
```bash
# TensorBoard (Meta-Learning)
tensorboard --logdir=./logs

# Kubernetes dashboard
kubectl get pods -n automl
```

---

## 🔧 Advanced Usage

### Meta-Learning with Pre-Trained Policies
```python
from src.automl.core import MetaLearner
from src.automl.core.meta_env import AutoMLEnv

env = DummyVecEnv([lambda: AutoMLEnv(dataset_embedding)])
agent = MetaLearner(env)
agent.train(timesteps=1e5)  # GPU-accelerated
best_config = agent.recommend_config(validation_data)
```

### Evolutionary Multi-Objective Optimization
```python
from src.automl.hyperparameters.evolutionary import EvolutionaryOptimizer

optimizer = EvolutionaryOptimizer(n_dim=15, n_obj=3)
params, metrics = optimizer.optimize()  # Accuracy vs Latency vs Memory
```

---

## 📊 Benchmarks

| Framework           | CIFAR-10 (Accuracy) | Training Time (hrs) | GPU Memory (GB) |
|---------------------|---------------------|---------------------|-----------------|
| **Ours**            | **92.3%**           | 1.8                 | 6.7             |
| AutoKeras           | 88.1%               | 3.5                 | 8.2             |
| H2O AutoML          | 85.6%               | 4.1                 | 9.8             |
| AutoGluon           | 89.7%               | 2.9                 | 7.5             |

---

## 📚 Documentation

Explore these resources:
- [API Reference](https://github.com/krish567366/automl_self_improvement/blob/main/docs/API_REFERENCE.md) - Full spec for endpoints and SDK
- [Tuning Strategies](https://github.com/krish567366/automl_self_improvement/blob/main/docs/TUNING_STRATEGIES.md) - When to use BO vs RL vs EA
- [Security Guidelines](https://github.com/krish567366/automl_self_improvement/blob/main/docs/SECURITY_GUIDELINES.md) - RBAC, secrets management

---

## 🤝 Contributing

1. Fork the repository
2. Install dev dependencies:
   ```bash
   pip install -e ".[dev]"
   ```
3. Run tests:
   ```bash
   pytest tests/ --cov=src/ --cov-report=html
   ```
4. Submit PRs to `develop` branch


---

## 📜 License

MIT License. See [LICENSE](LICENSE).

---

## 📝 Citation

If used in research:
```bibtex
@software{automl_self_improvement,
  author = {Krishna Bajpai},
  title = {AI Self-Improvement Framework},
  year = {2025},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/krish567366/automl-self-improvement}}
}
```

---

**Built with ❤️ and**  
[![PyTorch](https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?logo=PyTorch&logoColor=white)](https://pytorch.org)
[![Hugging Face](https://img.shields.io/badge/Hugging%20Face-%23FFD21E.svg?logo=huggingface&logoColor=black)](https://huggingface.co)
[![Kubernetes](https://img.shields.io/badge/Kubernetes-%23326CE5.svg?logo=kubernetes&logoColor=white)](https://kubernetes.io)
```
