Skip to main content

Unified AI/ML toolkit providing a consistent API across sklearn, PyTorch, TensorFlow, and 150+ models.

Project description

Ai_MK_Toolkit

A production-grade Python package providing a unified API for 150+ machine learning, deep learning, NLP, reinforcement learning, and computer vision models. All models are callable via intuitive dot-path imports like ai_mk_toolkit.ml.ResNet50().

This package is a unified interface wrapper built on top of open-source libraries. It does not reimplement algorithms but provides convenient access to state-of-the-art models from leading frameworks.

🚀 Key Features

  • Unified API: Single interface for models across frameworks (sklearn, PyTorch, TensorFlow)
  • Lazy Loading: Heavy dependencies loaded only when used; base install stays lightweight (~10 MB)
  • 150+ Models: Pre-configured access to state-of-the-art models from trusted libraries
  • Framework Agnostic: Switch backends seamlessly (PyTorch ↔ TensorFlow for deep learning)
  • Production Ready: Type hints, error handling, PEP 561 compliance (py.typed)
  • License Compliant: Respects licenses of all underlying libraries

� About This Project

What it is: ai-mk-toolkit is a unified Python interface that wraps proven, production-grade machine learning libraries. It allows you to access 150+ models through a consistent, intuitive API.

What it is NOT: This package does NOT reimplement algorithms from scikit-learn, PyTorch, TensorFlow, or any other library. It solely provides a convenient interface layer for accessing these libraries.

Design Philosophy:

  • Use battle-tested libraries (scikit-learn, PyTorch, TensorFlow, etc.)
  • Provide a consistent API across different frameworks
  • Let users install only what they need (modular dependencies)
  • Respect and comply with all open-source licenses
  • Be transparent about authorship and attribution

�📦 Installation

Base (ML only)

pip install ai-mk-toolkit

With Deep Learning

pip install ai-mk-toolkit[dl,torch]      # PyTorch
pip install ai-mk-toolkit[dl,tensorflow]  # TensorFlow

With NLP & Transformers

pip install ai-mk-toolkit[nlp]

With Reinforcement Learning

pip install ai-mk-toolkit[rl]

Everything

pip install ai-mk-toolkit[full]

🎯 Quick Start

Classical Machine Learning

from ai_mk_toolkit import ml

# 51 models: regression, classification, clustering, dimensionality reduction
regressor = ml.LinearRegression()
regressor.fit(X_train, y_train)
predictions = regressor.predict(X_test)

# Or by name
xgb = ml.get_model("XGBoost", n_estimators=50)
pca = ml.PCA(n_components=10)
svm = ml.SVC(kernel="rbf")

Deep Learning (60+ Models)

from ai_mk_toolkit import dl

resnet = dl.ResNet50(pretrained=True)  # CNN
yolo = dl.YOLOv8()  # Object Detection
lstm = dl.LSTM(units=128)  # Sequence
gan = dl.WGAN_GP()  # GAN (works with pytorch/tensorflow)

Natural Language Processing (55+ Models)

from ai_mk_toolkit import nlp

tokenizer = nlp.Tokenizer()  # Classical NLP
bert = nlp.BERT()  # Transformers
llama3 = nlp.Llama3()  # LLMs
text_gen = nlp.TextGeneration()  # NLP tasks

Reinforcement Learning (13 Models)

from ai_mk_toolkit import rl

ql = rl.QLearning(n_states=16, n_actions=4)
dqn = rl.DQN(policy="MlpPolicy", env=env)
sarsa = rl.SARSA(n_states=16, n_actions=4)

Computer Vision (14 Tasks)

from ai_mk_toolkit import cv

image_clf = cv.ImageClassification()
detector = cv.ObjectDetection()
segmenter = cv.ImageSegmentation()

📊 Complete Model Catalog

📈 Machine Learning (51 models): LinearRegression, Ridge, Lasso, ElasticNet, SVC, LogisticRegression, RandomForest, DecisionTree, XGBoost, LightGBM, CatBoost, KNN, PCA, TSNE, UMAP, and more

🧠 Deep Learning (60+ models): ResNet, VGG, MobileNet, EfficientNet, YOLOv5-v10, LSTM, GRU, GAN, StyleGAN, CycleGAN, and more

🤖 NLP (55+ models): BERT, GPT2, Llama3, Mistral, T5, Transformers, Classical NLP (NLTK, spaCy, gensim)

🎮 Reinforcement Learning (13 models): QLearning, SARSA, DQN, DoubleDQN, DuelingDQN, and more

👁️ Computer Vision (14 tasks): ImageClassification, ObjectDetection, ImageSegmentation, PoseEstimation, OCR, FaceRecognition, and more

See CHANGELOG.md for detailed model list.

🔧 Advanced Usage

Unified Classifiers (sklearn-backed)

from ai_mk_toolkit import UnifiedClassifier

