TensorZero fixtures
Most of our fixtures are stored in this directory, with the exception of some large files.
Pulling fixtures from R2
Our fixtures are stored in Cloudflare R2. There are two ways to download them:
Local development (no credentials needed)
Set TENSORZERO_DOWNLOAD_FIXTURES_WITHOUT_CREDENTIALS=1 when running docker compose:
TENSORZERO_DOWNLOAD_FIXTURES_WITHOUT_CREDENTIALS=1 docker compose -f docker-compose.yml up
This downloads fixtures via public HTTP URLs. You can also run the HTTP scripts directly:
- Parquet files (large tables):
uv run ./download-large-fixtures-http.py - JSONL files (small tables):
uv run ./download-small-fixtures-http.py
CI / With R2 credentials (faster)
Set R2_ACCESS_KEY_ID and R2_SECRET_ACCESS_KEY environment variables. This uses aws s3 sync for faster, more reliable downloads:
- Parquet files (large tables):
uv run ./download-large-fixtures.py - JSONL files (small tables):
uv run ./download-small-fixtures.py
Writing new fixtures
Large fixtures should not be committed to the repository. Instead:
For parquet files:
- Add the new fixtures to
./large-fixtures - Run
./upload-large-fixtures.sh - List the new fixture files in
download-large-fixtures.py
For JSONL files:
- Update the file locally
- Rename with version suffix (e.g.,
model_inference_examples_v2.jsonl) - Run
./upload-small-fixtures.shto upload - Update the filename mapping in
download-small-fixtures.py
Upload credentials: Uploads require R2 credentials. Use a subshell to set the right env vars:
(unset AWS_SESSION_TOKEN AWS_CREDENTIAL_EXPIRATION; AWS_ACCESS_KEY_ID="$R2_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$R2_SECRET_ACCESS_KEY" ./upload-small-fixtures.sh)