seldon-runtime 0.1.1.dev1__tar.gz → 0.1.1.dev3__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 (72) hide show
  1. seldon_runtime-0.1.1.dev3/CHANGELOG.md +89 -0
  2. seldon_runtime-0.1.1.dev3/MANIFEST.in +5 -0
  3. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/NOTICE +4 -0
  4. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/PKG-INFO +62 -23
  5. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/README.md +60 -22
  6. seldon_runtime-0.1.1.dev3/THIRD_PARTY_NOTICES.md +66 -0
  7. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/pyproject.toml +5 -2
  8. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/runtime_modules.txt +3 -0
  9. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/schemas/compiler-artifact-v1.json +67 -3
  10. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/__init__.py +1 -1
  11. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/artifact.py +54 -15
  12. seldon_runtime-0.1.1.dev3/seldon_runtime/data/o200k_base.tiktoken +199998 -0
  13. seldon_runtime-0.1.1.dev3/seldon_runtime/data/provenance.json +11 -0
  14. seldon_runtime-0.1.1.dev3/seldon_runtime/native_adapter.py +160 -0
  15. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/output_budget.py +2 -2
  16. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/semantic.py +4 -4
  17. seldon_runtime-0.1.1.dev3/seldon_runtime/system_one.py +180 -0
  18. seldon_runtime-0.1.1.dev3/seldon_runtime/tokenizer.py +60 -0
  19. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime.egg-info/PKG-INFO +62 -23
  20. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime.egg-info/SOURCES.txt +11 -0
  21. seldon_runtime-0.1.1.dev3/tests/fixtures/compiler-artifact/manifest.json +90 -0
  22. seldon_runtime-0.1.1.dev3/tests/fixtures/tokenizer_goldens.json +1417 -0
  23. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/test_artifact.py +26 -1
  24. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/test_correctness_repairs.py +2 -2
  25. seldon_runtime-0.1.1.dev3/tests/test_native_artifact.py +249 -0
  26. seldon_runtime-0.1.1.dev3/tests/test_tokenizer.py +86 -0
  27. seldon_runtime-0.1.1.dev3/tests/tokenizer_cases.py +45 -0
  28. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/wheel_probe.py +13 -1
  29. seldon_runtime-0.1.1.dev1/CHANGELOG.md +0 -35
  30. seldon_runtime-0.1.1.dev1/MANIFEST.in +0 -4
  31. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/LICENSE +0 -0
  32. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/scripts/export_artifact_schema.py +0 -0
  33. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/attempt_bound.py +0 -0
  34. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/components.py +0 -0
  35. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/conditional.py +0 -0
  36. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/contract_versions.py +0 -0
  37. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/contracts.py +0 -0
  38. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/deadline.py +0 -0
  39. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/executor.py +0 -0
  40. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/gliner_normalize.py +0 -0
  41. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/instruction_envelope.py +0 -0
  42. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/json_pointer.py +0 -0
  43. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/local.py +0 -0
  44. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/local_models.py +0 -0
  45. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/local_telemetry.py +0 -0
  46. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/native_schema.py +0 -0
  47. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/program_validation.py +0 -0
  48. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/provider_error.py +0 -0
  49. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/research_kernels.py +0 -0
  50. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/runner.py +0 -0
  51. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/telemetry.py +0 -0
  52. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/templates.py +0 -0
  53. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime/tool_wire.py +0 -0
  54. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime.egg-info/dependency_links.txt +0 -0
  55. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime.egg-info/requires.txt +0 -0
  56. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/seldon_runtime.egg-info/top_level.txt +0 -0
  57. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/setup.cfg +0 -0
  58. {seldon_runtime-0.1.1.dev1/tests/fixtures/compiler-artifact → seldon_runtime-0.1.1.dev3/tests/fixtures/compiler-artifact-dev1}/manifest.json +0 -0
  59. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/fixtures/digest_goldens.json +0 -0
  60. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/fixtures/local_gliner_raw.json +0 -0
  61. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/fixtures/serving_compat/function-plan-v1.json +0 -0
  62. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/fixtures/serving_compat/function-plan-v2.json +0 -0
  63. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/fixtures/serving_compat/function-plan-v3.json +0 -0
  64. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/fixtures/serving_compat/function-plan-v4.json +0 -0
  65. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/fixtures/serving_compat/function-plan-v5.json +0 -0
  66. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/installed_local_probe.py +0 -0
  67. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/test_contracts.py +0 -0
  68. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/test_gliner_normalize.py +0 -0
  69. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/test_import_closure.py +0 -0
  70. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/test_install.py +0 -0
  71. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/test_local.py +0 -0
  72. {seldon_runtime-0.1.1.dev1 → seldon_runtime-0.1.1.dev3}/tests/test_runner.py +0 -0
