Add protocol-aware trajectory capture and tokenization#756
Conversation
971cb1b to
39a165b
Compare
|
Cross-repository serverless integration is now complete in coreweave/serverless-training#287, which pins this PR exactly at Dependency ownership and validation:
The disposable SkyPilot cluster was torn down. Serverless PR #287 targets staging only; production remains untouched. |
|
Final downstream validation: coreweave/serverless-training staging now pins exact ART commit 41e292f via merged PR #287. Staging deploy run 29456887370 succeeded; live backend and Megatron pods both report this direct-url commit. Backend is running Transformers 5.2.0, while Megatron is running 5.12.1 with matched FlashInfer 0.6.8.post1; both use Torch 2.11.0+cu128 / CUDA 12.8. All staging deployments are ready and production was untouched. |
Summary
TypedDicts with known native SDK fields plus arbitrary extension fields, and responses as native OpenAI/Anthropic modelsTrajectory/TrajectoryGroupscopes and coroutine helpers while preserving legacy trajectory/group construction behind deprecationsDesign
art.trajectories.__init__is the public interface; transport, protocol, scope, compatibility, serialization, and tokenization details live in private modulesextra_items=Anypreserves provider and Caladan extensionsexchange.modelis a serialized computed property derived from the request first and response second, so stored metadata cannot diverge from the captured wire objectsNaNonly when fallback tokenization cannot recover a logproballow_training_without_logprobs=True; prompt-tokenNaNs remain expectedmodel,base_model, chat template, and template kwargs override inferred values; W&B checkpoint metadata and tokenizer defaults provide best-effort inferenceAdversarial hardening
Independent Codex and Claude Fable 5 reviews found no P0, then drove focused fixes:
choice.indexecho=Trueuntil their multi-history/masking semantics are implemented correctly/v1-less compatible endpoint pathsTrajectoryGroupgenerators exactly once while retaining the deprecated awaitable overloadCompatibility and scope
TrajectoryGroupconstruction, and the awaitable group overload remain supportedauto_trajectoryandcapture_auto_trajectoryremain as deprecated aliases>=0.77.0, the first verified version exposing the streaming accumulator imports used by captureValidation
ty 0.0.59caladan-trajectory-validation/trajectory-capture-0714Open integration decisions
stagingand preserves exchange payloads, but serverless must pin the merged ART revision before exchange preprocessing is operationalReview focus
A separate Caladan change will correct the Qwen vLLM tool-parser mismatch found by strict multi-turn validation. Serverless-training compatibility is tracked in coreweave/serverless-training#283.