Skip to main content

Synthesizing Databases for your Workload

Project description

SynnoDB

SynnoDB Repository

CMDs at the moment:

# gen storage plan
python -m synnodb.run_gen_storage_plan --model anthropic/claude-sonnet-4-6 --queries 1-22 --benchmark tpch --auto_finish --disable_openai_tracing --notify --db_storage ssd --auto_u

# run gen base
python -m synnodb.run_gen_base_impl --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --storage_plan_run_id 8xn0t04p --queries 1-22 --auto_finish --disable_openai_tracing --notify --db_storage ssd --auto_u

# run optim
python -m synnodb.run_optim_loop --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --base_impl_run_id q45vm9fz --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd

# test correctness at larger SF
python -m synnodb.run_check_sf_correctness --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --source_run_id 0br4bjqb --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd --target_sf 50

# add multi-threading
python -m synnodb.run_add_multi_threading --model anthropic/claude-sonnet-4-6 --benchmark tpch --bespoke_storage --optim_run_id 0br4bjqb --queries 1-22 --disable_openai_tracing --auto_u --auto_finish --notify --db_storage ssd

Prerequisites

  • Linux (x86-64)
  • C++ toolchain (gcc / clang)
  • Python 3.10+
  • uv package manager
  • Apache Arrow and Parquet development libraries
  • cloc (used to track generated code size)

Installation

Install from PyPI

pip install synnodb          # or: uv pip install synnodb

This installs the synnodb package and the synnodb-* console scripts listed above. The Arrow/Parquet system libraries and a C++ toolchain (see Prerequisites) are still required at runtime. For local development from a source checkout, follow the steps below.

1. Install uv

curl -LsSf https://astral.sh/uv/install.sh | sh

Optional: Setup Weights & Biases (wandb) account and API key for experiment tracking. You can sign up for free at https://wandb.ai/.

2. Install Arrow and Parquet libraries

wget https://packages.apache.org/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt update
sudo apt install -y libarrow-dev libparquet-dev parquet-tools

3. Install cloc

sudo apt install -y cloc

4. Install Python dependencies

uv sync

5. Configure environment

Create a .env file with your API keys:

OPENAI_API_KEY=...
WANDB_ENTITY=... # Optional, e.g. "my-team"
WANDB_PROJECT=... # Optional, e.g. "bespoke-olap"

6. Prepare Parquet data

Place TPC-H or CEB Parquet files in your artifacts directory (default: /mnt/labstore/bespoke_olap/). The path can be overridden with --base_parquet_dir.

Development

Inspect running engine processes

watch -n1 -d ./misc/get_db_procs.sh

Remote snapshot cache (optional)

To share snapshots across machines, set up a bare git repository and start a git daemon:

git init --bare synno_cache.git
touch synno_cache.git/git-daemon-export-ok

git daemon \
    --base-path=./ \
    --export-all \
    --enable=receive-pack \
    --reuseaddr \
    --verbose

The cache URL is git://<hostname>/synno_cache.git. Pass it via the .env file, or leave it unset to use only the local snapshot cache (with --disable_repo_sync).

Delete snapshot:

git -C /home/jwehrstein/bespoke_olap/output --git-dir=/home/jwehrstein/bespoke_olap/output/.git update-ref -d
      refs/snapshots/snapshot-<hash>

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

synnodb-0.1.1.tar.gz (964.9 kB view details)

Uploaded Source

Built Distribution

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

synnodb-0.1.1-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file synnodb-0.1.1.tar.gz.

File metadata

  • Download URL: synnodb-0.1.1.tar.gz
  • Upload date:
  • Size: 964.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for synnodb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8a5c4d7b3ae5418b380c635b6f1089f12fd8ce726ace72271aa268839fffa69a
MD5 51278a3366c0c5cede4602793967ecda
BLAKE2b-256 95200d2edf4598dd47590fdfdb8314efc34c596e706717fb46c44ef442c97648

See more details on using hashes here.

Provenance

The following attestation bundles were made for synnodb-0.1.1.tar.gz:

Publisher: publish-to-pypi.yml on SynnoDB/SynnoDB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synnodb-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: synnodb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for synnodb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a210e99cb04d4d216c92cfe20c9622ac229f29b605976e0efae5cca503ba1edd
MD5 0001f7fbd8c252074a8fa519e2a5952e
BLAKE2b-256 84eeb44bae949df82af741e33626ccdfb61aa235c606114683583899296a2118

See more details on using hashes here.

Provenance

The following attestation bundles were made for synnodb-0.1.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on SynnoDB/SynnoDB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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