Skip to content
Closed
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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The public API snapshot records this version update; publication remains pending

### Added

- Python `SDMClient.for_databricks_serving(max_request_bytes=...)` sets the most bytes one wrapped call may take, the gateway's 16 MB by default; a call past it is split before it is sent.
- Python `Schema.from_relbench` and Java `Schema.fromRelbench` load the same pinned
RelBench datasets with verified caches, offline mode and declared schema metadata.
- Python and Java requests and fitted handles expose immutable sanitization reports for in-memory relational preparation, with per-table row exclusions and explicit unavailable/not-applicable states.
Expand Down Expand Up @@ -50,6 +51,11 @@ The public API snapshot records this version update; publication remains pending

### Changed

- A single-table request is scored in calls of 10,000 rows, each with the whole context, split further as a relational request is.
- A `500` is retried with backoff as a `502` or `503` is, at the same size; through Databricks model serving, a `500` or `502` once more.
- `rows_per_call` is taken as asked rather than lowered to 10,000 (200 for a link prediction), which is now only its default.
- `num_context_samples` past 10,000 and more than 6 hops are accepted.

- Sampled Tabular context uses stable Rust index ordering, including duplicate labels and mixed numeric labels.
Equal labels retain sampled order; mixed numbers compare by their represented values.
Context order and predictions can differ from platform-specific NumPy ordering; sampled membership and warehouse sampling are unchanged.
Expand All @@ -64,6 +70,13 @@ The public API snapshot records this version update; publication remains pending
Endpoint capabilities and ordinary request limits still apply.
The singular raw `result.explanation` view remains supported.

### Removed

