tinker_backend
TinkerBackend - concrete :class:~evsys_sdk.training.backend.Backend
implementation against tinker.ServiceClient.
Constructed via await TinkerBackend.create(model_name=..., lora_rank=...)
-
the underlying
create_lora_training_client_asyncis async, so the factory is async. Algorithm composers run the loop inside oneasyncio.run(...)call so the constructor and the loop body share the same event loop:async def _train(self, ctx): backend = await TinkerBackend.create(...) loop = TrainingLoop(backend=backend, ...) return await loop.run(num_steps=cfg.max_steps)
def train(self, ctx): return asyncio.run(self._train(ctx))
The wrapper is thin - every method is a one-to-one passthrough to the
underlying tinker client, plus the one ergonomic affordance of returning
a wrapped :class:TinkerSamplingClient from
snapshot_sampling_client (so callers don't have to know about the
sampler URI machinery).
attributelogger= logging.getLogger(__name__)attribute__all__= ['TinkerBackend', 'TinkerSamplingClient']func_result_path(result) -> strTinker's save_*_async result envelopes carry a .path attribute
(verified against cookbook usage in distillation/sdft.py:739, where the
same dotted access ships).
paramresultAnyReturns
str