TrainingDiagnosticSink

Delegates · AiDotNet.Configuration

Delegate that receives training-pipeline diagnostic events in lieu of the default WriteLine path. Applications register a sink to route training diagnostics through their logging framework of choice (Spectre.Console, Serilog, Microsoft.Extensions.Logging, structured logs, OpenTelemetry, etc.).

Inheritance: Delegate → MulticastDelegate → TrainingDiagnosticSink

How It Works

Sink exceptions are caught by Emit and reported via TraceError so a throwing sink cannot break training. There is no opt-in to rethrow / fail-fast semantics today — if a caller needs that, file a feature request. Sinks should still avoid throwing in hot-path instrumentation: the Trace.TraceError fallback is synchronous and runs in the training step’s critical path.

Constructors

Constructor Summary
TrainingDiagnosticSink(object object, IntPtr method)

Methods

Method Summary
IAsyncResult BeginInvoke(TrainingDiagnosticEvent evt, AsyncCallback callback, object object)
void EndInvoke(IAsyncResult result)
void Invoke(TrainingDiagnosticEvent evt)