| 36 | const client = new AutoMlClient(); |
| 37 | |
| 38 | async function createModel() { |
| 39 | // Construct request |
| 40 | const request = { |
| 41 | parent: client.locationPath(projectId, location), |
| 42 | model: { |
| 43 | displayName: displayName, |
| 44 | datasetId: datasetId, |
| 45 | translationModelMetadata: {}, |
| 46 | }, |
| 47 | }; |
| 48 | |
| 49 | // Don't wait for the LRO |
| 50 | const [operation] = await client.createModel(request); |
| 51 | console.log('Training started...'); |
| 52 | console.log(`Training operation name: ${operation.name}`); |
| 53 | } |
| 54 | |
| 55 | createModel(); |
| 56 | // [END automl_translate_create_model] |