clf = UnifiedClassifier(model="svc", kernel="rbf")
clf.fit(X_train, y_train)
print(clf.backend_name)

Deep Learning with Backend Selection

from ai_mk_toolkit import UnifiedModel

model = UnifiedModel(backend="pytorch")
model.add_dense(128, activation="relu")
model.compile(task="classification")
model.fit(X_train, y_train, epochs=10)
predictions = model.predict(X_test)

✅ Quality Assurance & Code Cleanliness

This package maintains strict code quality standards:

  • Zero Dead Code: All modules are functionally active and referenced. No orphaned imports, unused variables, or unreachable code.
  • Comprehensive Testing: 87 tests passing, 2 conditional skips. Full coverage of core functionality.
  • Static Analysis: Passes ruff checks (F401 unused imports, F841 unused variables).
  • Build & Packaging: Passes PyPI validation via twine. Builds successfully for both sdist and wheel distributions.
  • Compliance Verified: No algorithm reimplementations. Pure wrapper architecture respecting open-source licenses.
  • Dependencies Optimized: Core dependencies (numpy, scikit-learn, torch, tensorflow, etc.) automatically installed. Optional extras available for specialized use cases.
  • Documentation: Centralized, current, and comprehensive. See CHANGELOG.md for version history and CONTRIBUTING.md for development guidelines.

📝 Contributing

Found a bug? Want to contribute? See CONTRIBUTING.md for guidelines.

Normalized Input (any format works)

# These are identical:
dl.get_model("RT-DETR")
dl.get_model("RT_DETR")
dl.RTDETR()

# Same for WGAN variants:
dl.WGAN_GP()
dl.get_model("wgan-gp")

📋 Testing

pytest                    # All tests
pytest -v                 # Verbose
pytest tests/test_classical_models.py  # Specific test

📄 License

MIT License — See LICENSE

🙏 Acknowledgments & Attribution

This package is built on top of the following open-source libraries. We are grateful for their contributions to the ML community and comply with each project's license:

Core Dependencies (always installed):

  • scikit-learn (BSD-3-Clause) — Classical ML algorithms (regression, classification, clustering, decomposition)
  • NumPy (BSD) — Numerical computing foundation

Optional Deep Learning Frameworks (install via extras):

  • PyTorch (BSD) — Deep learning models (CNNs, RNNs, GANs, transformers)
  • TensorFlow/Keras (Apache 2.0) — Alternative deep learning backend
  • torchvision (BSD) — Pre-trained computer vision models
  • timm (Apache 2.0) — PyTorch image models library
  • Ultralytics (AGPL-3.0) — YOLO object detection models

Optional ML Boosting (install via [ml_boosting] extra):

  • XGBoost (Apache 2.0) — Gradient boosting
  • LightGBM (MIT) — Fast gradient boosting
  • CatBoost (Apache 2.0) — Categorical gradient boosting
  • UMAP (BSD-3-Clause) — Dimensionality reduction

Optional NLP (install via [nlp] extra):

  • Transformers (Apache 2.0) — HuggingFace transformer models (BERT, GPT, Llama, Mistral, etc.)
  • NLTK (Apache 2.0) — Classical NLP tools
  • spaCy (MIT) — Industrial-strength NLP
  • Gensim (LGPL-2.1+) — Topic modeling and embeddings
  • sentence-transformers (Apache 2.0) — Semantic embeddings

Optional Reinforcement Learning (install via [rl] extra):

  • Stable Baselines 3 (MIT) — RL algorithms (DQN, PPO, A2C, etc.)
  • sb3-contrib (MIT) — Additional RL algorithms

All licenses are permissive and allow commercial use.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_mk_toolkit-0.5.0.tar.gz (62.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_mk_toolkit-0.5.0-py3-none-any.whl (65.1 kB view details)

Uploaded Python 3

File details

Details for the file ai_mk_toolkit-0.5.0.tar.gz.

File metadata

  • Download URL: ai_mk_toolkit-0.5.0.tar.gz
  • Upload date:
  • Size: 62.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for ai_mk_toolkit-0.5.0.tar.gz
Algorithm Hash digest
SHA256 5a228fff0f5cf4982179799510c2f42224645e8363d280f1d90b19991c3cb35d
MD5 9eef6fb73f3b76895e3f368cd69c99e8
BLAKE2b-256 91edae06aafa2edf34da667e27e0c2a41adae6b345fec928ccb3be990cc794d0

See more details on using hashes here.

File details

Details for the file ai_mk_toolkit-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: ai_mk_toolkit-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 65.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for ai_mk_toolkit-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb8eb62e9cfce843fd298fa214265f6803204a64c1ed804009e22661e1428ba2
MD5 044939a5e50b49dd5453cedf313f8cda
BLAKE2b-256 e95a3ca83f51b1384a82dc94a5f9b9f750afcd724ec141607b2493f52fe2a963

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page