seldon-runtime 0.1.1.dev2__tar.gz → 0.1.1.dev4__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.
Files changed (74) hide show
  1. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/CHANGELOG.md +49 -1
  2. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/PKG-INFO +88 -28
  3. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/README.md +87 -27
  4. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/pyproject.toml +1 -1
  5. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/runtime_modules.txt +3 -0
  6. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/schemas/compiler-artifact-v1.json +81 -4
  7. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/__init__.py +1 -1
  8. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/artifact.py +76 -22
  9. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/components.py +112 -1
  10. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/conditional.py +2 -0
  11. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/contracts.py +72 -1
  12. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/executor.py +27 -13
  13. seldon_runtime-0.1.1.dev4/seldon_runtime/native_adapter.py +160 -0
  14. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/program_validation.py +2 -0
  15. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/semantic.py +140 -0
  16. seldon_runtime-0.1.1.dev4/seldon_runtime/span_review.py +339 -0
  17. seldon_runtime-0.1.1.dev4/seldon_runtime/system_one.py +180 -0
  18. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime.egg-info/PKG-INFO +88 -28
  19. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime.egg-info/SOURCES.txt +7 -0
  20. seldon_runtime-0.1.1.dev4/tests/fixtures/compiler-artifact-reference/manifest.json +207 -0
  21. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_artifact.py +18 -2
  22. seldon_runtime-0.1.1.dev4/tests/test_native_artifact.py +256 -0
  23. seldon_runtime-0.1.1.dev4/tests/test_reference_program.py +427 -0
  24. seldon_runtime-0.1.1.dev4/tests/test_span_review.py +507 -0
  25. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/wheel_probe.py +25 -0
  26. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/LICENSE +0 -0
  27. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/MANIFEST.in +0 -0
  28. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/NOTICE +0 -0
  29. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/THIRD_PARTY_NOTICES.md +0 -0
  30. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/scripts/export_artifact_schema.py +0 -0
  31. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/attempt_bound.py +0 -0
  32. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/contract_versions.py +0 -0
  33. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/data/o200k_base.tiktoken +0 -0
  34. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/data/provenance.json +0 -0
  35. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/deadline.py +0 -0
  36. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/gliner_normalize.py +0 -0
  37. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/instruction_envelope.py +0 -0
  38. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/json_pointer.py +0 -0
  39. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/local.py +0 -0
  40. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/local_models.py +0 -0
  41. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/local_telemetry.py +0 -0
  42. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/native_schema.py +0 -0
  43. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/output_budget.py +0 -0
  44. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/provider_error.py +0 -0
  45. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/research_kernels.py +0 -0
  46. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/runner.py +0 -0
  47. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/telemetry.py +0 -0
  48. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/templates.py +0 -0
  49. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/tokenizer.py +0 -0
  50. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime/tool_wire.py +0 -0
  51. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime.egg-info/dependency_links.txt +0 -0
  52. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime.egg-info/requires.txt +0 -0
  53. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/seldon_runtime.egg-info/top_level.txt +0 -0
  54. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/setup.cfg +0 -0
  55. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/compiler-artifact/manifest.json +0 -0
  56. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/compiler-artifact-dev1/manifest.json +0 -0
  57. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/digest_goldens.json +0 -0
  58. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/local_gliner_raw.json +0 -0
  59. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/serving_compat/function-plan-v1.json +0 -0
  60. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/serving_compat/function-plan-v2.json +0 -0
  61. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/serving_compat/function-plan-v3.json +0 -0
  62. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/serving_compat/function-plan-v4.json +0 -0
  63. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/serving_compat/function-plan-v5.json +0 -0
  64. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/fixtures/tokenizer_goldens.json +0 -0
  65. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/installed_local_probe.py +0 -0
  66. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_contracts.py +0 -0
  67. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_correctness_repairs.py +0 -0
  68. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_gliner_normalize.py +0 -0
  69. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_import_closure.py +0 -0
  70. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_install.py +0 -0
  71. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_local.py +0 -0
  72. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_runner.py +0 -0
  73. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/test_tokenizer.py +0 -0
  74. {seldon_runtime-0.1.1.dev2 → seldon_runtime-0.1.1.dev4}/tests/tokenizer_cases.py +0 -0
@@ -1,6 +1,54 @@
1
1
  # Changelog
2
2
 
