decision-toolkit 0.4.1__tar.gz → 0.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/CHANGELOG.md +22 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/CONTRIBUTING.md +5 -3
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/PKG-INFO +31 -39
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/README.md +30 -38
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/BENCH.md +1 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/CLI.md +118 -5
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/CORE.md +12 -13
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/EXAMPLES.md +13 -3
- decision_toolkit-0.4.3/docs/FAQ.md +159 -0
- decision_toolkit-0.4.3/docs/GLOSSARY.md +36 -0
- decision_toolkit-0.4.3/docs/INSTALLATION.md +175 -0
- decision_toolkit-0.4.3/docs/LIBRARY.md +250 -0
- decision_toolkit-0.4.3/docs/MODELS.md +218 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/OPERATIONS.md +2 -2
- decision_toolkit-0.4.3/docs/QUICKSTART.md +144 -0
- decision_toolkit-0.4.3/docs/RECIPES.md +140 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/RELEASE.md +11 -8
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/REST.md +8 -8
- decision_toolkit-0.4.3/docs/TROUBLESHOOTING.md +258 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/VARIANTS.md +14 -11
- decision_toolkit-0.4.3/docs/index.md +135 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/README.md +7 -16
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/gliner2.5-decide.md +0 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/gliner2.5-multi.md +0 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/julia-1.md +0 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/laya-multilingual.md +0 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/laya.md +0 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/open-jev-deberta-v3-large.md +0 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/opendecider-nano.md +0 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/docs/models/strands-decider-2b.md +0 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/pyproject.toml +1 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/__init__.py +1 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/catalog.py +1 -1
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/cli.py +20 -12
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/decision_model.py +1 -3
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_cli.py +8 -2
- decision_toolkit-0.4.3/tests/test_docs.py +46 -0
- decision_toolkit-0.4.3/tests/test_help_examples.py +64 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_server.py +1 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/uv.lock +1 -1
- decision_toolkit-0.4.1/docs/CATALOG_PROPOSAL.md +0 -122
- decision_toolkit-0.4.1/docs/ROADMAP.md +0 -33
- decision_toolkit-0.4.1/docs/index.md +0 -57
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/.github/workflows/ci.yml +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/.github/workflows/docs.yml +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/.github/workflows/release.yml +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/.gitignore +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/LICENSE +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/SECURITY.md +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/THIRD_PARTY_NOTICES.md +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/README.md +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/__init__.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/load.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/results/2026-10-20-calibration.json +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/results/2026-10-20-load.json +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/results/2026-10-20-smoke.json +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/run.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/suites/calibration.jsonl +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/bench/suites/smoke.jsonl +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/__main__.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/__init__.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/base.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/gliner2.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/gliner2_decide.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/julia.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/laya.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/opendecider.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/openjev.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/adapters/strands_decider.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/calibration.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/config.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/contracts/__init__.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/contracts/common.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/contracts/mapping.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/contracts/openai_decisions_beta.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/contracts/systemone_v1.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/engine/__init__.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/errors.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/limits.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/metrics.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/models.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/observability.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/py.typed +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/registry.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/results.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/schema.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/server.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/src/decision_toolkit/tracing.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/__init__.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/conftest.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_adapters_gliner2.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_adapters_gliner2_decide.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_adapters_julia.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_adapters_laya.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_adapters_opendecider.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_adapters_openjev.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_adapters_strands.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_bench.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_catalog.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_config.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_contracts_conformance.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_core_phase1.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_decision_model.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_fuzz_rest.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_integration_gliner2.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_models.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_operations.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_results.py +0 -0
- {decision_toolkit-0.4.1 → decision_toolkit-0.4.3}/tests/test_schema.py +0 -0
|
@@ -1,8 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to this project are documented here. Version `0.4.
|
|
3
|
+
All notable changes to this project are documented here. Version `0.4.3` is
|
|
4
4
|
published on PyPI.
|
|
5
5
|
|
|
6
|
+
## [0.4.3] — 2026-10-21
|
|
7
|
+
|
|
8
|
+
Documentation and help UX improvements. Added a Quickstart, Installation guide,
|
|
9
|
+
Models/cache guide, Library guide, Troubleshooting, FAQ, Glossary and Recipes;
|
|
10
|
+
reorganized the documentation navigation around user tasks; added CLI option
|
|
11
|
+
tables and examples; corrected the README REST alias text; clarified that the
|
|
12
|
+
server extra is installed as `[onnx,server]`. The CLI now suggests the exact
|
|
13
|
+
download/use commands for an empty cache, marks current/cached catalog rows, and
|
|
14
|
+
reports user-facing catalog counts in `dtk doctor`. Public model metadata uses
|
|
15
|
+
`available` instead of an internal status label. No inference, model, or catalog
|
|
16
|
+
content changes.
|
|
17
|
+
|
|
18
|
+
## [0.4.2] — 2026-10-21
|
|
19
|
+
|
|
20
|
+
Documentation cleanup: removed internal project language (`m0`, phase numbers,
|
|
21
|
+
waitlist), removed the public catalog proposal and roadmap pages, and rewrote
|
|
22
|
+
the model-card index for users. Every model card now includes library, CLI and
|
|
23
|
+
REST snippets for every variant. No runtime changes.
|
|
24
|
+
|
|
6
25
|
## [0.4.1] — 2026-10-21
|
|
7
26
|
|
|
8
27
|
Catalog presentation patch: every variant now carries its REST alias
|
|
@@ -216,6 +235,8 @@ README correction. No code or model behavior changed.
|
|
|
216
235
|
- Typed `DecisionModel` API with lifecycle, batching, async, usage, warnings,
|
|
217
236
|
normalized confidence, capabilities, structured events and atomic model store.
|
|
218
237
|
|
|
238
|
+
[0.4.3]: https://pypi.org/project/decision-toolkit/0.4.3/
|
|
239
|
+
[0.4.2]: https://pypi.org/project/decision-toolkit/0.4.2/
|
|
219
240
|
[0.4.1]: https://pypi.org/project/decision-toolkit/0.4.1/
|
|
220
241
|
[0.4.0]: https://pypi.org/project/decision-toolkit/0.4.0/
|
|
221
242
|
[0.3.1]: https://pypi.org/project/decision-toolkit/0.3.1/
|
|
@@ -76,9 +76,11 @@ uv run dtk --version
|
|
|
76
76
|
uv run pip-audit # dependency scan (CI runs this)
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
CI runs these on Python 3.12 and 3.13, plus `pip-audit`.
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
CI runs these on Python 3.12 and 3.13, plus `pip-audit`. `tests/test_help_examples.py`
|
|
80
|
+
parses every example printed by `dtk --help` and checks referenced catalog
|
|
81
|
+
models/variants; run the full examples against a populated cache before a
|
|
82
|
+
release. The tag-triggered release workflow builds and publishes the wheel with
|
|
83
|
+
uv; see [RELEASE.md](docs/RELEASE.md). For rate limits, metrics, tracing and the load
|
|
82
84
|
probe see [OPERATIONS.md](docs/OPERATIONS.md).
|
|
83
85
|
|
|
84
86
|
## Commits
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: decision-toolkit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Local-first toolkit for open-weights decision models: one ONNX engine, one adapter per model contract, typed choice/yes-no/score decisions with probabilities on CPU.
|
|
5
5
|
Project-URL: Homepage, https://github.com/gia-uh/decision-toolkit
|
|
6
6
|
Project-URL: Repository, https://github.com/gia-uh/decision-toolkit
|
|
@@ -50,24 +50,27 @@ One **ONNX engine** (`onnxruntime`), in-process, on CPU. One **adapter per model
|
|
|
50
50
|
contract** (how a model is fed and read). Three thin surfaces over the same API:
|
|
51
51
|
**library**, **CLI** and **REST**.
|
|
52
52
|
|
|
53
|
-
Co-developed by [GIA-UH](https://github.com/gia-uh) and [Syalia S.R.L.](https://github.com/syalia-srl)
|
|
53
|
+
**Co-developed by [GIA-UH](https://github.com/gia-uh) and [Syalia S.R.L.](https://github.com/syalia-srl).**
|
|
54
54
|
|
|
55
55
|
**Documentation:** <https://gia-uh.github.io/decision-toolkit/>. Start with
|
|
56
|
-
[
|
|
56
|
+
[Quickstart](https://gia-uh.github.io/decision-toolkit/QUICKSTART/) for the library, REST
|
|
57
57
|
and CLI. `dtk --help` and every subcommand help also include runnable examples.
|
|
58
|
+
See [Models](https://gia-uh.github.io/decision-toolkit/MODELS/) for the cache and
|
|
59
|
+
variants, and [Troubleshooting](https://gia-uh.github.io/decision-toolkit/TROUBLESHOOTING/)
|
|
60
|
+
when a command fails.
|
|
58
61
|
|
|
59
62
|
## Installation
|
|
60
63
|
|
|
61
64
|
```bash
|
|
62
|
-
uv pip install decision-toolkit # library + CLI
|
|
65
|
+
uv pip install decision-toolkit # library + CLI; add [onnx] to run models
|
|
63
66
|
uv pip install "decision-toolkit[onnx]" # + onnxruntime, tokenizers (the model runtime)
|
|
64
|
-
uv pip install "decision-toolkit[server]"
|
|
67
|
+
uv pip install "decision-toolkit[onnx,server]" # + REST server (FastAPI)
|
|
65
68
|
```
|
|
66
69
|
|
|
67
70
|
The project is managed with [uv](https://docs.astral.sh/uv/) and ships a committed `uv.lock`. Published
|
|
68
71
|
wheels remain compatible with `pip` for environments that do not use uv.
|
|
69
72
|
|
|
70
|
-
PyPI: <https://pypi.org/project/decision-toolkit/0.4.
|
|
73
|
+
PyPI: <https://pypi.org/project/decision-toolkit/0.4.3/>. See
|
|
71
74
|
[docs/RELEASE.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/RELEASE.md)
|
|
72
75
|
for the Trusted Publishing flow and clean-install checks.
|
|
73
76
|
|
|
@@ -135,7 +138,7 @@ decision.truncated, decision.warnings
|
|
|
135
138
|
validated before inference (`box`/assets are rejected by text-only models).
|
|
136
139
|
Custom adapters can be registered with `register_adapter`; local ONNX models
|
|
137
140
|
can be opened with `DecisionModel.from_onnx(...)`. See
|
|
138
|
-
[docs/CORE.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/CORE.md) for the full
|
|
141
|
+
[docs/CORE.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/CORE.md) for the full API contract, error taxonomy,
|
|
139
142
|
logging events and the expressiveness inventory.
|
|
140
143
|
|
|
141
144
|
**2. As a CLI**
|
|
@@ -167,7 +170,7 @@ batch, custom `--adapter/--files`, config and completion.
|
|
|
167
170
|
**3. As a REST service (optional extra)**
|
|
168
171
|
|
|
169
172
|
```bash
|
|
170
|
-
uv pip install "decision-toolkit[server]"
|
|
173
|
+
uv pip install "decision-toolkit[onnx,server]"
|
|
171
174
|
dtk serve --model gliner2.5-multi --warmup \
|
|
172
175
|
--api-key "$DECISION_TOOLKIT_API_KEY" \
|
|
173
176
|
--log-format json
|
|
@@ -176,8 +179,9 @@ dtk serve --model gliner2.5-multi --warmup \
|
|
|
176
179
|
Endpoints: `POST /v1/systemone` (TypeSafe System One), `POST /v1/decisions`
|
|
177
180
|
(OpenAI Decisions beta), `GET /v1/models` (OpenAI shape),
|
|
178
181
|
`GET /v1/decision-models` (rich catalog), `GET /v1/info`, `GET /health`,
|
|
179
|
-
`GET /ready`. Requests select `model`;
|
|
180
|
-
|
|
182
|
+
`GET /ready`. Requests select `model`; quantization is selected with the model
|
|
183
|
+
alias `id@variant` (for example `gliner2.5-multi@fp32`). There is no `variant`
|
|
184
|
+
field in either public request body. System One request validation uses the TypeSafe
|
|
181
185
|
`422 {"detail": [...]}` shape; OpenAI Decisions uses its
|
|
182
186
|
`{"error": {...}}` envelope. Every response carries `x-request-id`.
|
|
183
187
|
A standard System One client that sends `model`, `state` and `questions` can
|
|
@@ -186,38 +190,26 @@ current text-only subset.
|
|
|
186
190
|
See [docs/REST.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/REST.md) for the pinned contracts, limits, auth and
|
|
187
191
|
the standard-evolution process.
|
|
188
192
|
|
|
189
|
-
##
|
|
193
|
+
## Models and variants
|
|
190
194
|
|
|
191
|
-
The catalog
|
|
192
|
-
|
|
195
|
+
The catalog lists models that are runnable with the toolkit today. Every entry
|
|
196
|
+
has a real ONNX export, verified files and measured behavior; nothing is listed
|
|
197
|
+
as a placeholder.
|
|
193
198
|
|
|
194
|
-
|
|
195
|
-
2. an adapter whose contract we can implement **from a real export**;
|
|
196
|
-
3. a real ONNX export on the Hub;
|
|
197
|
-
4. measured parity against the original on a fixed sample;
|
|
198
|
-
5. CPU-viable latency.
|
|
199
|
-
|
|
200
|
-
Every variant points to files that exist. No placeholders, no speculative
|
|
201
|
-
adapters (there is no generic "any ONNX" adapter).
|
|
202
|
-
|
|
203
|
-
| id | adapter | status | variants (default *) |
|
|
199
|
+
| id | adapter | verification | variants (default *) |
|
|
204
200
|
| --- | --- | --- | --- |
|
|
205
|
-
| `gliner2.5-multi` | `gliner2` |
|
|
206
|
-
| `gliner2.5-decide` | `gliner2-decide` |
|
|
207
|
-
| `laya` | `laya` |
|
|
208
|
-
| `julia-1` | `julia` |
|
|
209
|
-
| `opendecider-nano` | `opendecider` |
|
|
210
|
-
| `laya-multilingual` | `laya` |
|
|
211
|
-
| `open-jev-deberta-v3-large` | `open-jev` |
|
|
212
|
-
| `strands-decider-2b` | `strands-decider` |
|
|
201
|
+
| `gliner2.5-multi` | `gliner2` | verified end-to-end (9/15, 353 ms) | `fp16`* (577 MB); `fp32` (1132 MB) |
|
|
202
|
+
| `gliner2.5-decide` | `gliner2-decide` | fused export verified (refund 0.944, 912 ms; English-only) | `q4f16`* (524 MB) |
|
|
203
|
+
| `laya` | `laya` | verified against torch (Δp ≤ 0.005) | `q8`* (528 MB) |
|
|
204
|
+
| `julia-1` | `julia` | verified: 100/100 argmax parity, 329 ms | `fp32`* (618 MB) |
|
|
205
|
+
| `opendecider-nano` | `opendecider` | official build; prompt ported from pinned code (530 ms) | `q8f16`* (469 MB); `fp16` (792 MB) |
|
|
206
|
+
| `laya-multilingual` | `laya` | fused ONNX; upstream parity (37 ms) | `fp16`* (682 MB); `fp32` (1326 MB) |
|
|
207
|
+
| `open-jev-deberta-v3-large` | `open-jev` | Open-Jev DeBERTa v3 large reproduction; 0.854 in-domain (241 ms) | `fp16`* (884 MB); `fp32` (1758 MB); `q4` (487 MB); `q4f16` (357 MB) |
|
|
208
|
+
| `strands-decider-2b` | `strands-decider` | reference fixture match (719 ms) | `q4f16`* (1114 MB); `q8` (1821 MB) |
|
|
213
209
|
|
|
214
210
|
Each variant has a REST alias in the form `id@variant`; `dtk models list` prints
|
|
215
211
|
the alias next to every variant.
|
|
216
212
|
|
|
217
|
-
**Only `m0` models are in the catalog.** Researched-but-unavailable models
|
|
218
|
-
(planned, conversion pending, broken exports) are listed in
|
|
219
|
-
[docs/ROADMAP.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/ROADMAP.md) and are not downloadable through the toolkit.
|
|
220
|
-
|
|
221
213
|
Per-model cards with the contract, measured evidence and known limitations:
|
|
222
214
|
[docs/models](https://github.com/gia-uh/decision-toolkit/tree/main/docs/models).
|
|
223
215
|
|
|
@@ -229,7 +221,7 @@ own repo files, size and role. A `*` in the table above marks the default.
|
|
|
229
221
|
|
|
230
222
|
```bash
|
|
231
223
|
dtk models list # one row per variant; * = default
|
|
232
|
-
dtk models list --quant #
|
|
224
|
+
dtk models list --quant # accepted for compatibility; quant is always shown
|
|
233
225
|
dtk models variants gliner2.5-multi # full details for one model
|
|
234
226
|
```
|
|
235
227
|
|
|
@@ -257,7 +249,7 @@ standard `model` field. The base id uses the server/persisted default. There is
|
|
|
257
249
|
no `variant` field in the request body; `/v1/models` lists both the base model
|
|
258
250
|
and every alias, and two aliases can be loaded concurrently.
|
|
259
251
|
|
|
260
|
-
A variant becomes default only after passing the
|
|
252
|
+
A variant becomes default only after passing the verification criteria (top-1 ≥ 99%,
|
|
261
253
|
mean |Δp| ≤ 0.02, accuracy delta ≤ 1 pp against the fp32 build on a fixed
|
|
262
254
|
sample) and measuring latency on CPU. Unverified conversions are not catalogued
|
|
263
255
|
and never become a silent fallback. See [Variants and quantization](https://gia-uh.github.io/decision-toolkit/VARIANTS/)
|
|
@@ -303,7 +295,7 @@ See [CHANGELOG.md](https://github.com/gia-uh/decision-toolkit/blob/main/CHANGELO
|
|
|
303
295
|
|
|
304
296
|
## Custom ONNX (at your own risk)
|
|
305
297
|
|
|
306
|
-
You can run any ONNX file with an adapter you trust — outside the
|
|
298
|
+
You can run any ONNX file with an adapter you trust — outside the
|
|
307
299
|
catalog:
|
|
308
300
|
|
|
309
301
|
```python
|
|
@@ -324,7 +316,7 @@ register_adapter("my-layout", MyAdapter)
|
|
|
324
316
|
```
|
|
325
317
|
|
|
326
318
|
Custom models do not appear in `dtk models list`; the toolkit never guesses a
|
|
327
|
-
layout. If a model deserves support, it goes through
|
|
319
|
+
layout. If a model deserves support, it goes through catalog review.
|
|
328
320
|
|
|
329
321
|
## Development
|
|
330
322
|
|
|
@@ -12,24 +12,27 @@ One **ONNX engine** (`onnxruntime`), in-process, on CPU. One **adapter per model
|
|
|
12
12
|
contract** (how a model is fed and read). Three thin surfaces over the same API:
|
|
13
13
|
**library**, **CLI** and **REST**.
|
|
14
14
|
|
|
15
|
-
Co-developed by [GIA-UH](https://github.com/gia-uh) and [Syalia S.R.L.](https://github.com/syalia-srl)
|
|
15
|
+
**Co-developed by [GIA-UH](https://github.com/gia-uh) and [Syalia S.R.L.](https://github.com/syalia-srl).**
|
|
16
16
|
|
|
17
17
|
**Documentation:** <https://gia-uh.github.io/decision-toolkit/>. Start with
|
|
18
|
-
[
|
|
18
|
+
[Quickstart](https://gia-uh.github.io/decision-toolkit/QUICKSTART/) for the library, REST
|
|
19
19
|
and CLI. `dtk --help` and every subcommand help also include runnable examples.
|
|
20
|
+
See [Models](https://gia-uh.github.io/decision-toolkit/MODELS/) for the cache and
|
|
21
|
+
variants, and [Troubleshooting](https://gia-uh.github.io/decision-toolkit/TROUBLESHOOTING/)
|
|
22
|
+
when a command fails.
|
|
20
23
|
|
|
21
24
|
## Installation
|
|
22
25
|
|
|
23
26
|
```bash
|
|
24
|
-
uv pip install decision-toolkit # library + CLI
|
|
27
|
+
uv pip install decision-toolkit # library + CLI; add [onnx] to run models
|
|
25
28
|
uv pip install "decision-toolkit[onnx]" # + onnxruntime, tokenizers (the model runtime)
|
|
26
|
-
uv pip install "decision-toolkit[server]"
|
|
29
|
+
uv pip install "decision-toolkit[onnx,server]" # + REST server (FastAPI)
|
|
27
30
|
```
|
|
28
31
|
|
|
29
32
|
The project is managed with [uv](https://docs.astral.sh/uv/) and ships a committed `uv.lock`. Published
|
|
30
33
|
wheels remain compatible with `pip` for environments that do not use uv.
|
|
31
34
|
|
|
32
|
-
PyPI: <https://pypi.org/project/decision-toolkit/0.4.
|
|
35
|
+
PyPI: <https://pypi.org/project/decision-toolkit/0.4.3/>. See
|
|
33
36
|
[docs/RELEASE.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/RELEASE.md)
|
|
34
37
|
for the Trusted Publishing flow and clean-install checks.
|
|
35
38
|
|
|
@@ -97,7 +100,7 @@ decision.truncated, decision.warnings
|
|
|
97
100
|
validated before inference (`box`/assets are rejected by text-only models).
|
|
98
101
|
Custom adapters can be registered with `register_adapter`; local ONNX models
|
|
99
102
|
can be opened with `DecisionModel.from_onnx(...)`. See
|
|
100
|
-
[docs/CORE.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/CORE.md) for the full
|
|
103
|
+
[docs/CORE.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/CORE.md) for the full API contract, error taxonomy,
|
|
101
104
|
logging events and the expressiveness inventory.
|
|
102
105
|
|
|
103
106
|
**2. As a CLI**
|
|
@@ -129,7 +132,7 @@ batch, custom `--adapter/--files`, config and completion.
|
|
|
129
132
|
**3. As a REST service (optional extra)**
|
|
130
133
|
|
|
131
134
|
```bash
|
|
132
|
-
uv pip install "decision-toolkit[server]"
|
|
135
|
+
uv pip install "decision-toolkit[onnx,server]"
|
|
133
136
|
dtk serve --model gliner2.5-multi --warmup \
|
|
134
137
|
--api-key "$DECISION_TOOLKIT_API_KEY" \
|
|
135
138
|
--log-format json
|
|
@@ -138,8 +141,9 @@ dtk serve --model gliner2.5-multi --warmup \
|
|
|
138
141
|
Endpoints: `POST /v1/systemone` (TypeSafe System One), `POST /v1/decisions`
|
|
139
142
|
(OpenAI Decisions beta), `GET /v1/models` (OpenAI shape),
|
|
140
143
|
`GET /v1/decision-models` (rich catalog), `GET /v1/info`, `GET /health`,
|
|
141
|
-
`GET /ready`. Requests select `model`;
|
|
142
|
-
|
|
144
|
+
`GET /ready`. Requests select `model`; quantization is selected with the model
|
|
145
|
+
alias `id@variant` (for example `gliner2.5-multi@fp32`). There is no `variant`
|
|
146
|
+
field in either public request body. System One request validation uses the TypeSafe
|
|
143
147
|
`422 {"detail": [...]}` shape; OpenAI Decisions uses its
|
|
144
148
|
`{"error": {...}}` envelope. Every response carries `x-request-id`.
|
|
145
149
|
A standard System One client that sends `model`, `state` and `questions` can
|
|
@@ -148,38 +152,26 @@ current text-only subset.
|
|
|
148
152
|
See [docs/REST.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/REST.md) for the pinned contracts, limits, auth and
|
|
149
153
|
the standard-evolution process.
|
|
150
154
|
|
|
151
|
-
##
|
|
155
|
+
## Models and variants
|
|
152
156
|
|
|
153
|
-
The catalog
|
|
154
|
-
|
|
157
|
+
The catalog lists models that are runnable with the toolkit today. Every entry
|
|
158
|
+
has a real ONNX export, verified files and measured behavior; nothing is listed
|
|
159
|
+
as a placeholder.
|
|
155
160
|
|
|
156
|
-
|
|
157
|
-
2. an adapter whose contract we can implement **from a real export**;
|
|
158
|
-
3. a real ONNX export on the Hub;
|
|
159
|
-
4. measured parity against the original on a fixed sample;
|
|
160
|
-
5. CPU-viable latency.
|
|
161
|
-
|
|
162
|
-
Every variant points to files that exist. No placeholders, no speculative
|
|
163
|
-
adapters (there is no generic "any ONNX" adapter).
|
|
164
|
-
|
|
165
|
-
| id | adapter | status | variants (default *) |
|
|
161
|
+
| id | adapter | verification | variants (default *) |
|
|
166
162
|
| --- | --- | --- | --- |
|
|
167
|
-
| `gliner2.5-multi` | `gliner2` |
|
|
168
|
-
| `gliner2.5-decide` | `gliner2-decide` |
|
|
169
|
-
| `laya` | `laya` |
|
|
170
|
-
| `julia-1` | `julia` |
|
|
171
|
-
| `opendecider-nano` | `opendecider` |
|
|
172
|
-
| `laya-multilingual` | `laya` |
|
|
173
|
-
| `open-jev-deberta-v3-large` | `open-jev` |
|
|
174
|
-
| `strands-decider-2b` | `strands-decider` |
|
|
163
|
+
| `gliner2.5-multi` | `gliner2` | verified end-to-end (9/15, 353 ms) | `fp16`* (577 MB); `fp32` (1132 MB) |
|
|
164
|
+
| `gliner2.5-decide` | `gliner2-decide` | fused export verified (refund 0.944, 912 ms; English-only) | `q4f16`* (524 MB) |
|
|
165
|
+
| `laya` | `laya` | verified against torch (Δp ≤ 0.005) | `q8`* (528 MB) |
|
|
166
|
+
| `julia-1` | `julia` | verified: 100/100 argmax parity, 329 ms | `fp32`* (618 MB) |
|
|
167
|
+
| `opendecider-nano` | `opendecider` | official build; prompt ported from pinned code (530 ms) | `q8f16`* (469 MB); `fp16` (792 MB) |
|
|
168
|
+
| `laya-multilingual` | `laya` | fused ONNX; upstream parity (37 ms) | `fp16`* (682 MB); `fp32` (1326 MB) |
|
|
169
|
+
| `open-jev-deberta-v3-large` | `open-jev` | Open-Jev DeBERTa v3 large reproduction; 0.854 in-domain (241 ms) | `fp16`* (884 MB); `fp32` (1758 MB); `q4` (487 MB); `q4f16` (357 MB) |
|
|
170
|
+
| `strands-decider-2b` | `strands-decider` | reference fixture match (719 ms) | `q4f16`* (1114 MB); `q8` (1821 MB) |
|
|
175
171
|
|
|
176
172
|
Each variant has a REST alias in the form `id@variant`; `dtk models list` prints
|
|
177
173
|
the alias next to every variant.
|
|
178
174
|
|
|
179
|
-
**Only `m0` models are in the catalog.** Researched-but-unavailable models
|
|
180
|
-
(planned, conversion pending, broken exports) are listed in
|
|
181
|
-
[docs/ROADMAP.md](https://github.com/gia-uh/decision-toolkit/blob/main/docs/ROADMAP.md) and are not downloadable through the toolkit.
|
|
182
|
-
|
|
183
175
|
Per-model cards with the contract, measured evidence and known limitations:
|
|
184
176
|
[docs/models](https://github.com/gia-uh/decision-toolkit/tree/main/docs/models).
|
|
185
177
|
|
|
@@ -191,7 +183,7 @@ own repo files, size and role. A `*` in the table above marks the default.
|
|
|
191
183
|
|
|
192
184
|
```bash
|
|
193
185
|
dtk models list # one row per variant; * = default
|
|
194
|
-
dtk models list --quant #
|
|
186
|
+
dtk models list --quant # accepted for compatibility; quant is always shown
|
|
195
187
|
dtk models variants gliner2.5-multi # full details for one model
|
|
196
188
|
```
|
|
197
189
|
|
|
@@ -219,7 +211,7 @@ standard `model` field. The base id uses the server/persisted default. There is
|
|
|
219
211
|
no `variant` field in the request body; `/v1/models` lists both the base model
|
|
220
212
|
and every alias, and two aliases can be loaded concurrently.
|
|
221
213
|
|
|
222
|
-
A variant becomes default only after passing the
|
|
214
|
+
A variant becomes default only after passing the verification criteria (top-1 ≥ 99%,
|
|
223
215
|
mean |Δp| ≤ 0.02, accuracy delta ≤ 1 pp against the fp32 build on a fixed
|
|
224
216
|
sample) and measuring latency on CPU. Unverified conversions are not catalogued
|
|
225
217
|
and never become a silent fallback. See [Variants and quantization](https://gia-uh.github.io/decision-toolkit/VARIANTS/)
|
|
@@ -265,7 +257,7 @@ See [CHANGELOG.md](https://github.com/gia-uh/decision-toolkit/blob/main/CHANGELO
|
|
|
265
257
|
|
|
266
258
|
## Custom ONNX (at your own risk)
|
|
267
259
|
|
|
268
|
-
You can run any ONNX file with an adapter you trust — outside the
|
|
260
|
+
You can run any ONNX file with an adapter you trust — outside the
|
|
269
261
|
catalog:
|
|
270
262
|
|
|
271
263
|
```python
|
|
@@ -286,7 +278,7 @@ register_adapter("my-layout", MyAdapter)
|
|
|
286
278
|
```
|
|
287
279
|
|
|
288
280
|
Custom models do not appear in `dtk models list`; the toolkit never guesses a
|
|
289
|
-
layout. If a model deserves support, it goes through
|
|
281
|
+
layout. If a model deserves support, it goes through catalog review.
|
|
290
282
|
|
|
291
283
|
## Development
|
|
292
284
|
|
|
@@ -66,7 +66,7 @@ and
|
|
|
66
66
|
The model cards retain the historical cold-start measurements used when each
|
|
67
67
|
variant was admitted. The harness reports **post-warmup steady-state** latency,
|
|
68
68
|
which is lower. Compare like with like: use the harness when comparing commits
|
|
69
|
-
or machines; use the card values only as historical
|
|
69
|
+
or machines; use the card values only as historical reference measurements.
|
|
70
70
|
|
|
71
71
|
## Adding a case
|
|
72
72
|
|
|
@@ -1,15 +1,40 @@
|
|
|
1
|
-
# CLI
|
|
1
|
+
# CLI
|
|
2
2
|
|
|
3
3
|
`dtk` is our own operational surface. Unlike REST, it has **no external
|
|
4
4
|
standard** to comply with: it is consistent with itself, script-friendly, and a
|
|
5
5
|
thin adapter over the programmatic core. Inference logic never lives in the
|
|
6
6
|
CLI.
|
|
7
7
|
|
|
8
|
+
## Invocation
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
dtk [global options] <command> [command options]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Global options must come **before** the command. This matters for `--home`:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
dtk --home /data/dtk-home models list
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
| Global option | Meaning |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| `--home DIR` | Toolkit home (models cache + config). Default: `~/.local/share/decision-toolkit`. |
|
|
23
|
+
| `-q, --quiet` | Suppress informational output. |
|
|
24
|
+
| `-v, --verbose` | Debug logs and tracebacks on stderr. |
|
|
25
|
+
| `--log-level LEVEL` | `DEBUG`, `INFO`, `WARNING` or `ERROR`. |
|
|
26
|
+
| `--log-format FORMAT` | `text` or `json`. |
|
|
27
|
+
| `--no-color` | Disable colors (accepted for scripts). |
|
|
28
|
+
| `--version` | Print the toolkit version. |
|
|
29
|
+
|
|
30
|
+
Only `dtk models download` uses the network. The model must already be cached
|
|
31
|
+
for inference.
|
|
32
|
+
|
|
8
33
|
## Command map
|
|
9
34
|
|
|
10
35
|
| Command | Purpose |
|
|
11
36
|
| --- | --- |
|
|
12
|
-
| `dtk models` | Inspect the local cache and the
|
|
37
|
+
| `dtk models` | Inspect the local cache and the model catalog. |
|
|
13
38
|
| `dtk models list` | Every catalog variant, default (`*`) and cached variants (`--license`, `--quant`, `--adapter`). |
|
|
14
39
|
| `dtk models variants <id>` | Every real variant of one model, with size, role and exact install command. |
|
|
15
40
|
| `dtk models download <id>` | Download the default or `--variant` quantization (`--force`, `--dry-run`). |
|
|
@@ -26,6 +51,95 @@ CLI.
|
|
|
26
51
|
| `dtk version` | Version information. |
|
|
27
52
|
| `dtk completion` | Bash/zsh/fish completion snippet. |
|
|
28
53
|
|
|
54
|
+
## Command options
|
|
55
|
+
|
|
56
|
+
### Models
|
|
57
|
+
|
|
58
|
+
`dtk models` without a subcommand lists the cached entries. `dtk models list`
|
|
59
|
+
shows the catalog even when the cache is empty.
|
|
60
|
+
|
|
61
|
+
| Command | Important options |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| `dtk models list` | `--quant`, `--adapter`, `--license`, `--json` |
|
|
64
|
+
| `dtk models variants <id>` | `--json` |
|
|
65
|
+
| `dtk models download <id>` | `--variant NAME`, `--revision REV`, `--force`, `--dry-run`, `--json` |
|
|
66
|
+
| `dtk models use <id>` | `--variant NAME`, `--json` |
|
|
67
|
+
| `dtk models current` | `--json` |
|
|
68
|
+
| `dtk models delete <id>` | `--variant NAME`, `--all-variants`, `--yes`, `--json` |
|
|
69
|
+
| `dtk models verify [id]` | `--variant NAME`, `--all`, `--json` |
|
|
70
|
+
| `dtk models import <path>` | `--name NAME`, `--adapter NAME`, `--files ROLE=PATH`, `--json` |
|
|
71
|
+
|
|
72
|
+
`download` does not activate a variant; `use` persists the selection.
|
|
73
|
+
`--variant` on `decide`, `classify` or `serve` overrides it for one command.
|
|
74
|
+
|
|
75
|
+
### Decide
|
|
76
|
+
|
|
77
|
+
| Option | Meaning |
|
|
78
|
+
| --- | --- |
|
|
79
|
+
| `--model ID` | Catalog id or cached model path (default: current model). |
|
|
80
|
+
| `--variant NAME` | Variant/quantization for this command. |
|
|
81
|
+
| `-s, --state TEXT` | State as text. |
|
|
82
|
+
| `--state-file FILE` | Read the state from a file (`-` for stdin; JSON files are sent as JSON). |
|
|
83
|
+
| `--input-jsonl FILE` | Batch input, one state per line (`-` for stdin). |
|
|
84
|
+
| `--q NAME=SPEC` | Repeatable shorthand question. |
|
|
85
|
+
| `--questions-file FILE` | JSON/YAML question mapping. |
|
|
86
|
+
| `--output-jsonl FILE` | Batch output (`-` for stdout). |
|
|
87
|
+
| `--batch-size N` | JSONL chunk size (default 32). |
|
|
88
|
+
| `--strict` | Fail instead of returning truncated answers. |
|
|
89
|
+
| `--json` | Print JSON (the default output). |
|
|
90
|
+
| `--pretty` | Indent JSON output. |
|
|
91
|
+
|
|
92
|
+
### Classify
|
|
93
|
+
|
|
94
|
+
| Option | Meaning |
|
|
95
|
+
| --- | --- |
|
|
96
|
+
| `--model ID` | Catalog id or cached model path. |
|
|
97
|
+
| `--variant NAME` | Variant for this command. |
|
|
98
|
+
| `-t, --text TEXT` | Text to classify. |
|
|
99
|
+
| `--text-file FILE` | Read text from a file (`-` for stdin). |
|
|
100
|
+
| `--labels L1,L2,...` | Comma-separated labels. |
|
|
101
|
+
| `--labels-file FILE` | YAML `labels: {name: description}` mapping. |
|
|
102
|
+
| `--instructions TEXT` | Custom question text. |
|
|
103
|
+
| `--threshold FLOAT` | Flag results below it (default 0.5). |
|
|
104
|
+
| `--top-k N` | Number of ranked labels to show (default 3). |
|
|
105
|
+
| `--json` | Machine-readable output. |
|
|
106
|
+
|
|
107
|
+
### Serve
|
|
108
|
+
|
|
109
|
+
| Option | Meaning |
|
|
110
|
+
| --- | --- |
|
|
111
|
+
| `--model ID`, `--variant NAME` | Default model for the process. |
|
|
112
|
+
| `--host HOST`, `--port PORT` | Bind address and port (default `127.0.0.1:8000`). |
|
|
113
|
+
| `--workers N` | Uvicorn worker processes. |
|
|
114
|
+
| `--reload` | Development reload; cannot combine with `--workers > 1`. |
|
|
115
|
+
| `--api-key KEY` | Require `Authorization: Bearer <key>`. |
|
|
116
|
+
| `--cors-origin ORIGIN` | Allow a browser origin; repeatable. |
|
|
117
|
+
| `--max-body-mb N`, `--timeout SECONDS` | Request limits. |
|
|
118
|
+
| `--max-models N` | Idle models kept loaded (LRU). |
|
|
119
|
+
| `--max-concurrent N` | Bounded inference concurrency. |
|
|
120
|
+
| `--rate-limit N`, `--rate-window SECONDS`, `--rate-burst N` | Per-key rate limit. |
|
|
121
|
+
| `--no-metrics` | Disable `/metrics`. |
|
|
122
|
+
| `--tracing` | Enable optional OpenTelemetry spans. |
|
|
123
|
+
| `--warmup` | Warm the default model at startup. |
|
|
124
|
+
| `--log-level`, `--log-format` | Server logging overrides. |
|
|
125
|
+
|
|
126
|
+
See [Operations](OPERATIONS.md) for the semantics of these limits.
|
|
127
|
+
|
|
128
|
+
### Config, doctor and completion
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
dtk config list --json
|
|
132
|
+
dtk config get device
|
|
133
|
+
dtk config set device cpu
|
|
134
|
+
dtk config set cache_dir /data/dtk-models
|
|
135
|
+
dtk doctor
|
|
136
|
+
dtk doctor --json
|
|
137
|
+
dtk completion bash
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Writable config keys are `cache_dir`, `current`, `current_variant` and `device`.
|
|
141
|
+
`home` is read-only; use `--home`.
|
|
142
|
+
|
|
29
143
|
## Exit codes
|
|
30
144
|
|
|
31
145
|
| Code | Meaning |
|
|
@@ -244,8 +358,7 @@ dtk serve --model gliner2.5-multi --warmup \
|
|
|
244
358
|
- `--workers N` and `--reload` use an internal uvicorn factory; `--reload`
|
|
245
359
|
is for development and cannot be combined with `--workers > 1`.
|
|
246
360
|
- `--max-models`, `--max-body-mb`, `--timeout`, `--warmup`, `--api-key`,
|
|
247
|
-
`--cors-origin`, `--log-level` and `--log-format` are
|
|
248
|
-
controls.
|
|
361
|
+
`--cors-origin`, `--log-level` and `--log-format` are server controls.
|
|
249
362
|
- Custom `--adapter`/`--files` also apply to the server's default model.
|
|
250
363
|
|
|
251
364
|
## Completion
|
|
@@ -281,6 +394,6 @@ dtk doctor --json
|
|
|
281
394
|
config), but still does not reimplement inference.
|
|
282
395
|
- It does not have a compatibility obligation to System One/OpenAI; those are
|
|
283
396
|
REST contracts.
|
|
284
|
-
- Metrics
|
|
397
|
+
- Metrics and rate limiting are server-side features; see
|
|
285
398
|
[OPERATIONS.md](OPERATIONS.md). Wheel/PyPI releases are documented in
|
|
286
399
|
[RELEASE.md](RELEASE.md).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Core
|
|
1
|
+
# Core API
|
|
2
2
|
|
|
3
3
|
The programmatic API is the **superset**: the most expressive layer of the
|
|
4
4
|
toolkit. The REST server is a documented, conformance-tested projection of a subset of
|
|
@@ -207,7 +207,7 @@ Events emitted by `decision_toolkit.*` loggers:
|
|
|
207
207
|
Each event is a compact JSON object with `event`, `request_id`, model identity,
|
|
208
208
|
variant, adapter, question count, token counts, latency, truncation and error
|
|
209
209
|
code. State and question text are **not** logged by default. The CLI/REST
|
|
210
|
-
layers configure formatting and destinations
|
|
210
|
+
layers configure formatting and destinations separately.
|
|
211
211
|
|
|
212
212
|
## Extensibility
|
|
213
213
|
|
|
@@ -254,9 +254,9 @@ Registration is in-process (no daemon, no plugin server).
|
|
|
254
254
|
- `resolve(id, variant=...)`: local directory + role → file map + adapter for
|
|
255
255
|
the core.
|
|
256
256
|
|
|
257
|
-
##
|
|
257
|
+
## Capabilities and limits
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
The core exposes the following capabilities:
|
|
260
260
|
|
|
261
261
|
| Capability | Core status |
|
|
262
262
|
| --- | --- |
|
|
@@ -280,13 +280,12 @@ This is the checklist against which the REST projection will be verified:
|
|
|
280
280
|
| Model store | atomic download, hashes, verify, import metadata |
|
|
281
281
|
| Multi-label | capability flag + validation; no adapter yet |
|
|
282
282
|
|
|
283
|
-
##
|
|
283
|
+
## Not part of the core
|
|
284
284
|
|
|
285
|
-
- REST contract projection and standard compliance
|
|
286
|
-
|
|
287
|
-
- CLI workflows across the
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
features; see [OPERATIONS.md](OPERATIONS.md).
|
|
285
|
+
- REST contract projection and standard compliance are implemented in the
|
|
286
|
+
server; see [REST.md](REST.md).
|
|
287
|
+
- CLI workflows across the catalog are implemented in [CLI.md](CLI.md).
|
|
288
|
+
- Catalog pinning and source CI are implementation details; packaging is
|
|
289
|
+
documented in [RELEASE.md](RELEASE.md).
|
|
290
|
+
- Metrics, rate limiting and load/fuzz testing are server-side features; see
|
|
291
|
+
[OPERATIONS.md](OPERATIONS.md).
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
# Examples
|
|
2
2
|
|
|
3
|
-
Runnable examples for the three surfaces. Models must already be cached
|
|
3
|
+
Runnable examples for the three surfaces. Models must already be cached; none
|
|
4
|
+
of these examples downloads a model. For the shortest path from a fresh
|
|
5
|
+
install, start with [Quickstart](QUICKSTART.md).
|
|
6
|
+
|
|
7
|
+
The repository ships one small script that exercises the library end to end:
|
|
8
|
+
|
|
9
|
+
| Script | What it shows |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| [`examples/quickstart.py`](https://github.com/gia-uh/decision-toolkit/blob/main/examples/quickstart.py) | Load a cached model, ask choice/yes-no/score questions and print probabilities. |
|
|
4
12
|
|
|
5
13
|
```bash
|
|
6
14
|
dtk models download gliner2.5-multi
|
|
7
|
-
|
|
8
|
-
uv run dtk models download gliner2.5-multi
|
|
15
|
+
python examples/quickstart.py gliner2.5-multi
|
|
9
16
|
```
|
|
10
17
|
|
|
18
|
+
The code blocks below cover the same surfaces and are the reference examples
|
|
19
|
+
for the library, CLI and REST APIs.
|
|
20
|
+
|
|
11
21
|
## Library
|
|
12
22
|
|
|
13
23
|
```python
|