Skip to main content

⚡ Corter

Autonomous ML Optimization Framework

Local hyperparameter search and explainability — no cloud required.

Python Version License: MIT GitHub Stars

FeaturesInstallationQuick StartDocumentationContributing


🎯 What is Corter?

Corter runs hyperparameter search on tabular CSV data, fits a scikit-learn model with the best settings, and reports feature importance and short text insights. Everything runs on your machine via the CLI, Python API, or optional Flask web dashboard.

Why Corter?

  • CLI workflowcorter init, corter run, corter web
  • YAML configuration — task, model, HPO, and XAI settings in one file
  • Terminal UI — live progress with Rich during optimization
  • Web dashboard — monitor runs at http://localhost:5000 when using --web or corter web
  • Explainability — permutation importance; optional SHAP when corter-ml[xai] is installed

✨ Features

Hyperparameter optimization

  • Random search over a YAML-defined search space
  • SciPy global (scipy_de) and local (scipy_local) strategies
  • Parallel trials via joblib
  • Early stopping when scores stop improving

Models (scikit-learn)

Supported model.name values:

Name Aliases
random_forest rf
gradient_boosting gbm
logistic_regression logreg, logistic
ridge
svc svm

Numeric feature columns are used automatically; specify target_column in config.

Explainability

  • Permutation importance (always)
  • SHAP values when shap is installed (pip install corter-ml[xai])
  • Drift checks and generated insight strings

Interfaces

  • CLIcorter init, run, web, version
  • PythonCorter.from_yaml(...) and core.run("data.csv")
  • Web UI — Flask app in web_ui.py; corter_web.py pushes live updates during a run

📦 Installation

From PyPI (when published)

pip install corter-ml

From source

git clone https://github.com/pizenkov13-boop/Corter.git
cd Corter
pip install -e .

Optional extras

pip install corter-ml[xai]    # SHAP support
pip install corter-ml[dev]    # pytest, black, mypy

🚀 Quick Start

1. Create configuration

corter init

Example config.yaml:

task: classification
target_column: target

model:
  name: random_forest
  params:
    n_estimators: 100

hpo:
  strategy: random          # random | scipy_de | scipy_local
  n_trials: 24
  parallel_trials: 4
  enable_early_stop: true
  cv_folds: 5
  scoring: accuracy
  search_space:
    n_estimators:
      low: 50
      high: 200
      type: int

xai:
  use_shap: true
  top_k_features: 10

tui:
  show_live: true
  refresh_hz: 4

2. Run optimization

corter run data.csv
corter run data.csv --web          # optimization + dashboard
corter run data.csv -c other.yaml

Results are written to results.json by default.

3. Python API

from corter import Corter

core = Corter.from_yaml("config.yaml")
result = core.run("data.csv")

print(result["best_cv_score"])
print(result["best_params"])
print(result["insights"])

4. Web dashboard only

corter web
# open http://127.0.0.1:5000

During corter run data.csv --web, the dashboard receives live updates from the optimizer.


📖 Documentation

Task configuration

task: auto                  # auto | classification | regression
target_column: target       # default: last column

HPO configuration

hpo:
  strategy: random          # random | scipy_de | scipy_local
  n_trials: 50
  parallel_trials: 4
  enable_early_stop: true
  patience: 5
  min_delta: 0.001
  cv_folds: 5
  scoring: accuracy         # or f1_weighted, neg_mean_squared_error, etc.
  search_space: { ... }

XAI configuration

xai:
  use_shap: true            # requires corter-ml[xai]
  shap_sample_size: 100
  top_k_features: 10
  permutation_repeats: 8
  drift_threshold: 0.15

CLI reference

corter init [-o config.yaml]
corter run <data.csv> [-c config.yaml] [--web] [--output results.json]
corter web [--host 127.0.0.1] [--port 5000]
corter version

Direct module usage

python corter.py data.csv -c config.yaml
python corter_web.py config.yaml data.csv   # optimization with web updates
gunicorn web_ui:app                         # production-style web only (see Procfile)

🏗️ Architecture

┌──────────────────────────────────────────────┐
│                   Corter                     │
├──────────────────────────────────────────────┤
│  CLI (corter_pkg)  │  corter.py  │  web_ui  │
├────────────────────┴─────────────┴──────────┤
│  HyperparameterAutopilot  →  fit best model │
│  SemanticDiagnostics      →  insights       │
│  CorterDashboard (Rich TUI)                 │
└──────────────────────────────────────────────┘

🤝 Contributing

  1. Fork and clone the repository
  2. pip install -e ".[dev]"
  3. Make changes and run formatters/tests as appropriate
  4. Open a pull request

📄 License

MIT — see LICENSE.


🙏 Acknowledgments


📞 Support


Made with ❤️ by the Corter Team

⬆ Back to Top

Release files for corter-ml 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for corter-ml 0.1.0
File Size Uploaded
corter_ml-0.1.0.tar.gz 37.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for corter-ml 0.1.0
File Interpreter ABI Platform
corter_ml-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 74.1 kB

Release files / corter_ml-0.1.0.tar.gz

Download URL corter_ml-0.1.0.tar.gz
Size 37.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f7892d42da100dba81253481964b586e5efbd65c7d960bb6ee9c161b7d81a579
BLAKE2b-256 checksum
How to use checksums
556b72802be1855f3f3af79ee3722c9f6cc5bc14e1bfd098d6ca381b7a476a12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / corter_ml-0.1.0-py3-none-any.whl

Download URL corter_ml-0.1.0-py3-none-any.whl
Size 36.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1aefc9fe3d4343fe5cd3b7b3b010f084de52f39da535f1dd209d4adedfcd74ce
BLAKE2b-256 checksum
How to use checksums
d925f18a04556066adf326cfaf01a434f196740e247a0aacf73a9a34f38df4ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page