Dela via


LargePersonGroupClient.GetTrainingStatusAsync Method

Definition

Overloads

GetTrainingStatusAsync(RequestContext)

[Protocol Method] To check Large Person Group training status completed or still ongoing. Large Person Group training is an asynchronous operation triggered by "Train Large Person Group" API.

GetTrainingStatusAsync(CancellationToken)

To check Large Person Group training status completed or still ongoing. Large Person Group training is an asynchronous operation triggered by "Train Large Person Group" API.

GetTrainingStatusAsync(RequestContext)

Source:
LargePersonGroupClient.cs

[Protocol Method] To check Large Person Group training status completed or still ongoing. Large Person Group training is an asynchronous operation triggered by "Train Large Person Group" API.

public virtual System.Threading.Tasks.Task<Azure.Response> GetTrainingStatusAsync (Azure.RequestContext context);
abstract member GetTrainingStatusAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetTrainingStatusAsync : Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetTrainingStatusAsync (context As RequestContext) As Task(Of Response)

Parameters

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetTrainingStatusAsync and parse the result.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id");

Response response = await client.GetTrainingStatusAsync(null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("status").ToString());
Console.WriteLine(result.GetProperty("createdDateTime").ToString());
Console.WriteLine(result.GetProperty("lastActionDateTime").ToString());
Console.WriteLine(result.GetProperty("lastSuccessfulTrainingDateTime").ToString());

Applies to

GetTrainingStatusAsync(CancellationToken)

Source:
LargePersonGroupClient.cs

To check Large Person Group training status completed or still ongoing. Large Person Group training is an asynchronous operation triggered by "Train Large Person Group" API.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceTrainingResult>> GetTrainingStatusAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member GetTrainingStatusAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceTrainingResult>>
override this.GetTrainingStatusAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.AI.Vision.Face.FaceTrainingResult>>
Public Overridable Function GetTrainingStatusAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of FaceTrainingResult))

Parameters

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Examples

This sample shows how to call GetTrainingStatusAsync.

Uri endpoint = new Uri("<endpoint>");
AzureKeyCredential credential = new AzureKeyCredential("<key>");
LargePersonGroupClient client = new FaceAdministrationClient(endpoint, credential).GetLargePersonGroupClient("your_large_person_group_id");

Response<FaceTrainingResult> response = await client.GetTrainingStatusAsync();

Remarks

Please refer to https://learn.microsoft.com/rest/api/face/person-group-operations/get-large-person-group-training-status for more details.

Applies to