Share via


AutoMLExperiment.RunAsync(CancellationToken) Method

Definition

Run experiment and return the best trial result asynchronizely. The experiment returns the current best trial result if there's any trial completed when ct get cancelled, and throws TimeoutException with message "Training time finished without completing a trial run" when no trial has completed. Another thing needs to notice is that this function won't immediately return after ct get cancelled. Instead, it will call Microsoft.ML.MLContext.CancelExecution to cancel all training process and wait all running trials get cancelled or completed.

public System.Threading.Tasks.Task<Microsoft.ML.AutoML.TrialResult> RunAsync (System.Threading.CancellationToken ct = default);
member this.RunAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.ML.AutoML.TrialResult>
Public Function RunAsync (Optional ct As CancellationToken = Nothing) As Task(Of TrialResult)

Parameters

Returns

Applies to