From a006e4ee1935b1ac1bf8e12171e049f05dc35c46 Mon Sep 17 00:00:00 2001 From: nathanhubens Date: Tue, 24 Mar 2026 15:35:59 +0100 Subject: [PATCH 1/2] release: bump version to v0.1.0 First stable release with unified benchmark() API, 5 metric categories (size, speed, compute, memory, energy), LayerProfiler, radar plots, and full nbdev3 infrastructure. --- CHANGELOG.md | 29 +++++++++++++++++++++++++++++ fasterbench/__init__.py | 2 +- pyproject.toml | 4 ++-- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d3eb682 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog + +## v0.1.0 (2026-03-24) + +First stable release of fasterbench. + +### Features + +- **Unified `benchmark()` API** — Single entry point returning typed `BenchmarkResult` with 5 metric categories +- **Size metrics** — Parameter count, disk size via `compute_size()` +- **Speed metrics** — Latency, throughput, batch/thread/latency sweeps via `compute_speed_multi()` +- **Compute metrics** — MACs/FLOPs via thop and torchprofile backends via `compute_compute()` +- **Memory metrics** — CPU (psutil) and GPU (CUDA) memory tracking via `compute_memory_multi()` +- **Energy metrics** — Power consumption and carbon footprint via codecarbon via `compute_energy_multi()` +- **`LayerProfiler`** — Per-layer profiling with hook-based measurement (speed, memory, size, compute) +- **Radar plots** — Multi-model comparison visualization via `create_radar_plot()` +- **`BenchmarkResult`** — Supports both typed access (`result.size.size_mib`) and dict access (`result["size_mib"]`) +- **Serialization** — `.as_dict()`, `.to_dataframe()`, `.to_json()` on all result types + +### Infrastructure + +- Migrated to nbdev3 with `pyproject.toml` (PEP 621) +- CI via GitHub Actions (nbdev3-ci workflow) +- Documentation via Quarto + GitHub Pages +- Suppressed spurious logging from thop and codecarbon + +## v0.0.1 + +Initial development release. diff --git a/fasterbench/__init__.py b/fasterbench/__init__.py index 70a871b..6993be0 100644 --- a/fasterbench/__init__.py +++ b/fasterbench/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.0.1" +__version__ = "0.1.0" """Comprehensive benchmarking toolkit for deep learning models""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/index.ipynb. diff --git a/pyproject.toml b/pyproject.toml index e9ac4b5..1de9f00 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,8 @@ readme = "README.md" requires-python = ">=3.7" license = {text = "Apache-2.0"} authors = [{name = "nathanhubens", email = "nathan.hubens@gmail.com"}] -keywords = ['nbdev', 'jupyter', 'notebook', 'python'] -classifiers = ["Natural Language :: English", "Intended Audience :: Developers", "Development Status :: 3 - Alpha", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only"] +keywords = ['benchmark', 'deep-learning', 'pytorch', 'profiling', 'latency', 'energy'] +classifiers = ["Natural Language :: English", "Intended Audience :: Developers", "Development Status :: 4 - Beta", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only"] dependencies = ['torch', 'fastcore', 'prettytable', 'tqdm', 'codecarbon', 'torchprofile', 'thop', 'plotly'] [project.urls] From 16084b561af1c8615bc428d8c49012ee0d7a4cdc Mon Sep 17 00:00:00 2001 From: nathanhubens Date: Fri, 10 Apr 2026 16:48:50 +0200 Subject: [PATCH 2/2] fix: preserve v0.1.0 version through nbdev-export nbdev-export always resets __version__ to 0.0.1 because it reads from the overwritten __init__.py. Fix: add explicit __version__ = "0.1.0" export cell in index.ipynb so nbdev preserves it during export. Also add version to [tool.nbdev] in pyproject.toml. --- fasterbench/__init__.py | 4 +++- nbs/index.ipynb | 11 +++++++++++ pyproject.toml | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/fasterbench/__init__.py b/fasterbench/__init__.py index 6993be0..a1f08af 100644 --- a/fasterbench/__init__.py +++ b/fasterbench/__init__.py @@ -1,4 +1,3 @@ -__version__ = "0.1.0" """Comprehensive benchmarking toolkit for deep learning models""" # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/index.ipynb. @@ -6,6 +5,9 @@ # %% auto #0 __all__ = [] +# %% ../nbs/index.ipynb #version_cell +__version__ = "0.1.0" + # %% ../nbs/index.ipynb #8b6f8c52 from .benchmark import benchmark, BenchmarkResult from .size import SizeMetrics, compute_size, get_model_size, get_num_parameters diff --git a/nbs/index.ipynb b/nbs/index.ipynb index d6f2dd4..799db96 100644 --- a/nbs/index.ipynb +++ b/nbs/index.ipynb @@ -20,6 +20,17 @@ "#| default_exp __init__" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "version_cell", + "metadata": {}, + "outputs": [], + "source": [ + "#| export\n", + "__version__ = \"0.1.0\"" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/pyproject.toml b/pyproject.toml index 1de9f00..bcc878d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,5 +28,6 @@ version = {attr = "fasterbench.__version__"} include = ["fasterbench"] [tool.nbdev] +version = "0.1.0" tst_flags = 'notest' jupyter_hooks = true