Skip to main content

Sherpa-ML: production-grade ML repo scaffolder with presets (vision/tabular/nlp/minimal), Hydra, MLflow, Docker, CI.

Project description

Sherpa-ML

PyPI version Python Versions GitHub Workflow Status

Sherpa-ML is a scaffolding tool that generates production-ready ML repositories with opinionated presets (vision / tabular / NLP / minimal). It standardizes testing, typing, linting, configs, experiment tracking, Docker, optional serving, and CI — so a single command gives you a repo that installs, trains, logs, tests, and (optionally) serves out of the box.

  • Consistent skeletons across domains
  • Batteries included: Hydra, MLflow, pre-commit, Makefile, CI, Docker
  • Velocity: sherpa-ml new my-repo --preset vision runs end-to-end in minutes

Quickstart

python -m pip install -U pip
pip install sherpa-ml
sherpa-ml --help

Generate a repo (vision, PyTorch, Hydra, MLflow, Docker slim, CI, extras):

sherpa-ml new demo-vision \
  --preset vision \
  --framework pytorch \
  --config hydra \
  --tracking mlflow \
  --serving false \
  --docker slim \
  --ci true \
  -e pre-commit -e "ruff+black+mypy" -e "pytest+coverage" -e makefile -e devcontainer \
  --render

Inside the generated repo:

cd demo-vision
pip install -e .[dev]
pytest -q
python -m demo_vision.train
python -m demo_vision.eval

If MLflow is enabled:

mlflow ui --backend-store-uri mlruns --port 5000

CLI Overview

sherpa-ml new <repo_name> [options]

Options
  --preset        vision | tabular | nlp | minimal
  --framework     pytorch | sklearn | transformers
  --tracking      mlflow | none                 (default: mlflow)
  --config        hydra | plain-yaml            (default: hydra)
  --serving/--no-serving                        (default: no-serving)
  --docker        slim | cuda | none            (default: slim)
  --ci/--no-ci                                  (default: ci)
  --license       MIT | Apache-2.0              (default: MIT)
  --extra/-e      dvc, pre-commit, ruff+black+mypy, pytest+coverage, makefile, devcontainer, minio (multi)
  --pkg           Override Python package name (defaults to repo_name slug)
  --plan          Dry-run plan table (no writes)
  --render        Write files to disk
  --force         Allow rendering into non-empty folder

Other commands
  sherpa-ml version
  sherpa-ml telemetry [--enable/--disable | --show]

Presets

  • Vision (PyTorch): CIFAR-10 loaders, ResNet18/MobileNetV2, AMP training, checkpoints, ONNX export, tiny ORT bench.
  • Tabular (scikit-learn): CSV loader, pipelines, RF/GBM baselines, metrics (acc/F1/AUC), calibration plot.
  • NLP (HF Transformers): Tokenization pipeline, Trainer fine-tune on SST-2/AG News (small subsets), inference CLI.
  • Minimal: Clean skeleton with tests/CI/config; ideal starting point for custom pipelines.

Quality Bar (Generated Repos)

  • Typing: mypy strict
  • Style: ruff + black (pre-commit)
  • Tests: pytest smoke ≤ 30s
  • Repro: seed control, env pinned
  • Security: optional pip-audit / Trivy workflows
  • CI: GitHub Actions matrix (3.10–3.12) if enabled

Developing Sherpa-ML (this repo)

python -m venv .venv && source .venv/bin/activate  # Windows: .\.venv\Scripts\Activate.ps1
pip install -e .[dev]
pre-commit install
pytest -q
sherpa-ml --help

Local end-to-end check

sherpa-ml new work-vision --preset vision --framework pytorch --config hydra --tracking none --docker none --no-ci --render
cd work-vision && pip install -e .[dev] && pytest -q && python -m work_vision.train

Telemetry (Opt-in)

On first run you’ll be asked to share anonymous template usage (no code/data/PII). You can disable at any time:

sherpa-ml telemetry --disable
# or set env: SHERPA_TELEMETRY=0

License

This project is licensed under MIT.

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

sherpa_ml-0.1.3.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

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

sherpa_ml-0.1.3-py3-none-any.whl (55.8 kB view details)

Uploaded Python 3

File details

Details for the file sherpa_ml-0.1.3.tar.gz.

File metadata

  • Download URL: sherpa_ml-0.1.3.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sherpa_ml-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ee7bff10ea871ddddb57db58fa41aa71253f0f6786f6d4a1ad7a8504d5ec70d6
MD5 637e86d100fc1c866164b68e57d36a30
BLAKE2b-256 ce55267d631cd000a31bdb2385b9dbf2a96fb84529fc6b7a72453e7fa8283e79

See more details on using hashes here.

Provenance

The following attestation bundles were made for sherpa_ml-0.1.3.tar.gz:

Publisher: release.yml on abdulvahapmutlu/sherpa-ml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sherpa_ml-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sherpa_ml-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 55.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sherpa_ml-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3ee363368f55796ec763bab452ad7375ed681e6b6cf88cdcb9fd8158cea32a74
MD5 5296a92fd87496b0fa81400d81133109
BLAKE2b-256 c284ee0b5df6e75c94a9beef0f721a194e8bb99ea9331c16633c3e56ff43d38c

See more details on using hashes here.

Provenance

The following attestation bundles were made for sherpa_ml-0.1.3-py3-none-any.whl:

Publisher: release.yml on abdulvahapmutlu/sherpa-ml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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