- HTTP request
 - Path parameters
 - Request body
 - Response body
 - Authorization scopes
 - IAM Permissions
 - GcsTrainingInput
 
Trains a custom model.
HTTP request
POST https://discoveryengine.googleapis.com/v1/{dataStore=projects/*/locations/*/collections/*/dataStores/*}:trainCustomModel
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
dataStore | 
                
                   
 Required. The resource name of the Data Store, such as   | 
              
Request body
The request body contains data with the following structure:
| JSON representation | 
|---|
{ "modelType": string, "errorConfig": { object (  | 
                
| Fields | |
|---|---|
modelType | 
                  
                     
 Model to be trained. Supported values are: 
  | 
                
errorConfig | 
                  
                     
 The desired location of errors incurred during the data ingestion and training.  | 
                
modelId | 
                  
                     
 If not provided, a UUID will be generated.  | 
                
Union field training_input. Model training input. training_input can be only one of the following: | 
                |
gcsTrainingInput | 
                  
                     
 Cloud Storage training input.  | 
                
Response body
If successful, the response body contains an instance of Operation.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/discoveryengine.readwrite
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the dataStore resource:
discoveryengine.dataStores.trainCustomModel
For more information, see the IAM documentation.
GcsTrainingInput
Cloud Storage training data input.
| JSON representation | 
|---|
{ "corpusDataPath": string, "queryDataPath": string, "trainDataPath": string, "testDataPath": string }  | 
              
| Fields | |
|---|---|
corpusDataPath | 
                
                   
 The Cloud Storage corpus data which could be associated in train data. The data path format is  For search-tuning model, each line should have the Id, title and text. Example:   | 
              
queryDataPath | 
                
                   
 The gcs query data which could be associated in train data. The data path format is  For search-tuning model, each line should have the Id and text. Example: {"Id": "query1", "text": "example query"}  | 
              
trainDataPath | 
                
                   
 Cloud Storage training data path whose format should be  For search-tuning model, it should have the query-id corpus-id score as tsv file header. The score should be a number in  
  | 
              
testDataPath | 
                
                   
 Cloud Storage test data. Same format as trainDataPath. If not provided, a random 80/20 train/test split will be performed on trainDataPath.  |