MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / createModel

Function createModel

automl/translate_create_model.js:38–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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]

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected