Baya – Modular ML Orchestration Framework for structured machine learning workflows.
Project description
Baya
Baya is a structured, production-ready Machine Learning orchestration and AutoML framework designed for clear, reproducible, and extensible ML workflows.It supports both:
- Minimal one-line training
- Fully modular ML pipelines
- AutoML with leaderboard tracking
- Exporting results to multiple formats
Why Baya?
- Multiple abstraction layers (simple → advanced)
- Built-in AutoML engine
- DAG-based orchestration
- Experiment tracking
- Model registry
- CLI interface
- Export system (CSV, JSON, Excel, PDF, DOCX, PNG, etc.)
- Fully compatible with Pandas workflows
- Extensible and modular architecture
Installation
pip install bayaml
Runtime dependencies installed automatically:
- pandas
- numpy
- scikit-learn
- scipy
- pyyaml
- matplotlib
Works With Pandas
Baya integrates directly with Pandas. You can freely mix Pandas + Baya:
import pandas as pd
from baya import quick_train
df = pd.read_csv("data.csv")
# Use pandas normally
df["new_feature"] = df["feature"] * 2
# Pass directly into Baya
metrics = quick_train(
data=df,
target="Target",
model="linear_regression"
)
print(metrics)
You can:
- preprocess with pandas
- clean manually
- engineer features
- then hand over to Baya
No restrictions.
API Layers
Baya supports three levels of control.
1️⃣ Simple API — quick_train()
Minimal lines.
from baya import quick_train
metrics = quick_train(
data="data.csv",
target="Target",
model="linear_regression",
test_size=0.2
)
Supported data inputs:
- pandas DataFrame
- CSV path
- JSON path
- Excel path
Automatically performs:
- load
- target selection
- split
- model creation
- train
- predict
- evaluate
Returns a metrics dictionary.
2️⃣ Fluent API — Baya Class
Chainable interface.
from baya import Baya
metrics = (
Baya("data.csv", target="Target")
.train("linear_regression")
.evaluate()
)
Also works with a DataFrame:
Baya(df, target="Target").train("logistic_regression").evaluate()
3️⃣ Advanced API — Project
Full modular control.
from baya import Project
project = Project()
project.data.load("data.csv")
project.data.set_target("Target")
project.split.train_test(test_size=0.2)
project.model.create("linear_regression")
project.model.train()
metrics = project.evaluate.evaluate_regressor()
All Core Methods (Advanced API)
Data:
project.data.load(path_or_dataframe)project.data.set_target("column")project.data.preview()
Split:
project.split.train_test(test_size=0.2)
Model:
project.model.create("linear_regression")project.model.train()project.model.predict()
Evaluate:
project.evaluate.evaluate_regressor()project.evaluate.evaluate_classifier()project.evaluate.custom_metric(...)
Tracking:
project.tracker.start()project.tracker.log_metrics(...)project.tracker.finalize()
Export:
project.export.csv("results.csv")project.export.json("results.json")project.export.excel("results.xlsx")project.export.pdf("report.pdf")project.export.docx("report.docx")project.export.image("plot.png")
Supported Export Formats
Baya supports exporting to:
.csv.json.xlsx.pdf.docx.png.jpg
Exports available for:
- metrics
- predictions
- leaderboards
- visualizations
- reports
AutoML
Automatic model selection.
from baya import automl
result = automl(
data="data.csv",
target="Target"
)
print(result["best_model"])
print(result["best_score"])
AutoML includes:
- Cross-validation
- Model comparison
- Leaderboard generation
- Best model selection
- Run tracking
- CV results storage
Leaderboard
Stored in: baya_runs/leaderboard.json
Visualize:
from baya.visualize import plot_leaderboard
plot_leaderboard()
Model Registry
from baya import register_model, list_models
register_model("my_model", MyModelClass)
print(list_models())
Built-in models:
linear_regressionlogistic_regressionrandom_forest_classifierrandom_forest_regressorsvm_classifiersvm_regressor
Config-Based Reproducibility
workflow.yaml:
data_path: data.csv
target: Target
model: logistic_regression
task: classification
test_size: 0.2
seed: 42
Run:
from baya import Project
project = Project.from_config("workflow.yaml")
metrics = project.run()
CLI Usage
baya info
baya run workflow.yaml
baya automl workflow.yaml
baya registry list-models
baya leaderboard
baya visualize leaderboard
Task Auto Detection
Automatically detects:
- Regression
- Classification
Based on the target variable.
Architecture
Layered Design:
Core Engine
↓
Orchestration (DAG)
↓
Simple API
↓
AutoML
↓
CLI
The Simple API wraps the advanced engine — no duplicated logic.
Optional Dependencies
Install extra features:
Visualization extras:
pip install bayaml[viz]
Deep learning extras:
pip install bayaml[deep]
Development tools:
pip install bayaml[dev]
Branding
baya info
Shows:
- Framework name
- Version
- Author
- Website
- Support link
Branding is non-intrusive.
Developer Setup
git clone <repo>
cd baya
pip install -e .[dev]
pytest
License
MIT License.
About
Baya 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bayaml-0.1.2.tar.gz.
File metadata
- Download URL: bayaml-0.1.2.tar.gz
- Upload date:
- Size: 40.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
354c069d8ffa75eb5d022342938c1826f946d3f2a4f40b680540d5f72436d0db
|
|
| MD5 |
0e27fd353e385efaed4520a99c6d72de
|
|
| BLAKE2b-256 |
14c0ca6403d60c5c49ef0285d9338caa73b84a560cade1285cae6268ddf87ecd
|
File details
Details for the file bayaml-0.1.2-py3-none-any.whl.
File metadata
- Download URL: bayaml-0.1.2-py3-none-any.whl
- Upload date:
- Size: 67.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86d19aeb49e6b07d544d9489378ec80425d3d414c5b5fe4257c09cd15eba37d0
|
|
| MD5 |
ac4666712a2aaa995ec5e9cd3c62b9f0
|
|
| BLAKE2b-256 |
443660d828b89f7df024352745c8290a15423e3310725a609dd072552900906d
|