- The client's own size limits: the 10,000 context rows, the 30 MiB request body, the 100,000 entities and 100 calls of one `materialize()`, and the 15 tables and 6 hops of a relational request.
The client sends its best attempt: a call the endpoint refuses as too large (`413`, Databricks' `400` saying "Request size cannot exceed", an answer past 64 MiB) or times out on (`504`, a timeout) is asked again in halves, each with the whole context, at most 3 times per batch, then refused naming its rows, bytes and status. A session's create call, which carries only the context, is refused at once when too large; a session's scoring call is halved as a prediction is. A `500`, `502` or `503` is retried at the same size and never split.
A `422`, or a refusal of a call of one row, is shown as the endpoint said it.
The context is sampled only to a `num_context_samples` the caller passes; through Databricks model serving, a call is still split up front to fit its 16 MB.

### Fixed

- Explicit empty outputs remain invalid with `EXPLAIN`; unsupported local-runtime outputs are refused before model weights load.
Expand Down
2 changes: 1 addition & 1 deletion contract/cases/s1/multicall.calls.101.json
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,6 @@
"code": "UNSUPPORTED_REQUEST",
"message": "101 entities are gathered as 101 calls of 1, and every one is built, with its own context, before any is sent. That is past the 100 calls this will hold at once; ask about fewer entities at a time"
},
"why": "rows_per_call=1 over 101 entities: 101 calls, one past the 100 one request is asked in; refused UNSUPPORTED_REQUEST at materialize",
"why": "rows_per_call=1 over 101 entities: 101 calls, one past the 100 the reference asked one request in; the reference refused it UNSUPPORTED_REQUEST at materialize; this client sets no most on calls and asks all 101 (contract/expected)",
"source": "Correctness case multicall.calls.101 using the shop fixture."
}
2 changes: 1 addition & 1 deletion contract/cases/s1/multicall.entities.100000.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"outcome": "success",
"stage": "materialize"
},
"why": "100,000 entities, the most one materialize() gathers: gathered as ten calls of 10,000 (until materialize, so no payload of 100,000 rows is recorded); user_id is declared the key, as the core and the reference read it either way, so the loader indexes it on SQLite and Postgres and a lookup there is not a scan of 100,101 rows",
"why": "100,000 entities, the most the reference's materialize() gathered (this client sets no most): gathered as ten calls of 10,000 (until materialize, so no payload of 100,000 rows is recorded); user_id is declared the key, as the core and the reference read it either way, so the loader indexes it on SQLite and Postgres and a lookup there is not a scan of 100,101 rows",
"source": "Correctness case multicall.entities.100000 using the shop fixture.",
"input_factory": "entity_limit_100000"
}
2 changes: 1 addition & 1 deletion contract/cases/s1/multicall.entities.100001.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"code": "UNSUPPORTED_REQUEST",
"message": "100,001 entities is past the 100,000 one materialize() will hold at once, since every batch is built, with its own context, before any is sent; ask about fewer entities at a time"
},
"why": "100,001 entities, one past the 100,000 one materialize() gathers: refused UNSUPPORTED_REQUEST from the count, before anything is read; user_id is declared the key, as the core and the reference read it either way, so the loader indexes it on SQLite and Postgres and a lookup there is not a scan of 100,101 rows",
"why": "100,001 entities, one past the 100,000 the reference's materialize() gathered: the reference refused it UNSUPPORTED_REQUEST from the count; this client sets no most and gathers it (contract/expected); user_id is declared the key, as the core and the reference read it either way, so the loader indexes it on SQLite and Postgres and a lookup there is not a scan of 100,101 rows",
"source": "Correctness case multicall.entities.100001 using the shop fixture.",
"input_factory": "entity_limit_100001"
}
2 changes: 1 addition & 1 deletion contract/cases/s1/rank.entities-by-candidates.over.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@
"error": "StructuredDataError",
"code": "UNSUPPORTED_REQUEST"
},
"why": "The entity ceiling over a ranking (main's MOST_ENTITIES, 100,000): the entities gathered once per candidate, 501 by 200, one past it by 200, refused before anything is read",
"why": "The reference's entity ceiling over a ranking (main's MOST_ENTITIES, 100,000): the entities gathered once per candidate, 501 by 200, one past it by 200, refused before anything is read; this client sets no such ceiling, and refuses the call only for the entities that name no user (contract/expected)",
"source": "Correctness case rank.entities-by-candidates.over using the shop fixture."
}
2 changes: 1 addition & 1 deletion contract/cases/s1/sample.num-hops.seven.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@
"code": "UNSUPPORTED_REQUEST",
"message": "this request samples 7 hops and the endpoint reads at most 6"
},
"why": "num_hops=7 is past the six hops the endpoint reads: refused UNSUPPORTED_REQUEST at materialize",
"why": "num_hops=7 is past the six hops the reference's endpoint read: the reference refused it UNSUPPORTED_REQUEST at materialize; this client sets no most on hops and gathers it (contract/expected)",
"source": "Correctness case sample.num-hops.seven using the shop fixture."
}
7 changes: 7 additions & 0 deletions contract/expected/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ Their differences from DuckDB follow the fixture loader's explicit mappings in `
| SQLite / Postgres | Malformed text-time values are refused; the US-date fixture completes under these backends' existing read behavior |
| Postgres | NaN-key fixtures refuse at materialize; a negative neighbor bound retains the existing `PROVIDER_ERROR` outcome |

`sample.num-hops.seven` and `sample.num-neighbors.seven-hops` now reach predict on every backend: the client sets no most on hops, since the model reads as many as a request carries, where the reference refused past six.
The `multicall.body-30mib` cases now reach predict on every backend: the client holds a call to no size of its own, and a call the endpoint refuses as too large is asked again in halves.
`multicall.entities.100001` and `multicall.calls.101` are now gathered: the client sets no most on the entities or the calls of one `materialize()`.
`rank.entities-by-candidates.over` is now refused at materialize only for the entities that name no user, as `rank.entities-by-candidates.at` is, since the client sets no entity ceiling over a ranking.
`multicall.fail-call-0`, `multicall.fail-call-2` and `multicall.forecast.fail-call-1` now succeed: their scripted endpoint fails one call with a `500`, which the client tries once more.
These outcomes were recorded from the runner's observations (`run_python.py`, then `check_observations.py --expect`) on DuckDB and SQLite; the Postgres entries take the same outcomes, as no Postgres server was available.

