Member Junction
    Preparing search index...

    ITrainerEvaluator backed by the self-managing MLSidecar client. Lazily starts the sidecar on first use (managed or remote mode is decided by MLSidecar from options/env). Defaults to the process-shared MLSidecarProvider instance rather than constructing a private MLSidecar — see that class's doc comment for why a per-instance sidecar leaked a Python child process per action run. Tests (and callers that genuinely need an isolated sidecar) can still inject their own via the constructor parameter.

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Run one protocol-driven training with bounded retries: a transport failure or a 5xx answer is retried up to req.maxRetries times. Each retry sends the request reissue builds, with fresh snapshot downloads, since the first attempt's may have expired by then (a failed re-issue counts as that attempt failing). Each attempt first calls Start(), which does nothing while the sidecar runs and respawns a managed child that died, so a crash mid-training is recovered by the next attempt (a failed respawn counts as that attempt failing). A 4xx refusal and a malformed answer are not retried (the same request gets the same answer) and are rethrown. A failed answer to a retry keeps the error that forced the retry in its message. When every attempt fails the result is failed at stage timeout naming the last error, never partial metrics, with the wall seconds the attempts took as its computeSeconds (the sidecar may have computed for all of them, so the run records that time rather than none).

      A retried transport failure can repeat a training that is still running: a socket reset on a remote sidecar that kept computing makes attempt 2 train and score the holdout again, concurrently. The sidecar is stateless and the run is seeded, so the repeat produces the same result; only compute repeats, up to (maxRetries + 1) × (timeoutSeconds + 60) seconds of wall time.

      Parameters

      Returns Promise<TrainerResult>