Skip to content

feat(inference): decouple model and data boundaries - #77

Merged
jiangxt2 merged 1 commit into
masterfrom
feat/inference-data-model-decoupling
Aug 23, 2026
Merged

feat(inference): decouple model and data boundaries#77
jiangxt2 merged 1 commit into
masterfrom
feat/inference-data-model-decoupling

Conversation

@jiangxt2

@jiangxt2 jiangxt2 commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Description

This PR decouples Ray inference and explainability execution from data ingestion, model artifact formats, and physical result persistence.

The change:

  • Introduces format-neutral prediction kernels and serializable explainability session factories.
  • Strips data requests, Bundle selections, and output-target requests from the prepared inference execution contract.
  • Moves Bundle resolution, flavor selection, and model loading into runtime adapters.
  • Binds result sinks before core execution and delegates explainability materialization, inspection, receipt storage, and cleanup to an injected persistence adapter.
  • Derives prediction, serving, and conditional attribution capabilities from exporter and runtime-flavor plugins.
  • Adds native XGBoost JSON/UBJ runtime validation, prediction parity, and conditional TreeSHAP capability checks.
  • Enforces row preservation for arbitrary model-kernel plugins.
  • Hardens inference, explainability, and model-export Docker acceptance with prebuilt images, exact source snapshots, strict preflight, scoped cleanup, and proxy-safe image operations.

Formal batch inference remains Ray Data only, online inference remains Ray Serve only, and Daft remains confined to data read/write and ETL paths. Existing InferenceRequest, BundleBatchPredictor, and legacy result-sink entry points remain compatibility facades over the new boundaries.

No new runtime dependency is introduced.

Related issues

None.

Additional information

Public Alpha contracts added or expanded include:

  • PreparedInferencePlan
  • PredictionKernel / PredictionKernelFactory
  • ModelKernelProvider
  • ExplainabilityModelSessionFactory
  • ExplainabilityResultStore
  • Conditional runtime operations and native attribution capabilities

Validation:

  • Inference Docker IT: 13 passed.
  • Explainability Docker IT: 5 passed.
  • Model Export Docker CI: 136 tests passed in the complete run; after fixing its sole walking-skeleton failure, the isolated walking skeleton passed.
  • Affected-domain regression: 448 passed.
  • Exporter/validator conformance: 120 passed, 11 dependency/platform skips.
  • Ruff, formatting, Shellcheck, mypy over 314 source files, generated API checks, strict Sphinx, spelling, API smoke, and the final repository precheck passed.
  • All owned Docker containers, networks, volumes, and run-scoped inference images were removed after validation.

Future model formats still require an exporter, validator, runtime flavor or session factory, capability declaration, and conformance coverage. This PR does not claim new Safetensors/PT2 serving support, a Daft inference executor, or new database result sinks.

Introduce format-neutral execution factories and move Bundle loading, data access, and result persistence behind injected adapters.

Signed-off-by: jiangxt2 <jiangxt2@vip.qq.com>
@jiangxt2
jiangxt2 force-pushed the feat/inference-data-model-decoupling branch from 109e735 to d3dd443 Compare August 23, 2026 14:17
@jiangxt2
jiangxt2 merged commit 50fcba6 into master Aug 23, 2026
14 checks passed
@jiangxt2
jiangxt2 deleted the feat/inference-data-model-decoupling branch August 23, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant