Partager via


IIsolatedWorker.OnTrainingExamples Method

Definition

Generate a list of training examples used for federated compute job.

[Android.Runtime.Register("onTrainingExamples", "(Landroid/adservices/ondevicepersonalization/TrainingExamplesInput;Landroid/os/OutcomeReceiver;)V", "GetOnTrainingExamples_Landroid_adservices_ondevicepersonalization_TrainingExamplesInput_Landroid_os_OutcomeReceiver_Handler:Android.AdServices.OnDevicePersonalization.IIsolatedWorker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)]
public virtual void OnTrainingExamples (Android.AdServices.OnDevicePersonalization.TrainingExamplesInput input, Android.OS.IOutcomeReceiver receiver);
[<Android.Runtime.Register("onTrainingExamples", "(Landroid/adservices/ondevicepersonalization/TrainingExamplesInput;Landroid/os/OutcomeReceiver;)V", "GetOnTrainingExamples_Landroid_adservices_ondevicepersonalization_TrainingExamplesInput_Landroid_os_OutcomeReceiver_Handler:Android.AdServices.OnDevicePersonalization.IIsolatedWorker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=35)>]
abstract member OnTrainingExamples : Android.AdServices.OnDevicePersonalization.TrainingExamplesInput * Android.OS.IOutcomeReceiver -> unit
override this.OnTrainingExamples : Android.AdServices.OnDevicePersonalization.TrainingExamplesInput * Android.OS.IOutcomeReceiver -> unit

Parameters

input
TrainingExamplesInput

The parameters needed to generate the training example.

receiver
IOutcomeReceiver

Callback that receives the result TrainingExamplesOutput or an IsolatedServiceException. <p>If this method returns a null result or exception via the callback, or throws a RuntimeException, no training examples is produced for this training session.

Attributes

Remarks

Generate a list of training examples used for federated compute job. The platform will call this function when a federated compute job starts. The federated compute job is scheduled by an app through FederatedComputeScheduler#schedule.

Java documentation for android.adservices.ondevicepersonalization.IsolatedWorker.onTrainingExamples(android.adservices.ondevicepersonalization.TrainingExamplesInput, android.os.OutcomeReceiver<android.adservices.ondevicepersonalization.TrainingExamplesOutput, android.adservices.ondevicepersonalization.IsolatedServiceException>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to