Skip to main content

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.

Metadata

Release files for sherpa-ml 0.1.3

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

Source distribution (sdist)

Source distribution for sherpa-ml 0.1.3
File Size Uploaded Provenance Actions
sherpa_ml-0.1.3.tar.gz 38.6 kB With provenance Details for sherpa_ml-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sherpa-ml 0.1.3
File Interpreter ABI Platform Actions
sherpa_ml-0.1.3-py3-none-any.whl Python 3 none any Details for sherpa_ml-0.1.3-py3-none-any.whl

Total release size: 94.4 kB

Release files / sherpa_ml-0.1.3.tar.gz

Download URL sherpa_ml-0.1.3.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ee7bff10ea871ddddb57db58fa41aa71253f0f6786f6d4a1ad7a8504d5ec70d6
BLAKE2b-256 checksum
How to use checksums
ce55267d631cd000a31bdb2385b9dbf2a96fb84529fc6b7a72453e7fa8283e79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2025.

Transparency log

Release files / sherpa_ml-0.1.3-py3-none-any.whl

Download URL sherpa_ml-0.1.3-py3-none-any.whl
Size 55.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ee363368f55796ec763bab452ad7375ed681e6b6cf88cdcb9fd8158cea32a74
BLAKE2b-256 checksum
How to use checksums
c284ee0b5df6e75c94a9beef0f721a194e8bb99ea9331c16633c3e56ff43d38c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2025.

Transparency log

Security for sherpa-ml 0.1.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sherpa_ml-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2025.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files Full provenance

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