Skip to main content

Will your ML model run on your device? Find out in one command.

Project description

willitrun

PyPI version Python versions License: MIT CI

CLI to tell you if an ML model will fit and run on your device, using real benchmarks + lightweight estimation.

willitrun demo

  • Real data first: SQLite DB of measured benchmarks (NVIDIA, Ultralytics, MLPerf, community).
  • Edge to cloud: Jetson, Apple Silicon, desktop GPUs, SBCs.
  • Vision + LLMs: Looks up exact matches, falls back to FLOPs/TFLOPS scaling with memory fit checks.
  • CLI-first: Fast, scriptable, offline-capable once the DB is installed.

Quick Start (users)

The interactive UI is the primary entrypoint:

# recommended: isolated CLI install
pipx install willitrun
willitrun

# or with pip if you prefer
pip install willitrun
willitrun

Pick a model (name, HF ID, or local file), then pick a device. You’ll get a verdict and context instantly.

Power users (non-interactive):

willitrun <model> --device <device> [--json]

Install extras as needed:

# PyTorch/ONNX profiling (local .pt / .onnx parsing)
pip install willitrun[profiling,onnx]

How it works

Data pipeline (contributors)

  • Raw (immutable cache): ingest scripts fetch and store HTTP responses in data/raw/{source}/{timestamp}.ext with TTL (configurable via tool.willitrun.raw_ttl_days).
  • Normalized: the same scripts parse raw into JSONL at data/normalized/{source}.jsonl using the single BenchmarkRecord schema (willitrun/pipeline/schema.py).
  • Serving: make build_db (or python scripts/run_pipeline.py build) validates, deduplicates by source priority, and writes data/benchmarks.db + data/benchmarks.meta.json. The packaged copy in willitrun/data/ is refreshed by make wheel.

Estimation

  • Tier 1 (lookup): exact model+device benchmarks from SQLite.
  • Tier 2 (estimate): FLOPs/TFLOPS scaling plus memory fit with 20% overhead; emits ranges and a confidence marker.

Supported inputs

  • Model name from DB (yolov8n, resnet50, …)
  • Local PyTorch / ONNX file
  • HuggingFace model ID

Commands

User CLI:

willitrun --list-devices
willitrun --list-models
willitrun <model> --device <device> [--json]

Pipeline (for data contributors/maintainers):

make fetch       # run all ingests (respects cache TTL)
make build_db    # normalized -> SQLite + metadata
make status      # coverage summary + gaps
make wheel       # rebuild DB, sync into package, build wheel

Contributing data

  1. Add benchmarks: append JSON lines to data/normalized/<source>.jsonl following BenchmarkRecord.
  2. Add devices/models: edit data/devices.yaml / data/models.yaml.
  3. Rebuild DB: make build_db (regenerates DB + meta).
  4. Run tests: pytest.
  5. Open a PR with the updated normalized file(s), DB, and metadata.

Development

pip install -e ".[dev]"
make build_db
pytest

Release flow

make build_db          # refresh DB + metadata
make wheel             # sync into package and build

CI (GitHub Actions) runs make build_db + pytest on push/PR to guard against stale DBs and failing tests.

Limitations

  • Ingest scripts need network access; cached raw files avoid re-fetching within TTL.
  • Tier 2 estimates rely on available reference benchmarks; uncommon models/devices may show wider ranges.

Roadmap

  • More benchmark data (community PRs welcome!)
  • Web frontend for shareability
  • Training memory estimation
  • Multi-GPU / model parallelism awareness
  • Auto-detect local hardware

License

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

willitrun-0.1.6.tar.gz (594.1 kB view details)

Uploaded Source

Built Distribution

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

willitrun-0.1.6-py3-none-any.whl (106.1 kB view details)

Uploaded Python 3

File details

Details for the file willitrun-0.1.6.tar.gz.

File metadata

  • Download URL: willitrun-0.1.6.tar.gz
  • Upload date:
  • Size: 594.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for willitrun-0.1.6.tar.gz
Algorithm Hash digest
SHA256 14c1cc14add67c4933ac3b7e2f2891fcd4ae2e807c5a4b7b67a671019527959b
MD5 ccc0d24bd8ec1c0fd6cfdf27cee5492d
BLAKE2b-256 9396b489dc17e56c860088e8f80c19a3aad86b55279e396ee039cdb95ead82a8

See more details on using hashes here.

File details

Details for the file willitrun-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: willitrun-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 106.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for willitrun-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e66a48a4d678af9b3c79fd0d4d719d9dfaebc2b7c119ba2a6ba12c727e52eaa8
MD5 4ce818f5c0ff69f718f883dd61f4a660
BLAKE2b-256 cabef02da897c5ff8fa14a6c20b1868e3dec4ef36123ff043dfacc077c5e82ad

See more details on using hashes here.

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