Skip to main content

Bayaml is a lightweight ML & AI orchestration framework that automates data loading, preprocessing, model training, evaluation, and deployment through a deterministic, privacy-safe Auto Mode with built-in AutoML. Built and maintained by Aditya Sarode.

Project description

Bayaml


Bayaml is a lightweight ML & AI orchestration framework designed for structured, reproducible, and deployable machine learning workflows.

It features a deterministic execution engine and an intelligent Auto Mode (.auto()) that interprets structured instructions using rule-based NLP, without relying on external AI services, ensuring your data remains completely local and secure.

Auto Mode automatically manages data loading, safe preprocessing, task detection (classification or regression), structured pipeline construction, model training, evaluation, and deployment.

Bayaml includes built-in AutoML capabilities such as model comparison, cross-validation, leaderboard tracking, and best-model selection, all executed within reproducible, hash-based execution plans.

It provides structured APIs across simple, fluent, and advanced orchestration layers, along with natural-language-driven ML pipelines and export options including REST deployment and ONNX.

Bayaml is built to bring automation, structure, reproducibility, and privacy to modern ML systems.

It combines:

AutoML

Natural language ML pipelines

Deterministic execution plans

Model deployment

Modular pipeline control

Designed for engineers, researchers, startups, and ML teams.


🔎 Why Bayaml?

Modern ML pipelines are often:

Hard to reproduce

Poorly structured

Over-engineered

Difficult to deploy

Bayaml provides a clean orchestration layer on top of scikit-learn to make ML:

Reproducible

Structured

Deterministic

Deployable

Without sacrificing flexibility.


🧠 Natural Language ML (.auto())

Train models using structured instructions:

from bayaml import Project

p = Project()

result = p.auto(
    "use https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv "
    "treat tip as target "
    "train regression model using linear regression"
)

print(result)

What Happens Automatically

Dataset loading (CSV, URL, DataFrame)

Target detection

Task detection (classification/regression)

Automatic categorical encoding

Safe pipeline ordering

Train-test split

Model training

Evaluation

Deterministic plan hashing

This makes Bayaml a lightweight AutoML orchestration engine.


📊 Execution Plan Preview

Preview generated pipelines before execution:

plan = p.auto(
    "use data.csv treat price as target train regression model",
    preview=True
)

for step in plan.steps:
    print(step.name)

Bayaml builds a deterministic execution plan with hashing for reproducibility.


⚙️ Core Capabilities

✔ Structured ML Orchestration

Layered architecture wrapping a deterministic execution engine.

✔ Auto Encoding

Categorical columns are automatically encoded before model training.

✔ Auto Task Detection

Classification vs regression inferred automatically.

✔ AutoML Engine

Model comparison, leaderboard tracking, cross-validation.

✔ Model Deployment

Export models for production use.


🚀 Deployment

REST Deployment

p.auto(
    "use data.csv treat target as target "
    "train classification model "
    "deploy as rest"
)

Generates a deployable REST bundle.


ONNX Export (Edge / C++ Ready)

p.auto(
    "use data.csv treat target as target "
    "train regression model "
    "deploy in c++"
)

Exports model as ONNX.


📦 Installation

pip install bayaml

Dependencies:

  • pandas
  • numpy
  • scikit-learn
  • matplotlib
  • pyyaml

🧩 API Layers

Bayaml supports three levels of abstraction.


1️⃣ Simple API

from bayaml import quick_train

metrics = quick_train(
    data="data.csv",
    target="Target",
    model="linear_regression"
)

2️⃣ Fluent API

from bayaml import Bayaml

metrics = (
    Baya("data.csv", target="Target")
    .train("logistic_regression")
    .evaluate()
)

3️⃣ Advanced Orchestration API

from bayaml import Project

project = Project()
project.data.load("data.csv")
project.data.set_target("Target")
project.split.train_test()
project.model.create("linear_regression")
project.model.train()
project.evaluate.evaluate_regressor()

Full modular control.


🤖 AutoML

from bayaml import automl

result = automl(
    data="data.csv",
    target="Target"
)

print(result["best_model"])
print(result["best_score"])

Includes:

  • Cross-validation
  • Model comparison
  • Leaderboard generation
  • Best model selection
  • Run tracking

📤 Export System

Export metrics, predictions, and reports:

  • CSV
  • JSON
  • Excel (XLSX)
  • PDF
  • DOCX
  • PNG / JPG

🏗 Architecture

Core Engine ↓ Execution Plan Builder ↓ Deterministic Plan Hashing ↓ Project API ↓ AutoML / CLI / Simple API

All APIs wrap the same deterministic engine.

No duplicated logic.


🔐 Reproducibility

Every .auto() run generates:

  • Dataset hash
  • Plan hash
  • Ordered execution steps

Ensuring reproducible ML workflows.


👨‍💻 Developer Setup

git clone https://github.com/adityassarode/bayaml
cd bayaml
pip install -e .[dev]
pytest

📈 Positioning

Bayaml is ideal for:

  • ML engineers building reproducible pipelines
  • Startups needing fast ML deployment
  • Data scientists wanting structured automation
  • Teams needing deterministic ML workflows

📄 License

MIT License


👤 Author

Bayaml is built and maintained by Aditya Sarode, focused on scalable AI systems, ML architecture, and production-ready engineering.

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

bayaml-0.1.6.tar.gz (52.7 kB view details)

Uploaded Source

Built Distribution

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

bayaml-0.1.6-py3-none-any.whl (79.5 kB view details)

Uploaded Python 3

File details

Details for the file bayaml-0.1.6.tar.gz.

File metadata

  • Download URL: bayaml-0.1.6.tar.gz
  • Upload date:
  • Size: 52.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for bayaml-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f661aef5a70156ea1d8dd0d8d84899a8a1b452670c188c6b267ca2c9e78dd260
MD5 d843a11b756e32b0c1a3c7fd2375d585
BLAKE2b-256 e7eb436332e17d6be410c0051a714b0d5e5a7a21a0184f2200a07c897525521b

See more details on using hashes here.

File details

Details for the file bayaml-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: bayaml-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 79.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for bayaml-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b43583c77c89af4775a865bc640123c35c48e87a3a32bde84d8c3c0b093dec22
MD5 abc274c2db1a03e136811b3d5f620bbc
BLAKE2b-256 abafe4ad7dabdad3a753b7a50c431c46885a885ff25eff450d42843c882bfcd4

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