EvSys

training

evsys_sdk.training - native training-loop package.

Three concerns, three modules:

  • :mod:~evsys_sdk.training.backend - Backend Protocol, SamplingClient Protocol, in-memory MockBackend for tests. The only seam that talks to tinker (or a stand-in).
  • :mod:~evsys_sdk.training.loop - TrainingLoop driver, StepBuilder Protocol, TrainingBatch dataclass, Evaluator Protocol, LoopArtifacts.
  • :mod:~evsys_sdk.training.checkpoints - CheckpointManager (writes the manifest :class:evsys_sdk.checkpoint.Checkpoint reads).

Concrete algorithm wrappers (sft, sdft, rl) live under :mod:evsys_sdk.algorithms and compose these three pieces; researchers who want a custom algorithm can subclass StepBuilder and re-register.

See docs/DESIGN.md for the architecture overview, and the "Writing a new algorithm" section in skills/using-the-sdk/SKILL.md for a template.

attribute__all__
= ['Backend', 'BenchmarkEvaluator', 'Callback', 'CheckpointManager', 'CsvMetricsCallback', 'EarlyStoppingCallback', 'LogContext', 'LoopState', 'PrintProgressCallback', 'Evaluator', 'ForwardBackwardResult', 'LoopArtifacts', 'LossCallable', 'ManifestRow', 'Message', 'MockBackend', 'MockSamplingClient', 'OptimStepResult', 'DatumMetadata', 'SDFTDataset', 'SamplingClient', 'SimpleSDFTDataset', 'StepBuilder', 'Trajectory', 'TrajectoryGroup', 'assemble_training_data', 'build_callbacks', 'dispatch', 'coerce_floats', 'extract_completion_tokens_from_response', 'extract_weights', 'build_in_loop_evaluators', 'compute_advantages', 'compute_trajectory_metrics', 'TinkerBackend', 'TinkerSamplingClient', 'TrainingBatch', 'TrainingLoop', 'apply_template', 'messages_to_model_input', 'row_to_datum', 'sft_tokenize', 'text_to_model_input']