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
12 changes: 10 additions & 2 deletions cli/.github/workflows/ci.yml → .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: standard ci checks
name: cli

on:
push:
Expand All @@ -17,10 +17,18 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt,clippy
- uses: mozilla-actions/sccache-action@v0.0.9
- uses: Swatinem/rust-cache@v2
with:
workspaces: .
- uses: jdx/mise-action@v2
with:
version: 2026.6.11
# TODO: consider cache: true
# https://github.com/marketplace/actions/mise-action#example-workflow
- name: Ensure rustfmt and clippy are installed for pinned Rust version
run: mise x -- rustup component add rustfmt clippy --toolchain 1.96.0
- name: Run CLI checks
run: mise r ci
run: mise //cli:ci
11 changes: 8 additions & 3 deletions python/.github/workflows/ci.yml → .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: standard ci
name: python-sdk

on:
push:
Expand All @@ -18,8 +18,13 @@ jobs:
# https://docs.astral.sh/uv/guides/integration/github/
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
version: "0.11.17"
# this is the actual uv version
version: "0.11.21"

- uses: jdx/mise-action@v2
with:
version: 2026.6.11
# TODO: consider cache: true
# https://github.com/marketplace/actions/mise-action#example-workflow
- name: Run Python SDK CI
run: mise run ci
run: mise //python:ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: standard ci checks
name: typescript-sdk

on:
push:
Expand All @@ -16,5 +16,9 @@ jobs:
with:
bun-version: 1.3.14
- uses: jdx/mise-action@v2
with:
version: 2026.6.11
# TODO: consider cache: true
# https://github.com/marketplace/actions/mise-action#example-workflow
- name: run-ci
run: mise r ci
run: mise //typescript:ci
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.envrc
.DS_Store
/.quantiles
1 change: 0 additions & 1 deletion cli/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ target
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.DS_Store
/.quantiles
/.wrangler
/dist
Expand Down
12 changes: 12 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
monorepo_root = true

[monorepo]
config_roots = [".", "cli", "typescript", "python"]

[tools]
# keep this version inline with the version declared in .github/workflows/typescript
bun = "1.3.14"
# keep this version inline with rust stable
rust = "1.96.0"
# keep this version inline with the version declared in .github/workflows/python
uv = "0.11.21"
13 changes: 11 additions & 2 deletions python/src/quantiles/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,25 @@ async def _execute() -> JsonValue:
# `list[JsonValue]` when resolving the recursive type alias.
# The cast is a workaround for this limitation. The data is guaranteed
# by `load_batch`'s return type.
return cast(JsonValue, await self._source.load_batch(self._offset, self._batch_size))
raw: list[dict[str, JsonValue]] = await self._source.load_batch(
self._offset, self._batch_size
)
return cast(JsonValue, raw)

batch = await step(
self._ctx,
step_key=f"dataset-batch-{self._offset}",
input_value=cast(JsonValue, batch_input),
execute=_execute,
)
# Note that _execute must return a `JsonValue`, per the contract in `step`,
# but in reality it returns a `list[dict[str, JsonValue]]` and casts to a
# `JsonValue`. The narrower list[dict...] type actually is a JsonValue, so
# that's just an up-cast. this is a(n admittedly weak) attempt at downcasting,
# but in reality, as long as the typing here matches with that above in
# _execute, we're fine.
batch_list = batch if isinstance(batch, list) else []
self._buffer.extend(batch_list)
self._buffer.extend(cast(list[dict[str, JsonValue]], batch_list))


async def dataset[RowT: BaseModel](
Expand Down
2 changes: 1 addition & 1 deletion typescript/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @quantiles/sdk
# `@quantiles/sdk`

TypeScript client for the local Quantiles eval runner.

Expand Down
14 changes: 11 additions & 3 deletions typescript/mise.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
[tasks.install]
run = "bun install"

[tasks.install-frozen]
run = "bun install --frozen-lockfile"

[tasks.check]
depends = ["install-frozen"]
run = "bun run check"

[tasks.typecheck]
depends = ["install-frozen"]
run = "bunx tsc --noEmit"

[tasks.lint]
depends = ["install-frozen"]
run = "bunx biome ci"

[tasks.fmt]
depends = ["install-frozen"]
run = "bun run fmt"

[tasks.example-prompt-eval]
depends = ["install-frozen"]
run = "qt run support-triage -- bun run examples/prompt_eval.ts"

[tasks.install-frozen]
run = "bun install --frozen-lockfile"

[tasks.ci]
run = [
"bun install --frozen-lockfile",
Expand Down
Loading