Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 52 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,52 @@
__pycache__/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Virtual environments
env/
venv/
ENV/
env.bak/
venv.bak/

# Results and outputs
results/
*.png
*.log
*.csv
*.sqlite
*.nsys-rep

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2025 University of Washington Efficient Systems Lab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

33 changes: 33 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Include essential documentation
include README.md
include LICENSE
include requirements.txt

# Include all config files
recursive-include configs *.yml *.yaml *.json

# Include all script files
recursive-include scripts *.py *.sh

# Include application files
recursive-include applications *.py *.yml *.yaml *.json *.txt *.md

# Include inference backend files
recursive-include inference_backends *.py *.yml *.yaml *.json

# Include monitoring utilities
recursive-include monitors *.py

# Exclude build artifacts and caches
global-exclude __pycache__
global-exclude *.py[cod]
global-exclude *$py.class
global-exclude *.so
global-exclude .DS_Store

# Exclude environment and results
prune env
prune venv
prune results
prune .git

45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,33 @@

ConsumerBench is a comprehensive benchmarking framework that evaluates the runtime performance of user-defined GenAI applications under realistic conditions on end-user devices.

## 🚀 Benchmark Setup
## 🚀 Quick Start

### Option 1: Install from PyPI (Recommended)

```bash
# Install ConsumerBench
pip install consumer-bench

# Run a benchmark
consumerbench --config path/to/your/config.yml
```

### Option 2: Install from Source

```bash
# Clone the repository
git clone https://github.com/your-org/ConsumerBench.git
cd ConsumerBench

# Install in development mode
pip install -e .

# Run a benchmark
consumerbench --config configs/sleep_test.yml
```

### Option 3: Development Setup

```bash
# Clone the repository
Expand All @@ -23,8 +49,23 @@ Follow instructions mentioned in `applications/`
Add your own yml workflow in `configs/`

### Running benchmark
Run the benchmark using the command

```bash
# Basic usage
consumerbench --config <path-to-config>

# With custom results directory
consumerbench --config configs/workflow_chatbot.yml --results ./my_results

# With visualization enabled (generates DAG plots)
consumerbench --config configs/workflow_imagegen.yml --visualize

# View help
consumerbench --help
```

### Legacy Command (still supported)
```bash
python src/scripts/run_consumerbench.py --config <path-to-config>
```

Expand Down
17 changes: 17 additions & 0 deletions configs/sleep_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sleep1:
type: SleepApplication
sleep_time: 1.5
num_requests: 3

sleep2:
type: SleepApplication
sleep_time: 2.5
num_requests: 2

workflows:
first_sleep:
uses: sleep1

second_sleep:
uses: sleep2
depend_on: ["first_sleep"]
97 changes: 97 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "consumer-bench"
version = "0.1.0"
description = "A comprehensive benchmarking framework for evaluating GenAI applications on end-user devices"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
authors = [
{name = "Yile Gu"},
{name = "Rohan Kadekodi"},
{name = "Hoang Nguyen"},
{name = "Keisuke Kamahori"},
{name = "Yiyu Liu"},
{name = "Baris Kasikci"}
]
keywords = ["benchmark", "genai", "performance", "llm", "inference"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

dependencies = [
"accelerate>=1.5.0",
"aiohttp>=3.9.0",
"anthropic>=0.52.0",
"datasets>=3.0.0",
"diffusers>=0.30.0",
"fastapi>=0.115.0",
"huggingface-hub>=0.30.0",
"httpx>=0.27.0",
"instructor>=1.8.0",
"ipykernel>=6.29.0",
"librosa>=0.11.0",
"matplotlib>=3.10.0",
"mcp>=1.9.0",
"mcp-server-fetch>=2025.4.0",
"numba>=0.61.0",
"numpy>=2.0.0",
"nvidia-ml-py>=12.0.0",
"openai>=1.80.0",
"pandas>=2.2.0",
"pillow>=11.0.0",
"psutil>=7.0.0",
"pydantic>=2.11.0",
"pynvml>=12.0.0",
"PyYAML>=6.0.0",
"requests>=2.32.0",
"scikit-learn>=1.6.0",
"scipy>=1.15.0",
"seaborn>=0.13.0",
"soundfile>=0.13.0",
"torch>=2.6.0",
"torchaudio>=2.6.0",
"torchvision>=0.21.0",
"tqdm>=4.67.0",
"transformers>=4.50.0",
"uvicorn>=0.34.0",
]

[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"black>=23.0.0",
"flake8>=6.0.0",
]

[project.urls]
Homepage = "https://consumerbench.github.io/"
Documentation = "https://consumerbench.github.io/"
Repository = "https://github.com/efeslab/ConsumerBench"
Issues = "https://github.com/efeslab/ConsumerBench/issues"

[project.scripts]
consumerbench = "consumerbench.cli:main"

[tool.setuptools]
packages = ["consumerbench", "consumerbench.applications", "consumerbench.monitors", "consumerbench.scripts", "consumerbench.inference_backends"]

[tool.setuptools.package-dir]
consumerbench = "src"
"consumerbench.applications" = "applications"
"consumerbench.monitors" = "monitors"
"consumerbench.scripts" = "scripts"
"consumerbench.inference_backends" = "inference_backends"

[tool.setuptools.package-data]
consumerbench = ["*.yml", "*.yaml", "*.json"]

11 changes: 11 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""
ConsumerBench Setup File
This file provides backward compatibility with older pip versions.
Modern installations should use pyproject.toml.
"""
from setuptools import setup

# All configuration is in pyproject.toml
# This file exists for backward compatibility
setup()

Loading