These expectations describe the declared fixture mappings; they do not claim that every backend supports identical physical types.
`explain.two-entities` now succeeds on all three backends: The client supports explanations for multiple prediction rows.
`contract/tests/test_query_options.py::test_each_explained_entity_retains_its_own_raw_response` independently checks both rows' distinct explanation values, the request batch size and the public success outcome.
Expand Down
20 changes: 10 additions & 10 deletions contract/expected/duckdb-python.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,17 @@
"metadata.items": {"code": null, "error": null, "result": "success", "stage": "predict"},
"metadata.items-across-calls": {"code": null, "error": null, "result": "success", "stage": "predict"},
"metadata.items-explained": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.body-30mib.one-row": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"multicall.body-30mib.several-rows": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"multicall.body-30mib.one-row": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.body-30mib.several-rows": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.calls.100": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.calls.101": {"code": "UNSUPPORTED_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"multicall.calls.101": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.entities-per-call.10001": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.entities.100000": {"code": null, "error": null, "result": "success", "stage": "materialize"},
"multicall.entities.100001": {"code": "UNSUPPORTED_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"multicall.fail-call-0": {"code": null, "error": "NimRequestError", "result": "refusal", "stage": "predict"},
"multicall.fail-call-2": {"code": null, "error": "NimRequestError", "result": "refusal", "stage": "predict"},
"multicall.entities.100001": {"code": null, "error": null, "result": "success", "stage": "materialize"},
"multicall.fail-call-0": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.fail-call-2": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.forecast.batched": {"code": "UNSUPPORTED_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"multicall.forecast.fail-call-1": {"code": null, "error": "NimRequestError", "result": "refusal", "stage": "predict"},
"multicall.forecast.fail-call-1": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.forecast.one-call": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.rows-per-call-3": {"code": null, "error": null, "result": "success", "stage": "predict"},
"multicall.rows-per-call.above-the-cap": {"code": null, "error": null, "result": "success", "stage": "predict"},
Expand Down Expand Up @@ -160,7 +160,7 @@
"rank.candidates-not-a-ranking": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"rank.decimal-key": {"code": null, "error": null, "result": "success", "stage": "predict"},
"rank.entities-by-candidates.at": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"rank.entities-by-candidates.over": {"code": "UNSUPPORTED_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"rank.entities-by-candidates.over": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"rank.most-parts": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"rank.no-candidates": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"rank.odd-column": {"code": null, "error": null, "result": "success", "stage": "predict"},
Expand Down Expand Up @@ -247,7 +247,7 @@
"sample.num-hops-3": {"code": null, "error": null, "result": "success", "stage": "predict"},
"sample.num-hops.bool": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"sample.num-hops.fraction": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"sample.num-hops.seven": {"code": "UNSUPPORTED_REQUEST", "error": "UnsupportedRequestError", "result": "refusal", "stage": "materialize"},
"sample.num-hops.seven": {"code": null, "error": null, "result": "success", "stage": "predict"},
"sample.num-hops.text": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"sample.num-hops.zero": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"sample.num-neighbors-2-2": {"code": null, "error": null, "result": "success", "stage": "predict"},
Expand All @@ -256,7 +256,7 @@
"sample.num-neighbors.minus-one": {"code": null, "error": null, "result": "success", "stage": "predict"},
"sample.num-neighbors.number": {"code": "INVALID_REQUEST", "error": "StructuredDataError", "result": "refusal", "stage": "materialize"},
"sample.num-neighbors.over-num-hops": {"code": null, "error": null, "result": "success", "stage": "predict"},
"sample.num-neighbors.seven-hops": {"code": "UNSUPPORTED_REQUEST", "error": "UnsupportedRequestError", "result": "refusal", "stage": "materialize"},
"sample.num-neighbors.seven-hops": {"code": null, "error": null, "result": "success", "stage": "predict"},
"sample.num-neighbors.zero": {"code": null, "error": null, "result": "success", "stage": "predict"},
"sample.parent-table": {"code": null, "error": null, "result": "success", "stage": "predict"},
"sample.parent-table.decimal-keys": {"code": null, "error": null, "result": "success", "stage": "predict"},
Expand Down
Loading
Loading