Skip to content
Merged
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
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ authors:
- given-names: Gregory
family-names: Way
orcid: 'https://orcid.org/0000-0002-0503-9348'
repository-code: "https://github.com/wayscience/ome-arrow"
repository-code: "https://github.com/wayscience/ome-arrow-benchmarks"
abstract: >-
Benchmarking OME Arrow through Parquet, Vortex, LanceDB, and more.
keywords:
Expand Down
168 changes: 164 additions & 4 deletions README.md

Large diffs are not rendered by default.

Binary file added figures/compare_ome_arrow_only_summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/compare_ome_iris_3d_summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/compare_ome_iris_all_images_summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/compare_ome_iris_joins_detail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/compare_ome_iris_joins_diagnostics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/compare_ome_iris_joins_summary.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/compare_ome_arrow_only_summary.png
Binary file not shown.
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ dependencies = [
"matplotlib>=3.10.9",
"numcodecs>=0.16.5",
"numpy>=2.4.6",
"ome-arrow>=0.0.9",
"ome-arrow>=0.0.10",
"ome-iris>=0.0.4",
"ome-zarr>=0.16",
"pandas>=3.0.3",
"poethepoet>=0.46",
Expand Down Expand Up @@ -52,6 +53,7 @@ paths = [ "src/benchmarks" ]
tasks.lab.shell = "uv venv && uv sync && uv run jupyter lab"
tasks.run-benchmarks.shell = """\
uv run python src/benchmarks/compare_parquet_vortex_lance.py && uv run python \
src/benchmarks/compare_parquet_vortex_lance_ome.py && uv run python src/benchmarks/compare_ome_arrow_only.py\
src/benchmarks/compare_parquet_vortex_lance_ome.py && uv run python src/benchmarks/compare_ome_arrow_only.py && uv \
run python src/benchmarks/compare_ome_iris_joins.py\
"""
tasks.setup.shell = "uv venv && uv sync"
21 changes: 15 additions & 6 deletions src/benchmarks/compare_ome_arrow_only.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""OME-Arrow single-column benchmarks
"""OME image-column storage benchmarks

Compare on-disk formats for a table containing only `row_id` and one OME-Arrow
image column, plus a separate benchmark for a directory-per-image OME-Zarr
Expand Down Expand Up @@ -33,11 +33,11 @@
from ome_arrow import OMEArrow

pd.set_option("display.precision", 4)
PLOT_TITLE = f"{(__doc__ or 'OME-Arrow single-column benchmarks').splitlines()[0]} (lower is better)"
PLOT_TITLE = "One OME-Arrow Image Column: Table Backends vs Directory Baselines\n(lower is better)"
DATA_DIR = Path("data")
DATA_DIR.mkdir(exist_ok=True)
IMAGES_DIR = Path("images")
IMAGES_DIR.mkdir(exist_ok=True)
FIGURES_DIR = Path("figures")
FIGURES_DIR.mkdir(exist_ok=True)
SUMMARY_PARQUET = DATA_DIR / "compare_ome_arrow_only_summary.parquet"
RUNS_PARQUET = DATA_DIR / "compare_ome_arrow_only_runs.parquet"
RUN_BENCHMARKS = not (SUMMARY_PARQUET.exists() and RUNS_PARQUET.exists())
Expand Down Expand Up @@ -623,6 +623,15 @@ def tiff_random_read(indices, base_path=TIFF_DIR):
"OME-Zarr (dir-per-image)": "#7A5A3C",
}
colors = [COLOR_MAP.get(name, "#BAB0AC") for name in summary["format"]]
DISPLAY_LABELS = {
"Parquet (pyarrow, zstd)": "PQ\npyarrow",
"Parquet (duckdb, zstd)": "PQ\nduckdb",
"Lance (lancedb)": "Lance",
"Vortex": "Vortex",
"DuckDB (file table)": "DuckDB",
"TIFF (dir-per-image)": "TIFF",
"OME-Zarr (dir-per-image)": "OME-Zarr",
}


def label_bars(ax, bars, fmt="%.3f"):
Expand Down Expand Up @@ -662,13 +671,13 @@ def label_bars(ax, bars, fmt="%.3f"):
bars = ax.bar(x, summary[col], color=colors)
ax.set_title(title)
ax.set_xticks(x)
ax.set_xticklabels(summary["format"], rotation=30, ha="right")
ax.set_xticklabels([DISPLAY_LABELS.get(name, name) for name in summary["format"]])
ax.grid(axis="y", linestyle=":", alpha=0.5)
if col != "size_mb":
ax.set_ylabel("seconds")
else:
ax.set_ylabel("MB")
label_bars(ax, bars)

fig.savefig(IMAGES_DIR / "compare_ome_arrow_only_summary.png", dpi=150)
fig.savefig(FIGURES_DIR / "compare_ome_arrow_only_summary.png", dpi=150)
plt.close(fig)
Loading
Loading