A previous release had provenance metadata, but this release does not. View details.
ModelForge
Transparent, local-first AutoML experimentation for reproducible and inspectable machine learning.
ModelForge is a Python AutoML library for preparing data, screening and ranking scikit-learn pipelines, evaluating models, and saving models for later predictions. Training runs also record experiment and reproducibility information locally.
A typical ModelForge workflow profiles a dataset, selects a target, audits and preprocesses its features, generates candidate pipelines, screens and ranks models, and saves the chosen pipeline for prediction. The workflow stays inspectable rather than hiding every stage behind a black-box call.
The package is published as autoforge-engine and imported in Python as
modelforge.
Features
- Regression and classification workflows
- Data profiling, column intelligence, and data-quality auditing
- Preprocessing, feature engineering, and feature selection
- Model screening, cross-validation, and ranking
- Saved model pipelines and predictions from the command line or Python
- Local experiment tracking, run metadata, and reproducibility information
- Optional boosting models and hyperparameter optimization
Requirements
- Python 3.11 or newer
- A local dataset in a supported format
The default installation includes NumPy, pandas, scikit-learn, Rich, Typer, and PyYAML.
Install
Install from PyPI
Windows PowerShell:
py -3.11 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install autoforge-engine
If PowerShell does not allow virtual-environment activation, you can call its Python executable directly:
py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install autoforge-engine
Linux or macOS:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install autoforge-engine
Optional integrations can be installed with extras:
python -m pip install "autoforge-engine[boosting,optimization]"
The boosting extra installs XGBoost, LightGBM, and CatBoost. The
optimization extra installs Optuna.
Install from source
Clone the repository, enter its directory, and install the development extras.
This makes the modelforge command and test tools available in the active
Python environment.
git clone https://github.com/Adityasinghrajput01/ModelForge.git
cd ModelForge
python -m venv .venv
Windows PowerShell:
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
Linux or macOS:
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
To install optional integrations from a source checkout, use
python -m pip install -e ".[dev,boosting,optimization]".
Dataset and file paths
ModelForge reads local files. Training through the Python API supports CSV,
Excel (.xlsx or .xls), Parquet, and JSON files. The CLI prediction command
expects a CSV file.
The training data must have a header row. Choose the column you want the model to predict as the target; all other usable columns become input features. For example, a regression CSV might look like this:
area,bedrooms,age,price
1200,2,15,250000
1850,3,8,385000
900,1,30,190000
Here, price is the target. A prediction CSV should contain the feature
columns (area, bedrooms, and age) with compatible names, but should not
contain the target column.
Paths are interpreted from the directory where you run the command or Python script:
- A relative path such as
data/train.csvstarts from the current working directory. Run commands from the repository root when using paths such asexamples/house_prices.csv. - An absolute path works from any directory. On Windows, quote paths that
contain spaces, for example
"C:\Users\Aditya Kumar\Datasets\train.csv". - In Python, use a raw string for a Windows path, such as
r"C:\Users\Aditya Kumar\Datasets\train.csv", or use forward slashes:"C:/Users/Aditya Kumar/Datasets/train.csv".
Train and predict with the CLI
After installation, check that the command is available:
modelforge --help
From the repository root, train a regression model using the included housing
dataset. The target column is price:
modelforge train \
--data "examples/house_prices.csv" \
--target price \
--task-type regression \
--output "house_prices_model.joblib"
Run the saved model on new rows. The example prediction file contains features
without the price target:
modelforge predict \
--model "house_prices_model.joblib" \
--data "examples/house_prices_new.csv" \
--output "predictions.csv"
On Windows PowerShell, the same commands can be written on one line, or use a
backtick at the end of each continued line. For a dataset outside the
repository, supply its absolute path to --data.
For classification, use a classification dataset, provide its label column,
and set --task-type classification. For example, the included Iris dataset
uses species as its label:
modelforge train --data "examples/iris_classification.csv" --target species --task-type classification --output "iris_model.joblib"
To return class probabilities instead of predicted class labels, add
--proba to modelforge predict. This option is only for classification
models.
Useful CLI commands:
modelforge train --help
modelforge predict --help
modelforge models --task-type classification
modelforge experiments list --directory .modelforge/experiments
modelforge experiments get EXPERIMENT_ID
modelforge experiments compare ID_ONE ID_TWO
By default, experiment records are written to .modelforge/experiments in
the current working directory. The model is saved to the path passed to
--output (default: model.joblib). Use --overwrite to replace an existing
model file.
Use ModelForge from Python
For a one-call workflow that prints a dataset, model-ranking, data-quality,
and run report, use the lowercase automl helper. It accepts a file path or a
pandas DataFrame and returns the fitted AutoML instance:
from modelforge import automl
run = automl("data/heart_failure.csv", "DEATH_EVENT")
predictions = run.predict("data/new_patients.csv")
Pass options such as task_type="classification", cv=5, or
model_names=["logistic_regression"] as keyword arguments when needed.
Pass a pandas DataFrame to AutoML.fit, name the target column, then save the
fitted pipeline. Replace the example path with the path to your own dataset.
fit prints a report with dataset details, all evaluated model metrics, the
selected pipeline, and experiment identifiers by default. Pass
print_report=False to suppress it.
from pathlib import Path
import pandas as pd
from modelforge import AutoML
data_path = Path("examples/house_prices.csv")
data = pd.read_csv(data_path)
automl = AutoML(cv=5, random_state=42)
result = automl.fit(
data,
target="price",
task_type="regression",
)
model_path = Path("house_prices_model.joblib")
automl.save(str(model_path), overwrite=True)
print("Best model:", result["best_model"])
new_data = pd.read_csv("examples/house_prices_new.csv")
predictions = automl.predict(new_data)
print(predictions.head())
For a file path outside the working directory, set data_path to an absolute
path, for example Path(r"C:\Users\Aditya Kumar\Datasets\train.csv").
Configuration
You can put training settings in a YAML file and pass it to the CLI with
--config. For example:
target: price
task_type: regression
objective: balanced
test_size: 0.2
cv: 5
random_state: 42
experiment_directory: .modelforge/experiments
Save this as modelforge.yaml, then run:
modelforge train --data "examples/house_prices.csv" --config "modelforge.yaml" --output "house_prices_model.joblib"
The CLI options --target, --task-type, --objective, --cv, and
--test-size can also be set directly on the command line. See
examples/modelforge_config.yaml for a configuration that includes feature
selection settings.
Run tests and checks
Install the source checkout with the dev extra first, then run these from
the repository root with the virtual environment activated:
python -m pytest -q
ruff check .
To run a single test module while developing:
python -m pytest tests/test_cli_workflow.py -q
To exercise the included Python workflows and benchmark:
python examples/end_to_end_regression.py
python benchmarks/benchmark_baselines.py
To verify a classification train-and-predict workflow with the included Iris files:
modelforge train --data "examples/iris_classification.csv" --target species --task-type classification --output "iris_model.joblib"
modelforge predict --model "iris_model.joblib" --data "examples/iris_new.csv" --output "iris_predictions.csv"
To check the installed CLI and the available model names:
modelforge --help
modelforge models --task-type regression
modelforge models --task-type classification
Project contents
examples/contains sample datasets, YAML configuration, and end-to-end workflows.tests/contains the automated test suite.benchmarks/contains a baseline comparison script.docs/ROADMAP.mddescribes planned project work.
License
ModelForge is distributed under the MIT License. See LICENSE.
Metadata
Release files for autoforge-engine 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autoforge_engine-0.1.4.tar.gz | 92.2 kB | Without provenance | Details for autoforge_engine-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autoforge_engine-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for autoforge_engine-0.1.4-py3-none-any.whl |
Total release size: 160.8 kB
Release files / autoforge_engine-0.1.4.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | autoforge_engine-0.1.4.tar.gz |
|---|---|
| Size | 92.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
72ce2a5268b846f106bb71c1b3d8d572121c64740da3446f01e4f3d549c75afe
|
|
BLAKE2b-256 checksum How to use checksums |
b749c85531c98cbbadabff36b6b60265a5a488d2d94e4626700957eabb6b9e3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / autoforge_engine-0.1.4-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | autoforge_engine-0.1.4-py3-none-any.whl |
|---|---|
| Size | 68.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d0bbc2effd5c79f9db7a831a01e0c22a2fe9bf897712453b8fa81b87ed0e7aa
|
|
BLAKE2b-256 checksum How to use checksums |
bfc6b1f3d6b2f25f7f27bc9a8308af0461b13f99f251eb5b8f928270a4407309
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for autoforge-engine 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.1.2 2 files With provenance
- Added 0.1.4 2 files Without provenance
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.