@@ -0,0 +1,89 @@
1
+ # Changelog
2
+
3
+ ## 0.1.1.dev3 — unreleased
4
+
5
+ - Accept native System One `choice` and Fastino GLiNER `extract` plans in standalone
6
+ compiler artifacts. The old artifact boundary rejected these operations even
7
+ though the interpreter already executed them for hosted bundles.
8
+ - Freeze native protocol, upstream model/revision, modes, answer types and host
9
+ wire profile in artifact requirements; validate them against both plan operations
10
+ and caller bindings before dispatch. Reuse GLiNER normalization and the extracted
11
+ System One wire implementation; generated kernels remain unsupported.
12
+ - Require dev3 for native manifests while keeping original dev1/dev2 chat artifacts
13
+ readable without mutation. Regenerate the public artifact schema.
14
+ - Add nonconstant classification and grounded-span artifact execution tests with
15
+ deterministic provider callbacks, and rejection coverage for mode/identity/profile
16
+ mismatches. This does not qualify live providers, publish a release or change hosted
17
+ bundle eligibility/refresh behavior.
18
+
19
+ ## 0.1.1.dev2 — published 2026-11-30
20
+
21
+ Published revision `5d30a44` through [Runtime Publish](https://github.com/Deep-Insight-Labs/seldon-runtime/actions/runs/46427361111):
22
+ all three Linux compatibility jobs, artifact build, installed-TestPyPI probe and
23
+ PyPI publication succeeded. This release does not deploy hosted Seldon or publish
24
+ the standalone compiler.
25
+
26
+ Local qualification passed 213 runtime tests with current dependencies and again
27
+ with Python 3.11, Pydantic 2.2.0 and tiktoken 0.7.0. Linux containers with networking
28
+ disabled passed 213 runtime tests and 205 staged compiler tests. The compiler
29
+ check used a candidate runtime dependency override; it establishes consumer
30
+ compatibility, not installation or publication of a compiler release. No new
31
+ live-model qualification or production deployment is claimed.
32
+
33
+ - Bundle the immutable o200k_base rank data and construct its encoding locally.
34
+ Token budgets and both historical/UTF-8 chunk boundaries previously depended on
35
+ tiktoken downloading a rank file on first use; a warm developer cache concealed
36
+ failures in isolated installations. No runtime download, ambient cache, or writable
37
+ tokenizer directory is now needed. The rank hash, regex, special tokens and all
38
+ existing token estimation policies remain unchanged.
39
+ - Record upstream code licenses, asset provenance and the lack of a separately
40
+ stated Azure asset license in THIRD_PARTY_NOTICES.md. Corrupt or missing packaged
41
+ tokenizer data fails closed; it never triggers a replacement download.
42
+ - Pin newly exported standalone manifests to runtime `0.1.1.dev2`. The reader
43
+ explicitly accepts both `0.1.1.dev1` and `0.1.1.dev2`: dev2 changes tokenizer
44
+ delivery, preserving dev1 token and plan semantics. Original dev1 manifests
45
+ remain immutable and executable without rewriting hashes. dev0 and unreviewed
46
+ future versions remain rejected; compatibility is not inferred from a range.
47
+ - Add frozen pre-change token/chunk vectors and cold-cache, network-denied
48
+ subprocess checks. Release wheel/sdist probes now forbid socket/DNS calls and
49
+ supply empty cache directories. Optional model weights remain separately prepared.
50
+
51
+ ## 0.1.1.dev1 — published 2026-11-30
52
+
53
+ Published through [Runtime Publish](https://github.com/Deep-Insight-Labs/seldon-runtime/actions/runs/46391393622)
54
+ after Linux compatibility checks, wheel/sdist verification and an installed-TestPyPI
55
+ probe. PyPI artifact hashes match the CI build. This release does not deploy hosted
56
+ Seldon or complete the compiler exporter.
57
+
58
+ ### Standalone compiler artifact reader
59
+
60
+ - Add a separate `compiler-artifact-v1` reader for a bounded, inline JSON manifest
61
+ and caller-owned asynchronous model bindings. Validate hashes, explicit semantic
62
+ versions, plan/spec compatibility, model capabilities and context/output bounds
63
+ before dispatch; no endpoint or credential is loaded from an artifact.
64
+ - Preserve the hosted `Runner`, bundle eligibility, authorization, expiry and
65
+ refresh behavior. Standalone artifacts have no control-plane or telemetry calls.
66
+ - Reject research code, native protocols not yet supported by this handoff, external
67
+ file references, symlinks, oversized manifests and secret-bearing configuration
68
+ fields. Hashes establish integrity relative to a manifest, not publisher trust;
69
+ prompts and specs remain potentially sensitive customer data.
70
+ - This is a reader implementation awaiting integration with the compiler exporter.
71
+ No live model has been qualified and no new serving capability has been enabled
72
+ in hosted Seldon.
73
+
74
+ ### Correctness contracts — implemented 2026-11-27
75
+
76
+ - Add `optimizer-correctness-v8` execution readers without changing historical
77
+ plan or spec digests.
78
+ - Add the explicit `chunk_text.token_boundary: "utf8-v2"` contract. Individual
79
+ tokenizer tokens can contain incomplete UTF-8 characters; decoding those tokens
80
+ independently previously counted the remaining document as one token. New
81
+ marked chunks keep complete source characters, full coverage and the actual
82
+ requested token budget. Unmarked chunks retain historical boundaries.
83
+ - Add `context_measured_v3`: native Fastino GLiNER extraction reserves its
84
+ inherited output allowance for accounting and response bounds without subtracting
85
+ it from the encoder input window. The actual provider input is still checked;
86
+ other protocols retain their existing context rules. Older policy values do
87
+ not change. The provider's encoder input contract is documented at
88
+ <https://docs.fastino.ai/inference/chat-completions>.
89
+ - Hosted rollout requires compatible readers before new marked runs are created.
@@ -0,0 +1,5 @@
1
+ include LICENSE NOTICE THIRD_PARTY_NOTICES.md README.md CHANGELOG.md runtime_modules.txt
2
+ recursive-include seldon_runtime/data *.tiktoken *.json
3
+ recursive-include tests *.py *.json
4
+ recursive-include schemas *.json
5
+ include scripts/export_artifact_schema.py
@@ -7,3 +7,7 @@ infrastructure and dashboard are not part of this distribution.
7
7
 
8
8
  Optional GLiNER2 code and downloaded model weights remain under their respective
9
9
  upstream licenses. Their licenses are not replaced by this project license.
10
+
11
+ The bundled o200k_base tokenizer constructor and vocabulary have separate upstream
12
+ provenance and MIT notices in THIRD_PARTY_NOTICES.md. That file records the absence
13
+ of a separately stated license for the Azure rank asset without claiming one.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seldon-runtime
3
- Version: 0.1.1.dev1
3
+ Version: 0.1.1.dev3
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
@@ -9,6 +9,7 @@ Requires-Python: >=3.11
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
11
  License-File: NOTICE
12
+ License-File: THIRD_PARTY_NOTICES.md
12
13
  Requires-Dist: pydantic>=2.2
13
14
  Requires-Dist: jsonschema>=4.21
14
15
  Requires-Dist: tiktoken>=0.7
@@ -30,13 +31,22 @@ for eligible Seldon Functions. The package name is **`seldon-runtime`**, and the
30
31
  Python import is `seldon_runtime`. This project is separate from SeldonIO.
31
32
 
32
33
  A single generic runtime executes authorized Function bundles on your hardware.
33
- 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
34
36
  optimizer, billing service, dashboard or server infrastructure. Its first local
35
37
  model adapter uses pinned GLiNER2 open weights for extraction and classification.
36
38
 
37
- The first preview, [\`0.1.1.dev0\`](https://pypi.org/project/seldon-runtime/0.1.1.dev0/),
38
- is available on PyPI. Local execution requires a Seldon deployment with bundle
39
- delivery enabled for your workspace.
39
+ The current preview, [`0.1.1.dev2`](https://pypi.org/project/seldon-runtime/0.1.1.dev2/),
40
+ is available on PyPI. Hosted bundle execution requires a Seldon deployment with
41
+ bundle delivery enabled for your workspace. The separate standalone artifact reader
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.dev3 (unreleased)**, adding standalone native
48
+ artifact bindings. Install this checkout with `python -m pip install .` to use
49
+ that capability; the published dev2 package does not accept native artifacts.
40
50
 
41
51
  ## Install
42
52
 
@@ -48,14 +58,14 @@ On Linux, install CPU PyTorch explicitly to avoid downloading CUDA dependencies:
48
58
 
49
59
  ```sh
50
60
  python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
51
- python -m pip install 'seldon-runtime[gliner]==0.1.1.dev0'
61
+ python -m pip install 'seldon-runtime[gliner]==0.1.1.dev2'
52
62
  ```
53
63
 
54
64
  On macOS:
55
65
 
56
66
  ```sh
57
67
  python -m pip install torch
58
- python -m pip install 'seldon-runtime[gliner]==0.1.1.dev0'
68
+ python -m pip install 'seldon-runtime[gliner]==0.1.1.dev2'
59
69
  ```
60
70
 
61
71
  In a uv environment, use `uv pip install` for the same commands. In a Linux uv
@@ -63,12 +73,21 @@ project, persist the dedicated torch index:
63
73
 
64
74
  ```sh
65
75
  uv add torch --index pytorch=https://download.pytorch.org/whl/cpu
66
- uv add 'seldon-runtime[gliner]==0.1.1.dev0'
76
+ uv add 'seldon-runtime[gliner]==0.1.1.dev2'
67
77
  ```
68
78
 
69
- The model weights and tokenizer files download on first use. Cache the pinned
70
- snapshot in advance for restricted networks. Token-chunked plans also need the
71
- 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.
82
+
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
85
+ the encoding directly; it never downloads or repairs missing/corrupt tokenizer
86
+ data. No network or writable cache is required for these operations. Optional
87
+ GLiNER weights and their own tokenizer files still require advance preparation.
88
+ See [third-party notices](THIRD_PARTY_NOTICES.md) and
89
+ [asset provenance](seldon_runtime/data/provenance.json) for sources and license basis.
90
+ Older dev1 installations still require a prepared tiktoken BPE cache.
72
91
 
73
92
  ## Run a Function locally
74
93
 
@@ -138,12 +157,12 @@ Always close the runner to stop background tasks and attempt a bounded flush.
138
157
 
139
158
  ## Development
140
159
 
141
- ### Standalone compiler artifacts (unreleased)
160
+ ### Standalone compiler artifacts (preview)
142
161
 
143
162
  The separate compiler-artifact reader executes locally compiled user-owned plans.
144
163
  It does not use `Runner.load`, hosted Function IDs, a Seldon API key, refresh or
145
- telemetry. This reader is under development; a public compiler/exporter is not yet
146
- 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.
147
166
 
148
167
  An export directory contains one `manifest.json`, at most 2 MiB. Plan and spec are
149
168
  inline; no file paths, URLs, credentials or executable Python are supported. The
@@ -155,8 +174,14 @@ a development environment with `python -m pip install '.[schema]'` followed by
155
174
  `python -m scripts.export_artifact_schema`. CI checks the committed schema using
156
175
  that generator's `--check` mode, independently of the runtime compatibility matrix.
157
176
 
158
- The manifest freezes the compiler version, exact runtime version (`0.1.1.dev1`),
159
- optimizer contract (v1–v8), evaluation semantics, instruction envelope, conditional
177
+ The manifest freezes the compiler version and an explicit runtime version. New
178
+ exports target the source runtime version (`0.1.1.dev3`). Its reader accepts
179
+ the reviewed set `0.1.1.dev1`, `0.1.1.dev2` and `0.1.1.dev3`; original manifests retain
180
+ their pin and hashes. Native artifacts must declare dev3; older runtime contracts
181
+ remain chat/deterministic-only. dev0 and future versions are rejected until explicitly
182
+ reviewed; there is no version-prefix or range-based compatibility inference.
183
+ The manifest also freezes the optimizer contract (v1–v8), evaluation semantics,
184
+ instruction envelope, conditional
160
185
  permission, plan/spec hashes, model requirements and a small evidence summary.
161
186
  `manifest_digest` is the canonical runtime `digest` of all raw manifest fields
162
187
  except `manifest_digest`. Plan/spec digests use their validated model `.digest`.
@@ -190,23 +215,37 @@ policy before invoking a provider; your transport still owns TLS, credential ori
190
215
  binding, response-size limits and protocol decoding. Known transport failures use
191
216
  `ProviderError`; untyped failures stop without automatic fallback or retry.
192
217
 
193
- This initial handoff supports OpenAI-compatible chat steps and supported deterministic
194
- operators, including versioned chunking/conditional graphs. Native `choice`/`extract`
195
- adapters and research `generated_kernel` steps are explicitly rejected. A model
218
+ The source dev3 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
196
235
  revision is an operator-supplied identity, not proof of immutable upstream weights.
197
236
  Artifacts may contain sensitive prompts/spec text. Digest checks detect corruption,
198
237
  not malicious replacement of both the content and its digest; trust the producer
199
238
  separately. Linux/macOS filesystem APIs are used; Windows is not qualified.
200
239
 
201
240
  The standalone fixture in `tests/fixtures/compiler-artifact` is generated from the
202
- runtime test factory, pending a real compiler producer. Installed wheel/sdist probes
241
+ runtime test factory. Installed wheel/sdist probes
203
242
  exercise its nonconstant execution through the real interpreter with a deterministic
204
243
  provider callback. They do not qualify a live model, compiler selection quality or
205
244
  the complete compiler-to-runtime lifecycle.
206
245
 
207
246
  ### Interpreter development
208
247
 
209
- The unreleased `0.1.1.dev1` readers support `optimizer-correctness-v8`.
248
+ The published `0.1.1.dev1` readers support `optimizer-correctness-v8`.
210
249
  New `chunk_text` steps may freeze `token_boundary: "utf8-v2"` with `unit: "tokens"`;
211
250
  this counts tokenizer tokens without splitting UTF-8 characters. Steps without
212
251
  the marker keep their historical chunk boundaries. The kernel still enforces its
@@ -245,8 +284,8 @@ Linux ARM64 CPU; other hardware and Windows are not claimed as qualified.
245
284
  ## Releases
246
285
 
247
286
  The publishing workflow is `.github/workflows/runtime-publish.yml` in
248
- `Deep-Insight-Labs/seldon-runtime`. Register project `seldon-runtime` as a trusted
249
- 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
250
289
  `pypi`. A `runtime-v<version>` tag must match `pyproject.toml` and `__version__`.
251
290
 
252
291
  Publication is disabled unless `SELDON_RUNTIME_TESTPYPI_PUBLISH_ENABLED` and
@@ -5,13 +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 first preview, [\`0.1.1.dev0\`](https://pypi.org/project/seldon-runtime/0.1.1.dev0/),
13
- is available on PyPI. Local execution requires a Seldon deployment with bundle
14
- delivery enabled for your workspace.
13
+ The current preview, [`0.1.1.dev2`](https://pypi.org/project/seldon-runtime/0.1.1.dev2/),
14
+ is available on PyPI. Hosted bundle execution requires a Seldon deployment with
15
+ bundle delivery enabled for your workspace. The separate standalone artifact reader
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.dev3 (unreleased)**, adding standalone native
22
+ artifact bindings. Install this checkout with `python -m pip install .` to use
23
+ that capability; the published dev2 package does not accept native artifacts.
15
24
 
16
25
  ## Install
17
26
 
@@ -23,14 +32,14 @@ On Linux, install CPU PyTorch explicitly to avoid downloading CUDA dependencies:
23
32
 
24
33
  ```sh
25
34
  python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
26
- python -m pip install 'seldon-runtime[gliner]==0.1.1.dev0'
35
+ python -m pip install 'seldon-runtime[gliner]==0.1.1.dev2'
27
36
  ```
28
37
 
29
38
  On macOS:
30
39
 
31
40
  ```sh
32
41
  python -m pip install torch
33
- python -m pip install 'seldon-runtime[gliner]==0.1.1.dev0'
42
+ python -m pip install 'seldon-runtime[gliner]==0.1.1.dev2'
34
43
  ```
35
44
 
36
45
  In a uv environment, use `uv pip install` for the same commands. In a Linux uv
@@ -38,12 +47,21 @@ project, persist the dedicated torch index:
38
47
 
39
48
  ```sh
40
49
  uv add torch --index pytorch=https://download.pytorch.org/whl/cpu
41
- uv add 'seldon-runtime[gliner]==0.1.1.dev0'
50
+ uv add 'seldon-runtime[gliner]==0.1.1.dev2'
42
51
  ```
43
52
 
44
- The model weights and tokenizer files download on first use. Cache the pinned
45
- snapshot in advance for restricted networks. Token-chunked plans also need the
46
- 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.
56
+
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
59
+ the encoding directly; it never downloads or repairs missing/corrupt tokenizer
60
+ data. No network or writable cache is required for these operations. Optional
61
+ GLiNER weights and their own tokenizer files still require advance preparation.
62
+ See [third-party notices](THIRD_PARTY_NOTICES.md) and
63
+ [asset provenance](seldon_runtime/data/provenance.json) for sources and license basis.
64
+ Older dev1 installations still require a prepared tiktoken BPE cache.
47
65
 
48
66
  ## Run a Function locally
49
67
 
@@ -113,12 +131,12 @@ Always close the runner to stop background tasks and attempt a bounded flush.
113
131
 
114
132
  ## Development
115
133
 
116
- ### Standalone compiler artifacts (unreleased)
134
+ ### Standalone compiler artifacts (preview)
117
135
 
118
136
  The separate compiler-artifact reader executes locally compiled user-owned plans.
119
137
  It does not use `Runner.load`, hosted Function IDs, a Seldon API key, refresh or
120
- telemetry. This reader is under development; a public compiler/exporter is not yet
121
- 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.
122
140
 
123
141
  An export directory contains one `manifest.json`, at most 2 MiB. Plan and spec are
124
142
  inline; no file paths, URLs, credentials or executable Python are supported. The
@@ -130,8 +148,14 @@ a development environment with `python -m pip install '.[schema]'` followed by
130
148
  `python -m scripts.export_artifact_schema`. CI checks the committed schema using
131
149
  that generator's `--check` mode, independently of the runtime compatibility matrix.
132
150
 
133
- The manifest freezes the compiler version, exact runtime version (`0.1.1.dev1`),
134
- optimizer contract (v1–v8), evaluation semantics, instruction envelope, conditional
151
+ The manifest freezes the compiler version and an explicit runtime version. New
152
+ exports target the source runtime version (`0.1.1.dev3`). Its reader accepts
153
+ the reviewed set `0.1.1.dev1`, `0.1.1.dev2` and `0.1.1.dev3`; original manifests retain
154
+ their pin and hashes. Native artifacts must declare dev3; older runtime contracts
155
+ remain chat/deterministic-only. dev0 and future versions are rejected until explicitly
156
+ reviewed; there is no version-prefix or range-based compatibility inference.
157
+ The manifest also freezes the optimizer contract (v1–v8), evaluation semantics,
158
+ instruction envelope, conditional
135
159
  permission, plan/spec hashes, model requirements and a small evidence summary.
136
160
  `manifest_digest` is the canonical runtime `digest` of all raw manifest fields
137
161
  except `manifest_digest`. Plan/spec digests use their validated model `.digest`.
@@ -165,23 +189,37 @@ policy before invoking a provider; your transport still owns TLS, credential ori
165
189
  binding, response-size limits and protocol decoding. Known transport failures use
166
190
  `ProviderError`; untyped failures stop without automatic fallback or retry.
167
191
 
168
- This initial handoff supports OpenAI-compatible chat steps and supported deterministic
169
- operators, including versioned chunking/conditional graphs. Native `choice`/`extract`
170
- adapters and research `generated_kernel` steps are explicitly rejected. A model
192
+ The source dev3 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
171
209
  revision is an operator-supplied identity, not proof of immutable upstream weights.
172
210
  Artifacts may contain sensitive prompts/spec text. Digest checks detect corruption,
173
211
  not malicious replacement of both the content and its digest; trust the producer
174
212
  separately. Linux/macOS filesystem APIs are used; Windows is not qualified.
175
213
 
176
214
  The standalone fixture in `tests/fixtures/compiler-artifact` is generated from the
177
- runtime test factory, pending a real compiler producer. Installed wheel/sdist probes
215
+ runtime test factory. Installed wheel/sdist probes
178
216
  exercise its nonconstant execution through the real interpreter with a deterministic
179
217
  provider callback. They do not qualify a live model, compiler selection quality or
180
218
  the complete compiler-to-runtime lifecycle.
181
219
 
182
220
  ### Interpreter development
183
221
 
184
- The unreleased `0.1.1.dev1` readers support `optimizer-correctness-v8`.
222
+ The published `0.1.1.dev1` readers support `optimizer-correctness-v8`.
185
223
  New `chunk_text` steps may freeze `token_boundary: "utf8-v2"` with `unit: "tokens"`;
186
224
  this counts tokenizer tokens without splitting UTF-8 characters. Steps without
187
225
  the marker keep their historical chunk boundaries. The kernel still enforces its
@@ -220,8 +258,8 @@ Linux ARM64 CPU; other hardware and Windows are not claimed as qualified.
220
258
  ## Releases
221
259
 
222
260
  The publishing workflow is `.github/workflows/runtime-publish.yml` in
223
- `Deep-Insight-Labs/seldon-runtime`. Register project `seldon-runtime` as a trusted
224
- 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
225
263
  `pypi`. A `runtime-v<version>` tag must match `pyproject.toml` and `__version__`.
226
264
 
227
265
  Publication is disabled unless `SELDON_RUNTIME_TESTPYPI_PUBLISH_ENABLED` and
@@ -0,0 +1,66 @@
1
+ # Third-party notices
2
+
3
+ Seldon Runtime's original code remains Apache-2.0. These upstream MIT notices
4
+ cover copied constructor/regex code and document vocabulary provenance; they
5
+ do not replace this distribution's license.
6
+
7
+ `data/o200k_base.tiktoken` is copied unchanged from OpenAI's public encoding URL.
8
+ Its SHA-256 and upstream constructor revision are in `data/provenance.json`.
9
+ The same bytes were independently verified in the MIT-licensed tiktoken-rs
10
+ repository at the recorded commit. No separate license statement for the Azure
11
+ rank file was located. The upstream project's MIT license and that existing
12
+ redistribution are the recorded basis, not an assertion of a separate asset
13
+ license or a legal determination.
14
+
15
+ ## OpenAI tiktoken (regex/constructor and vocabulary provenance)
16
+
17
+ Source: https://raw.githubusercontent.com/openai/tiktoken/bfe00ad1bf59fac47513b45fe5173672dcbbcbb4/LICENSE
18
+
19
+ MIT License
20
+
21
+ Copyright (c) 2022 OpenAI, Shantanu Jain
22
+
23
+ Permission is hereby granted, free of charge, to any person obtaining a copy
24
+ of this software and associated documentation files (the "Software"), to deal
25
+ in the Software without restriction, including without limitation the rights
26
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
27
+ copies of the Software, and to permit persons to whom the Software is
28
+ furnished to do so, subject to the following conditions:
29
+
30
+ The above copyright notice and this permission notice shall be included in all
31
+ copies or substantial portions of the Software.
32
+
33
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
34
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
35
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
36
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
37
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
38
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
+ SOFTWARE.
40
+
41
+
42
+ ## tiktoken-rs (byte-identical vocabulary redistribution provenance)
43
+
44
+ Source: https://raw.githubusercontent.com/zurawiki/tiktoken-rs/72a5a800651a1cea1ad609292446ba02c80e3bcd/LICENSE
45
+
46
+ MIT License
47
+
48
+ Copyright (c) 2023 Roger Zurawicki
49
+
50
+ Permission is hereby granted, free of charge, to any person obtaining a copy
51
+ of this software and associated documentation files (the "Software"), to deal
52
+ in the Software without restriction, including without limitation the rights
53
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
54
+ copies of the Software, and to permit persons to whom the Software is
55
+ furnished to do so, subject to the following conditions:
56
+
57
+ The above copyright notice and this permission notice shall be included in all
58
+ copies or substantial portions of the Software.
59
+
60
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
61
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
62
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
64
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
65
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
66
+ SOFTWARE.
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "seldon-runtime"
7
- version = "0.1.1.dev1"
7
+ version = "0.1.1.dev3"
8
8
  description = "Standalone Seldon Functions interpreter and local execution client"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
11
- license-files = ["LICENSE", "NOTICE"]
11
+ license-files = ["LICENSE", "NOTICE", "THIRD_PARTY_NOTICES.md"]
12
12
  requires-python = ">=3.11"
13
13
  dependencies = ["pydantic>=2.2", "jsonschema>=4.21", "tiktoken>=0.7"]
14
14
 
@@ -24,6 +24,9 @@ schema = ["pydantic==2.14.4"]
24
24
  [tool.setuptools]
25
25
  packages = ["seldon_runtime"]
26
26
 
27
+ [tool.setuptools.package-data]
28
+ seldon_runtime = ["data/*.tiktoken", "data/*.json"]
29
+
27
30
  [tool.pytest.ini_options]
28
31
  testpaths = ["tests"]
29
32
  markers = [
@@ -20,3 +20,6 @@ instruction_envelope
20
20
  local_models
21
21
  local_telemetry
22
22
  artifact
23
+ tokenizer
24
+ native_adapter
25
+ system_one
@@ -771,7 +771,11 @@
771
771
  "description": "Execution capabilities, not endpoint discovery or proof of model quality.",
772
772
  "properties": {
773
773
  "protocol": {
774
- "const": "openai-chat-completions",
774
+ "enum": [
775
+ "openai-chat-completions",
776
+ "fastino_gliner",
777
+ "system_one"
778
+ ],
775
779
  "title": "Protocol",
776
780
  "type": "string"
777
781
  },
@@ -780,7 +784,9 @@
780
784
  "enum": [
781
785
  "chat",
782
786
  "structured_output",
783
- "tools"
787
+ "tools",
788
+ "choice",
789
+ "extract"
784
790
  ],
785
791
  "type": "string"
786
792
  },
@@ -812,6 +818,60 @@
812
818
  }
813
819
  ],
814
820
  "title": "Revision"
821
+ },
822
+ "upstream_model": {
823
+ "anyOf": [
824
+ {
825
+ "maxLength": 256,
826
+ "minLength": 1,
827
+ "type": "string"
828
+ },
829
+ {
830
+ "type": "null"
831
+ }
832
+ ],
833
+ "default": null,
834
+ "title": "Upstream Model"
835
+ },
836
+ "native_modes": {
837
+ "default": [],
838
+ "items": {
839
+ "enum": [
840
+ "legacy",
841
+ "pairs",
842
+ "spans",
843
+ "records"
844
+ ],
845
+ "type": "string"
846
+ },
847
+ "title": "Native Modes",
848
+ "type": "array"
849
+ },
850
+ "native_answers": {
851
+ "default": [],
852
+ "items": {
853
+ "enum": [
854
+ "choice",
855
+ "boolean",
856
+ "noul",
857
+ "score"
858
+ ],
859
+ "type": "string"
860
+ },
861
+ "title": "Native Answers",
862
+ "type": "array"
863
+ },
864
+ "native_max_levels": {
865
+ "default": 10,
866
+ "maximum": 10,
867
+ "minimum": 2,
868
+ "title": "Native Max Levels",
869
+ "type": "integer"
870
+ },
871
+ "native_profile": {
872
+ "additionalProperties": true,
873
+ "title": "Native Profile",
874
+ "type": "object"
815
875
  }
816
876
  },
817
877
  "required": [
@@ -1576,7 +1636,11 @@
1576
1636
  "type": "string"
1577
1637
  },
1578
1638
  "runtime_version": {
1579
- "const": "0.1.1.dev1",
1639
+ "enum": [
1640
+ "0.1.1.dev1",
1641
+ "0.1.1.dev2",
1642
+ "0.1.1.dev3"
1643
+ ],
1580
1644
  "title": "Runtime Version",
1581
1645
  "type": "string"
1582
1646
  },
@@ -1,3 +1,3 @@
1
1
  """Standalone Seldon Functions interpreter and local execution client."""
2
2
 
3
- __version__ = "0.1.1.dev1"
3
+ __version__ = "0.1.1.dev3"