Share via


IFormRecognizerClient.TrainCustomModelWithHttpMessagesAsync Method

Definition

Train Model

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainResult>> TrainCustomModelWithHttpMessagesAsync (Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainRequest trainRequest, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member TrainCustomModelWithHttpMessagesAsync : Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainRequest * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.FormRecognizer.Models.TrainResult>>
Public Function TrainCustomModelWithHttpMessagesAsync (trainRequest As TrainRequest, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of TrainResult))

Parameters

trainRequest
TrainRequest

Request object for training.

customHeaders
Dictionary<String,List<String>>

The headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Remarks

The train request must include a source parameter that is either an externally accessible Azure Storage blob container Uri (preferably a Shared Access Signature Uri) or valid path to a data folder in a locally mounted drive. When local paths are specified, they must follow the Linux/Unix path format and be an absolute path rooted to the input mount configuration setting value e.g., if '{Mounts:Input}' configuration setting value is '/input' then a valid source path would be '/input/contosodataset'. All data to be trained are expected to be under the source. Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg' and 'image/png'." Other content is ignored when training a model.

Applies to