3
- ## 0.1.1.dev2 — unreleased
3
+ ## 0.1.1.dev4 — unreleased
4
+
5
+ - Add optional data-only `FunctionSpec.reference_program` for existing multi-call
6
+ workflows with deterministic final processing and bounded conditional execution.
7
+ A single central reference-plan constructor preserves the complete graph for
8
+ compiler reference/direct candidates and runtime failure fallback; previously
9
+ each path rebuilt bare LLM steps and lost application output assembly.
10
+ - Preserve exact saved requests and existing step/call limits. Reject altered
11
+ prompts, extra paid calls, native/generated reference steps and recursive fallback.
12
+ Apply frozen graph permissions to the reference even when the selected plan is simple.
13
+ - Require a dev4 artifact reader when the new field is present; retain old source
14
+ digests and dev1/dev2 chat/dev3 native artifact compatibility. Regenerate the schema.
15
+ - Add dependency, pointer, conditional skip, fallback and installed-artifact probes.
16
+ This change does not publish a package or qualify a live provider.
17
+
18
+ - Add source-grounded span decisions, contextual quotation grounding, combined
19
+ overlap reconciliation and bounded ordered JSON serialization for complete
20
+ reference workflows. Raw response quotation metadata cannot grant trusted
21
+ provenance. Historical runtime versions cannot claim support for these kernels.
22
+
23
+ ## 0.1.1.dev3 — unreleased
24
+
25
+ - Accept native System One `choice` and Fastino GLiNER `extract` plans in standalone
26
+ compiler artifacts. The old artifact boundary rejected these operations even
27
+ though the interpreter already executed them for hosted bundles.
28
+ - Freeze native protocol, upstream model/revision, modes, answer types and host
29
+ wire profile in artifact requirements; validate them against both plan operations
30
+ and caller bindings before dispatch. Reuse GLiNER normalization and the extracted
31
+ System One wire implementation; generated kernels remain unsupported.
32
+ - Require dev3 for native manifests while keeping original dev1/dev2 chat artifacts
33
+ readable without mutation. Regenerate the public artifact schema.
34
+ - Add nonconstant classification and grounded-span artifact execution tests with
35
+ deterministic provider callbacks, and rejection coverage for mode/identity/profile
36
+ mismatches. This does not qualify live providers, publish a release or change hosted
37
+ bundle eligibility/refresh behavior.
38
+
39
+ ## 0.1.1.dev2 — published 2026-11-30
40
+
41
+ Published revision `5d30a44` through [Runtime Publish](https://github.com/Deep-Insight-Labs/seldon-runtime/actions/runs/46427361111):
42
+ all three Linux compatibility jobs, artifact build, installed-TestPyPI probe and
43
+ PyPI publication succeeded. This release does not deploy hosted Seldon or publish
44
+ the standalone compiler.
45
+
46
+ Local qualification passed 213 runtime tests with current dependencies and again
47
+ with Python 3.11, Pydantic 2.2.0 and tiktoken 0.7.0. Linux containers with networking
48
+ disabled passed 213 runtime tests and 205 staged compiler tests. The compiler
49
+ check used a candidate runtime dependency override; it establishes consumer
50
+ compatibility, not installation or publication of a compiler release. No new
51
+ live-model qualification or production deployment is claimed.
4
52
 
5
53
  - Bundle the immutable o200k_base rank data and construct its encoding locally.
6
54
  Token budgets and both historical/UTF-8 chunk boundaries previously depended on
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seldon-runtime
3
- Version: 0.1.1.dev2
3
+ Version: 0.1.1.dev4
4
4
  Summary: Standalone Seldon Functions interpreter and local execution client
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Source, https://github.com/Deep-Insight-Labs/seldon-runtime
@@ -31,15 +31,22 @@ for eligible Seldon Functions. The package name is **`seldon-runtime`**, and the
31
31
  Python import is `seldon_runtime`. This project is separate from SeldonIO.
32
32
 
33
33
  A single generic runtime executes authorized Function bundles on your hardware.
34
- Optimization and hosted comparison happen on Seldon. The runtime contains no
34
+ Compile with the public [Seldon Compiler](https://github.com/Deep-Insight-Labs/seldon-compiler)
35
+ or use a private Seldon deployment. The runtime contains no
35
36
  optimizer, billing service, dashboard or server infrastructure. Its first local
36
37
  model adapter uses pinned GLiNER2 open weights for extraction and classification.
37
38
 
38
- The current preview, [`0.1.1.dev1`](https://pypi.org/project/seldon-runtime/0.1.1.dev1/),
39
+ The current preview, [`0.1.1.dev2`](https://pypi.org/project/seldon-runtime/0.1.1.dev2/),
39
40
  is available on PyPI. Hosted bundle execution requires a Seldon deployment with
40
41
  bundle delivery enabled for your workspace. The separate standalone artifact reader
41
- uses caller-supplied model bindings without a Seldon service; its compiler exporter
42
- is still in development.
42
+ uses caller-supplied model bindings without a Seldon service. The public compiler
43
+ CLI can compile Functions, produce comparison reports and explicitly export
44
+ selected artifacts today; it requires no platform account. This standalone path is separate from hosted Runner bundle
45
+ eligibility and fallback.
46
+
47
+ The source checkout targets **0.1.1.dev4 (unreleased)**, adding declared reference
48
+ workflows alongside standalone native artifact bindings. Install this checkout with `python -m pip install .` to use
49
+ that capability; the published dev2 package does not accept native artifacts.
43
50
 
44
51
  ## Install
45
52
 
@@ -51,14 +58,14 @@ On Linux, install CPU PyTorch explicitly to avoid downloading CUDA dependencies:
51
58
 
52
59
  ```sh
53
60
  python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
54
- python -m pip install 'seldon-runtime[gliner]==0.1.1.dev1'
61
+ python -m pip install 'seldon-runtime[gliner]==0.1.1.dev2'
55
62
  ```
56
63
 
57
64
  On macOS:
58
65
 
59
66
  ```sh
60
67
  python -m pip install torch
61
- python -m pip install 'seldon-runtime[gliner]==0.1.1.dev1'
68
+ python -m pip install 'seldon-runtime[gliner]==0.1.1.dev2'
62
69
  ```
63
70
 
64
71
  In a uv environment, use `uv pip install` for the same commands. In a Linux uv
@@ -66,22 +73,21 @@ project, persist the dedicated torch index:
66
73
 
67
74
  ```sh
68
75
  uv add torch --index pytorch=https://download.pytorch.org/whl/cpu
69
- uv add 'seldon-runtime[gliner]==0.1.1.dev1'
76
+ uv add 'seldon-runtime[gliner]==0.1.1.dev2'
70
77
  ```
71
78
 
72
- The model weights and tokenizer files download on first use. Cache the pinned
73
- snapshot in advance for restricted networks. Token-chunked plans also need the
74
- tiktoken BPE cache (`TIKTOKEN_CACHE_DIR`). Model weights are not bundled in the wheel.
79
+ Optional GLiNER model weights and their tokenizer files download on first use.
80
+ Cache the pinned snapshot in advance for restricted networks; these model assets
81
+ are not bundled in the wheel.
75
82
 
76
- The unreleased `0.1.1.dev2` candidate removes the separate tiktoken cache prerequisite:
77
- its wheel and source distribution include the fixed `o200k_base` vocabulary used
78
- for Seldon token budgets and chunking. The runtime verifies its hash and constructs
83
+ Since `0.1.1.dev2`, the wheel and source distribution include the fixed `o200k_base`
84
+ vocabulary used for Seldon token budgets and chunking. The runtime verifies its hash and constructs
79
85
  the encoding directly; it never downloads or repairs missing/corrupt tokenizer
80
86
  data. No network or writable cache is required for these operations. Optional
81
87
  GLiNER weights and their own tokenizer files still require advance preparation.
82
88
  See [third-party notices](THIRD_PARTY_NOTICES.md) and
83
89
  [asset provenance](seldon_runtime/data/provenance.json) for sources and license basis.
84
- The published dev1 installation commands above retain their original prerequisites.
90
+ Older dev1 installations still require a prepared tiktoken BPE cache.
85
91
 
86
92
  ## Run a Function locally
87
93
 
@@ -151,12 +157,12 @@ Always close the runner to stop background tasks and attempt a bounded flush.
151
157
 
152
158
  ## Development
153
159
 
154
- ### Standalone compiler artifacts (unreleased)
160
+ ### Standalone compiler artifacts (preview)
155
161
 
156
162
  The separate compiler-artifact reader executes locally compiled user-owned plans.
157
163
  It does not use `Runner.load`, hosted Function IDs, a Seldon API key, refresh or
158
- telemetry. This reader is under development; a public compiler/exporter is not yet
159
- available. The existing hosted-bundle instructions above remain unchanged.
164
+ telemetry. The public compiler CLI produces these artifacts. The existing
165
+ hosted-bundle instructions above remain unchanged.
160
166
 
161
167
  An export directory contains one `manifest.json`, at most 2 MiB. Plan and spec are
162
168
  inline; no file paths, URLs, credentials or executable Python are supported. The
@@ -169,10 +175,10 @@ a development environment with `python -m pip install '.[schema]'` followed by
169
175
  that generator's `--check` mode, independently of the runtime compatibility matrix.
170
176
 
171
177
  The manifest freezes the compiler version and an explicit runtime version. New
172
- exports target the current producer version (`0.1.1.dev2` in this unreleased
173
- candidate). The dev2 reader accepts the reviewed set `0.1.1.dev1` and `0.1.1.dev2`;
174
- original dev1 manifests retain their pin and hashes. This packaging fix preserves
175
- token and plan semantics. dev0 and future versions are rejected until explicitly
178
+ exports target the source runtime version (`0.1.1.dev4`). Its reader accepts
179
+ the reviewed set `0.1.1.dev1`, `0.1.1.dev2`, `0.1.1.dev3` and `0.1.1.dev4`; original manifests retain
180
+ their pin and hashes. Native artifacts require dev3 or dev4; older runtime contracts
181
+ remain chat/deterministic-only. dev0 and future versions are rejected until explicitly
176
182
  reviewed; there is no version-prefix or range-based compatibility inference.
177
183
  The manifest also freezes the optimizer contract (v1–v8), evaluation semantics,
178
184
  instruction envelope, conditional
@@ -209,16 +215,30 @@ policy before invoking a provider; your transport still owns TLS, credential ori
209
215
  binding, response-size limits and protocol decoding. Known transport failures use
210
216
  `ProviderError`; untyped failures stop without automatic fallback or retry.
211
217
 
212
- This initial handoff supports OpenAI-compatible chat steps and supported deterministic
213
- operators, including versioned chunking/conditional graphs. Native `choice`/`extract`
214
- adapters and research `generated_kernel` steps are explicitly rejected. A model
218
+ The source dev4 handoff supports OpenAI-compatible chat, native `choice`/`extract`
219
+ and deterministic operators, including versioned chunking/conditional graphs.
220
+ Native bindings declare `protocol="system_one"` with `capabilities=("choice",)` or
221
+ `protocol="fastino_gliner"` with `capabilities=("extract",)`, a nonempty `upstream_model`
222
+ and `revision`, and explicit `native_modes`. Supported modes are `legacy`/`pairs`
223
+ for System One and `legacy`/`spans`/`records` for GLiNER. System One also declares
224
+ `native_answers` (`choice`, `boolean`, `noul`, `score`) and `native_max_levels` (2–10).
225
+ `native_profile` carries only the host's reviewed wire-shape options under `host`;
226
+ it cannot carry endpoints or credentials. These identities must match the caller's
227
+ binding; unsupported operations and modes fail before provider dispatch.
228
+
229
+ The runtime supplies `native_adapter.native_request(model, payload)` and
230
+ `normalize_native(model, payload, raw)` for transports. The binding still returns
231
+ normalized output and owns its HTTP or local-model execution; the artifact never
232
+ downloads model weights or contacts an endpoint on its own. Context fitting uses
233
+ the native wire body and the frozen output policy, including GLiNER encoder rules.
234
+ Research `generated_kernel` steps remain explicitly rejected. A model
215
235
  revision is an operator-supplied identity, not proof of immutable upstream weights.
216
236
  Artifacts may contain sensitive prompts/spec text. Digest checks detect corruption,
217
237
  not malicious replacement of both the content and its digest; trust the producer
218
238
  separately. Linux/macOS filesystem APIs are used; Windows is not qualified.
219
239
 
220
240
  The standalone fixture in `tests/fixtures/compiler-artifact` is generated from the
221
- runtime test factory, pending a real compiler producer. Installed wheel/sdist probes
241
+ runtime test factory. Installed wheel/sdist probes
222
242
  exercise its nonconstant execution through the real interpreter with a deterministic
223
243
  provider callback. They do not qualify a live model, compiler selection quality or
224
244
  the complete compiler-to-runtime lifecycle.
@@ -264,8 +284,8 @@ Linux ARM64 CPU; other hardware and Windows are not claimed as qualified.
264
284
  ## Releases
265
285
 
266
286
  The publishing workflow is `.github/workflows/runtime-publish.yml` in
267
- `Deep-Insight-Labs/seldon-runtime`. Register project `seldon-runtime` as a trusted
268
- publisher on TestPyPI with environment `testpypi`, and on PyPI with environment
287
+ `Deep-Insight-Labs/seldon-runtime`. Trusted publishers are configured for project
288
+ `seldon-runtime` on TestPyPI with environment `testpypi` and PyPI with environment
269
289
  `pypi`. A `runtime-v<version>` tag must match `pyproject.toml` and `__version__`.
270
290
 
271
291
  Publication is disabled unless `SELDON_RUNTIME_TESTPYPI_PUBLISH_ENABLED` and
@@ -280,3 +300,43 @@ No stored registry token is required. Registry versions are immutable.
280
300
  Apache-2.0; see [LICENSE](LICENSE) and [NOTICE](NOTICE). Optional GLiNER2 code and
281
301
  downloaded weights retain their own upstream licenses. The release is scoped to
282
302
  this repository; it does not license the separately operated Seldon service.
303
+
304
+ ## Declared reference workflows
305
+
306
+ An optional `FunctionSpec.reference_program` supplies the existing workflow as a
307
+ bounded `Plan`. Use it when the reference performs deterministic processing or
308
+ conditional execution around its saved LLM calls. Without it, reference execution
309
+ remains the ordered saved calls and returns the last result. Omitted or null programs
310
+ preserve existing source serialization and digests.
311
+
312
+ Each saved call must appear exactly once statically, with its original call ID,
313
+ model and request; branches may skip a call at execution time. The program may use
314
+ the existing deterministic operators and forward-only branch/merge/return nodes,
315
+ within the existing step limits. Generated kernels, native model steps, added paid
316
+ calls, altered prompts/configuration and reference fallback are rejected. Input and
317
+ intermediate JSON pointers are validated using the existing program/schema rules.
318
+
319
+ For example, two saved calls can finish with an `object` step whose `inputs` are
320
+ `["validate#", "augment#"]` and whose `config` is
321
+ `{"fields": ["validation", "augmentation"]}`. This returns both results without
322
+ another model request. A downstream deterministic operator can instead produce the
323
+ final domain output. The final value must satisfy the Function's output schema.
324
+
325
+ The compiler's direct substitutions preserve this exact graph and replace only
326
+ LLM models. Explicit failure fallback executes the complete declared reference,
327
+ including its original branching and output processing. Both selected and reference
328
+ graphs must satisfy frozen conditional/chunking permissions before execution.
329
+ Artifacts containing `reference_program` require runtime dev4; older readers fail
330
+ closed rather than discard workflow behavior. Existing dev1/dev2 chat and dev3
331
+ native artifacts remain readable with their original version pins and hashes.
332
+
333
+ The v7 component registry additionally exposes bounded `apply_span_decisions`,
334
+ `ground_span_quotes`, `reconcile_span_candidates`, and `encode_json` kernels.
335
+ Span decisions operate on authoritative source coordinates. Quotation grounding
336
+ retains every exact contextual occurrence and exposes failures for conditional
337
+ repair; raw model responses cannot supply trusted provenance. Reconcile all
338
+ stage claims together before resolving overlaps. Missing configured response
339
+ collections default to empty; explicit nulls and invalid types fail.
340
+ `encode_json` emits standard JSON spacing, supports explicit field order, and
341
+ bounds depth, node count, collection sizes and UTF-8 output bytes. These kernels
342
+ require the dev4 artifact reader and are hidden from historical compiler registries.
@@ -5,15 +5,22 @@ for eligible Seldon Functions. The package name is **`seldon-runtime`**, and the
5
5
  Python import is `seldon_runtime`. This project is separate from SeldonIO.
6
6
 
7
7
  A single generic runtime executes authorized Function bundles on your hardware.
8
- Optimization and hosted comparison happen on Seldon. The runtime contains no
8
+ Compile with the public [Seldon Compiler](https://github.com/Deep-Insight-Labs/seldon-compiler)
9
+ or use a private Seldon deployment. The runtime contains no
9
10
  optimizer, billing service, dashboard or server infrastructure. Its first local
10
11
  model adapter uses pinned GLiNER2 open weights for extraction and classification.
11
12
 
12
- The current preview, [`0.1.1.dev1`](https://pypi.org/project/seldon-runtime/0.1.1.dev1/),
13
+ The current preview, [`0.1.1.dev2`](https://pypi.org/project/seldon-runtime/0.1.1.dev2/),
13
14
  is available on PyPI. Hosted bundle execution requires a Seldon deployment with
14
15
  bundle delivery enabled for your workspace. The separate standalone artifact reader
15
- uses caller-supplied model bindings without a Seldon service; its compiler exporter
16
- is still in development.
16
+ uses caller-supplied model bindings without a Seldon service. The public compiler
17
+ CLI can compile Functions, produce comparison reports and explicitly export
18
+ selected artifacts today; it requires no platform account. This standalone path is separate from hosted Runner bundle
19
+ eligibility and fallback.
20
+
21
+ The source checkout targets **0.1.1.dev4 (unreleased)**, adding declared reference
22
+ workflows alongside standalone native artifact bindings. Install this checkout with `python -m pip install .` to use
23
+ that capability; the published dev2 package does not accept native artifacts.
17
24
 
18
25
  ## Install
19
26
 
@@ -25,14 +32,14 @@ On Linux, install CPU PyTorch explicitly to avoid downloading CUDA dependencies:
25
32
 
26
33
  ```sh
27
34
  python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
28
- python -m pip install 'seldon-runtime[gliner]==0.1.1.dev1'
35
+ python -m pip install 'seldon-runtime[gliner]==0.1.1.dev2'
29
36
  ```
30
37
 
31
38
  On macOS:
32
39
 
33
40
  ```sh
34
41
  python -m pip install torch
35
- python -m pip install 'seldon-runtime[gliner]==0.1.1.dev1'
42
+ python -m pip install 'seldon-runtime[gliner]==0.1.1.dev2'
36
43
  ```
37
44
 
38
45
  In a uv environment, use `uv pip install` for the same commands. In a Linux uv
@@ -40,22 +47,21 @@ project, persist the dedicated torch index:
40
47
 
41
48
  ```sh
42
49
  uv add torch --index pytorch=https://download.pytorch.org/whl/cpu
43
- uv add 'seldon-runtime[gliner]==0.1.1.dev1'
50
+ uv add 'seldon-runtime[gliner]==0.1.1.dev2'
44
51
  ```
45
52
 
46
- The model weights and tokenizer files download on first use. Cache the pinned
47
- snapshot in advance for restricted networks. Token-chunked plans also need the
48
- tiktoken BPE cache (`TIKTOKEN_CACHE_DIR`). Model weights are not bundled in the wheel.
53
+ Optional GLiNER model weights and their tokenizer files download on first use.
54
+ Cache the pinned snapshot in advance for restricted networks; these model assets
55
+ are not bundled in the wheel.
49
56
 
50
- The unreleased `0.1.1.dev2` candidate removes the separate tiktoken cache prerequisite:
51
- its wheel and source distribution include the fixed `o200k_base` vocabulary used
52
- for Seldon token budgets and chunking. The runtime verifies its hash and constructs
57
+ Since `0.1.1.dev2`, the wheel and source distribution include the fixed `o200k_base`
58
+ vocabulary used for Seldon token budgets and chunking. The runtime verifies its hash and constructs
53
59
  the encoding directly; it never downloads or repairs missing/corrupt tokenizer
54
60
  data. No network or writable cache is required for these operations. Optional
55
61
  GLiNER weights and their own tokenizer files still require advance preparation.
56
62
  See [third-party notices](THIRD_PARTY_NOTICES.md) and
57
63
  [asset provenance](seldon_runtime/data/provenance.json) for sources and license basis.
58
- The published dev1 installation commands above retain their original prerequisites.
64
+ Older dev1 installations still require a prepared tiktoken BPE cache.
59
65
 
60
66
  ## Run a Function locally
61
67
 
@@ -125,12 +131,12 @@ Always close the runner to stop background tasks and attempt a bounded flush.
125
131
 
126
132
  ## Development
127
133
 
128
- ### Standalone compiler artifacts (unreleased)
134
+ ### Standalone compiler artifacts (preview)
129
135
 
130
136
  The separate compiler-artifact reader executes locally compiled user-owned plans.
131
137
  It does not use `Runner.load`, hosted Function IDs, a Seldon API key, refresh or
132
- telemetry. This reader is under development; a public compiler/exporter is not yet
133
- available. The existing hosted-bundle instructions above remain unchanged.
138
+ telemetry. The public compiler CLI produces these artifacts. The existing
139
+ hosted-bundle instructions above remain unchanged.
134
140
 
135
141
  An export directory contains one `manifest.json`, at most 2 MiB. Plan and spec are
136
142
  inline; no file paths, URLs, credentials or executable Python are supported. The
@@ -143,10 +149,10 @@ a development environment with `python -m pip install '.[schema]'` followed by
143
149
  that generator's `--check` mode, independently of the runtime compatibility matrix.
144
150
 
145
151
  The manifest freezes the compiler version and an explicit runtime version. New
146
- exports target the current producer version (`0.1.1.dev2` in this unreleased
147
- candidate). The dev2 reader accepts the reviewed set `0.1.1.dev1` and `0.1.1.dev2`;
148
- original dev1 manifests retain their pin and hashes. This packaging fix preserves
149
- token and plan semantics. dev0 and future versions are rejected until explicitly
152
+ exports target the source runtime version (`0.1.1.dev4`). Its reader accepts
153
+ the reviewed set `0.1.1.dev1`, `0.1.1.dev2`, `0.1.1.dev3` and `0.1.1.dev4`; original manifests retain
154
+ their pin and hashes. Native artifacts require dev3 or dev4; older runtime contracts
155
+ remain chat/deterministic-only. dev0 and future versions are rejected until explicitly
150
156
  reviewed; there is no version-prefix or range-based compatibility inference.
151
157
  The manifest also freezes the optimizer contract (v1–v8), evaluation semantics,
152
158
  instruction envelope, conditional
@@ -183,16 +189,30 @@ policy before invoking a provider; your transport still owns TLS, credential ori
183
189
  binding, response-size limits and protocol decoding. Known transport failures use
184
190
  `ProviderError`; untyped failures stop without automatic fallback or retry.
185
191
 
186
- This initial handoff supports OpenAI-compatible chat steps and supported deterministic
187
- operators, including versioned chunking/conditional graphs. Native `choice`/`extract`
188
- adapters and research `generated_kernel` steps are explicitly rejected. A model
192
+ The source dev4 handoff supports OpenAI-compatible chat, native `choice`/`extract`
193
+ and deterministic operators, including versioned chunking/conditional graphs.
194
+ Native bindings declare `protocol="system_one"` with `capabilities=("choice",)` or
195
+ `protocol="fastino_gliner"` with `capabilities=("extract",)`, a nonempty `upstream_model`
196
+ and `revision`, and explicit `native_modes`. Supported modes are `legacy`/`pairs`
197
+ for System One and `legacy`/`spans`/`records` for GLiNER. System One also declares
198
+ `native_answers` (`choice`, `boolean`, `noul`, `score`) and `native_max_levels` (2–10).
199
+ `native_profile` carries only the host's reviewed wire-shape options under `host`;
200
+ it cannot carry endpoints or credentials. These identities must match the caller's
201
+ binding; unsupported operations and modes fail before provider dispatch.
202
+
203
+ The runtime supplies `native_adapter.native_request(model, payload)` and
204
+ `normalize_native(model, payload, raw)` for transports. The binding still returns
205
+ normalized output and owns its HTTP or local-model execution; the artifact never
206
+ downloads model weights or contacts an endpoint on its own. Context fitting uses
207
+ the native wire body and the frozen output policy, including GLiNER encoder rules.
208
+ Research `generated_kernel` steps remain explicitly rejected. A model
189
209
  revision is an operator-supplied identity, not proof of immutable upstream weights.
190
210
  Artifacts may contain sensitive prompts/spec text. Digest checks detect corruption,
191
211
  not malicious replacement of both the content and its digest; trust the producer
192
212
  separately. Linux/macOS filesystem APIs are used; Windows is not qualified.
193
213
 
194
214
  The standalone fixture in `tests/fixtures/compiler-artifact` is generated from the
195
- runtime test factory, pending a real compiler producer. Installed wheel/sdist probes
215
+ runtime test factory. Installed wheel/sdist probes
196
216
  exercise its nonconstant execution through the real interpreter with a deterministic
197
217
  provider callback. They do not qualify a live model, compiler selection quality or
198
218
  the complete compiler-to-runtime lifecycle.
@@ -238,8 +258,8 @@ Linux ARM64 CPU; other hardware and Windows are not claimed as qualified.
238
258
  ## Releases
239
259
 
240
260
  The publishing workflow is `.github/workflows/runtime-publish.yml` in
241
- `Deep-Insight-Labs/seldon-runtime`. Register project `seldon-runtime` as a trusted
242
- publisher on TestPyPI with environment `testpypi`, and on PyPI with environment
261
+ `Deep-Insight-Labs/seldon-runtime`. Trusted publishers are configured for project
262
+ `seldon-runtime` on TestPyPI with environment `testpypi` and PyPI with environment
243
263
  `pypi`. A `runtime-v<version>` tag must match `pyproject.toml` and `__version__`.
244
264
 
245
265
  Publication is disabled unless `SELDON_RUNTIME_TESTPYPI_PUBLISH_ENABLED` and
@@ -254,3 +274,43 @@ No stored registry token is required. Registry versions are immutable.
254
274
  Apache-2.0; see [LICENSE](LICENSE) and [NOTICE](NOTICE). Optional GLiNER2 code and
255
275
  downloaded weights retain their own upstream licenses. The release is scoped to
256
276
  this repository; it does not license the separately operated Seldon service.
277
+
278
+ ## Declared reference workflows
279
+
280
+ An optional `FunctionSpec.reference_program` supplies the existing workflow as a
281
+ bounded `Plan`. Use it when the reference performs deterministic processing or
282
+ conditional execution around its saved LLM calls. Without it, reference execution
283
+ remains the ordered saved calls and returns the last result. Omitted or null programs
284
+ preserve existing source serialization and digests.
285
+
286
+ Each saved call must appear exactly once statically, with its original call ID,
287
+ model and request; branches may skip a call at execution time. The program may use
288
+ the existing deterministic operators and forward-only branch/merge/return nodes,
289
+ within the existing step limits. Generated kernels, native model steps, added paid
290
+ calls, altered prompts/configuration and reference fallback are rejected. Input and
291
+ intermediate JSON pointers are validated using the existing program/schema rules.
292
+
293
+ For example, two saved calls can finish with an `object` step whose `inputs` are
294
+ `["validate#", "augment#"]` and whose `config` is
295
+ `{"fields": ["validation", "augmentation"]}`. This returns both results without
296
+ another model request. A downstream deterministic operator can instead produce the
297
+ final domain output. The final value must satisfy the Function's output schema.
298
+
299
+ The compiler's direct substitutions preserve this exact graph and replace only
300
+ LLM models. Explicit failure fallback executes the complete declared reference,
301
+ including its original branching and output processing. Both selected and reference
302
+ graphs must satisfy frozen conditional/chunking permissions before execution.
303
+ Artifacts containing `reference_program` require runtime dev4; older readers fail
304
+ closed rather than discard workflow behavior. Existing dev1/dev2 chat and dev3
305
+ native artifacts remain readable with their original version pins and hashes.
306
+
307
+ The v7 component registry additionally exposes bounded `apply_span_decisions`,
308
+ `ground_span_quotes`, `reconcile_span_candidates`, and `encode_json` kernels.
309
+ Span decisions operate on authoritative source coordinates. Quotation grounding
310
+ retains every exact contextual occurrence and exposes failures for conditional
311
+ repair; raw model responses cannot supply trusted provenance. Reconcile all
312
+ stage claims together before resolving overlaps. Missing configured response
313
+ collections default to empty; explicit nulls and invalid types fail.
314
+ `encode_json` emits standard JSON spacing, supports explicit field order, and
315
+ bounds depth, node count, collection sizes and UTF-8 output bytes. These kernels
316
+ require the dev4 artifact reader and are hidden from historical compiler registries.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "seldon-runtime"
7
- version = "0.1.1.dev2"
7
+ version = "0.1.1.dev4"
8
8
  description = "Standalone Seldon Functions interpreter and local execution client"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -4,6 +4,7 @@ templates
4
4
  tool_wire
5
5
  conditional
6
6
  semantic
7
+ span_review
7
8
  executor
8
9
  components
9
10
  research_kernels
@@ -21,3 +22,5 @@ local_models
21
22
  local_telemetry
22
23
  artifact
23
24
  tokenizer
25
+ native_adapter
26
+ system_one
@@ -674,6 +674,17 @@
674
674
  "title": "Output Schema",
675
675
  "type": "object"
676
676
  },
677
+ "reference_program": {
678
+ "anyOf": [
679
+ {
680
+ "$ref": "#/$defs/Plan"
681
+ },
682
+ {
683
+ "type": "null"
684
+ }
685
+ ],
686
+ "default": null
687
+ },
677
688
  "evaluator": {
678
689
  "default": "exact",
679
690
  "enum": [
@@ -771,7 +782,11 @@
771
782
  "description": "Execution capabilities, not endpoint discovery or proof of model quality.",
772
783
  "properties": {
773
784
  "protocol": {
774
- "const": "openai-chat-completions",
785
+ "enum": [
786
+ "openai-chat-completions",
787
+ "fastino_gliner",
788
+ "system_one"
789
+ ],
775
790
  "title": "Protocol",
776
791
  "type": "string"
777
792
  },
@@ -780,7 +795,9 @@
780
795
  "enum": [
781
796
  "chat",
782
797
  "structured_output",
783
- "tools"
798
+ "tools",
799
+ "choice",
800
+ "extract"
784
801
  ],
785
802
  "type": "string"
786
803
  },
@@ -812,6 +829,60 @@
812
829
  }
813
830
  ],
814
831
  "title": "Revision"
832
+ },
833
+ "upstream_model": {
834
+ "anyOf": [
835
+ {
836
+ "maxLength": 256,
837
+ "minLength": 1,
838
+ "type": "string"
839
+ },
840
+ {
841
+ "type": "null"
842
+ }
843
+ ],
844
+ "default": null,
845
+ "title": "Upstream Model"
846
+ },
847
+ "native_modes": {
848
+ "default": [],
849
+ "items": {
850
+ "enum": [
851
+ "legacy",
852
+ "pairs",
853
+ "spans",
854
+ "records"
855
+ ],
856
+ "type": "string"
857
+ },
858
+ "title": "Native Modes",
859
+ "type": "array"
860
+ },
861
+ "native_answers": {
862
+ "default": [],
863
+ "items": {
864
+ "enum": [
865
+ "choice",
866
+ "boolean",
867
+ "noul",
868
+ "score"
869
+ ],
870
+ "type": "string"
871
+ },
872
+ "title": "Native Answers",
873
+ "type": "array"
874
+ },
875
+ "native_max_levels": {
876
+ "default": 10,
877
+ "maximum": 10,
878
+ "minimum": 2,
879
+ "title": "Native Max Levels",
880
+ "type": "integer"
881
+ },
882
+ "native_profile": {
883
+ "additionalProperties": true,
884
+ "title": "Native Profile",
885
+ "type": "object"
815
886
  }
816
887
  },
817
888
  "required": [
@@ -1350,7 +1421,11 @@
1350
1421
  "project_records",
1351
1422
  "merge_spans",
1352
1423
  "merge_records",
1353
- "merge_labels"
1424
+ "merge_labels",
1425
+ "apply_span_decisions",
1426
+ "ground_span_quotes",
1427
+ "reconcile_span_candidates",
1428
+ "encode_json"
1354
1429
  ],
1355
1430
  "title": "Op",
1356
1431
  "type": "string"
@@ -1578,7 +1653,9 @@
1578
1653
  "runtime_version": {
1579
1654
  "enum": [
1580
1655
  "0.1.1.dev1",
1581
- "0.1.1.dev2"
1656
+ "0.1.1.dev2",
1657
+ "0.1.1.dev3",
1658
+ "0.1.1.dev4"
1582
1659
  ],
1583
1660
  "title": "Runtime Version",
1584
1661
  "type": "string"
@@ -1,3 +1,3 @@
1
1
  """Standalone Seldon Functions interpreter and local execution client."""
2
2
 
3
- __version__ = "0.1.1.dev2"
3
+ __version__ = "0.1.1.dev4"