public static async Task <Response> ReloadTrainingDataAsync(Operation baseOperation, RecServiceState state, CancellationToken cancellationToken) { Operation <ReloadTrainingDataRequest> operation = (Operation <ReloadTrainingDataRequest>)baseOperation; ReloadBehavior behavior = (ReloadBehavior)Enum.Parse(typeof(ReloadBehavior), operation.Payload.Mode); await state.ReloadTrainingDataAsync(behavior, operation.Payload.Finalize, cancellationToken); return(new Response()); }
public Task ReloadTrainingDataAsync(ReloadBehavior behavior, bool finalize, TimeSpan timeout, CancellationToken cancellationToken) { Operation <ReloadTrainingDataRequest> operation = new Operation <ReloadTrainingDataRequest>( opName: OperationTypes.ReloadTrainingData, payload: new ReloadTrainingDataRequest(behavior, finalize) ); return(DoOperationWithoutResponseBodyAsync(operation, timeout, cancellationToken, descriptionForErrors: "reloading training data")); }
public Task ReloadTrainingDataAsync(ReloadBehavior behavior, bool finalize, CancellationToken cancellationToken) { switch (behavior) { case ReloadBehavior.LowMemory: return(ReloadTrainingDataLowMemoryAsync(finalize, cancellationToken)); case ReloadBehavior.HighAvailability: return(ReloadTrainingDataHighAvailabilityAsync(finalize, cancellationToken)); default: throw new Exception(string.Format("Unexpected ReloadBehavior: {0}", behavior)); } }
public ReloadTrainingDataRequest(ReloadBehavior mode, bool finalize) { Mode = mode.ToString(); Finalize = finalize; }
public ReloadTrainingDataRequest(ReloadBehavior mode, bool finalize) { Mode = mode.ToString(); Finalize = finalize; }
private void Start() { animator = GetComponent <Animator>(); reloadBehavior = animator.GetBehaviour <ReloadBehavior>(); reloadBehavior.scopeController = this; }
public void ReloadTrainingData(ReloadBehavior behavior, bool finalize) { switch (behavior) { case ReloadBehavior.LowMemory: ReloadTrainingDataLowMemory(finalize); break; case ReloadBehavior.HighAvailability: ReloadTrainingDataHighAvailability(finalize); break; default: throw new Exception(string.Format("Unexpected ReloadBehavior: {0}", behavior)); } }