Repository navigation
Serve remote sampling with an embedded Rust Flight gateway - #146
haoweiyu-kumo wants to merge 4 commits into
Conversation
Change mapRequirement: implement #146 serving in Rust and embed the native server inside a Python/Ray actor through PyO3. Previously Python dispatched Flight requests and encoded sampled batches. The shared Rust gateway now owns task registration, complete epochs, Arrow encoding, credits and cancellation. Python owns a lifecycle handle and a Flight client. The unused per-request gateway API is replaced. Verify batch parity, bounded credits, task integrity, GIL-safe cleanup, same-process ownership, logs and source packaging. Stop at prepared graph replicas; graph publication and cluster provisioning remain separate changes.
Validation45 Rust tests (gateway and shared runtime), 491 focused Python tests (embedded server, transport, loaders, nested trainer, engine bindings), and 14 notice tests passed. Clippy with warnings denied, rustfmt, scoped mypy, Ruff, CI flake8/isort, generated artifact/notice checks, license checks, and documentation checks passed. The native extension was rebuilt; a source archive includes the embedded server and compiles. A full release wheel and cloud/Ray deployment were not run locally. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Stacked on #144 (
refactor/native-batch-runtime).Serve complete DiskGraph batches through the Rust Flight gateway, embedded in the Python/Ray actor process.
diskgraph.SamplingServerexposes endpoint discovery, native health, close, and context management through PyO3. Rust owns task uploads, sampling, Arrow encoding, credits and cancellation. Python starts/stops the handle and consumes batches through PyArrow Flight. Start and close release the GIL; the standalone CLI uses the same Rust implementation.Include trainer endpoint/thread settings, replica tail accounting, feature projections and ordered RHS scans. Native lifecycle/progress logs reach Python logging. The unused gateway graph/feature ticket API is replaced; graph publication and cluster provisioning remain separate PRs.
Maintained change map
Validation: 45 Rust tests, 491 focused Python tests and 14 notice tests passed. Clippy, rustfmt, scoped mypy, Ruff, CI flake8/isort, generated-notice/license checks and documentation checks passed. Rebuilt the extension and checked source archive completeness/compilation. A full release wheel and cloud/Ray deployment were not run locally.