Skip to content

Commit 4310826

Browse files
authored
docs: Added eval_id comments to node.js samples (#236)
1 parent e67f2c6 commit 4310826

12 files changed

+108
-22
lines changed

ai-platform/snippets/get-model-evaluation-image-classification.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_image_classification]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-image-object-detection.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_image_object_detection]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2325
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2432

2533
// const modelId = 'YOUR_MODEL_ID';
2634
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-slice.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,16 @@ async function main(
2525
) {
2626
// [START aiplatform_get_model_evaluation_slice]
2727
/**
28-
* TODO(developer): Uncomment these variables before running the sample.\
29-
(Not necessary if passing values as arguments)
28+
* TODO(developer): Uncomment these variables before running the sample
29+
* (not necessary if passing values as arguments). To obtain evaluationId,
30+
* instantiate the client and run the following the commands.
3031
*/
32+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
33+
// const evalRequest = {
34+
// parent: parentName
35+
// };
36+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
37+
// console.log(evalResponse);
3138

3239
// const modelId = 'YOUR_MODEL_ID';
3340
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-tabular-classification.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_tabular_classification]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2325
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2432

2533
// const modelId = 'YOUR_MODEL_ID';
2634
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-tabular-regression.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_tabular_regression]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-text-classification.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_text_classification]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-text-entity-extraction.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_text_entity_extraction]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-text-sentiment-analysis.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_text_sentiment_analysis]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-video-action-recognition.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_video_action_recognition]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-video-classification.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_video_classification]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/get-model-evaluation-video-object-tracking.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_get_model_evaluation_video_object_tracking]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

ai-platform/snippets/list-model-evaluation-slices.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
async function main(modelId, evaluationId, project, location = 'us-central1') {
2020
// [START aiplatform_list_model_evaluation_slices]
2121
/**
22-
* TODO(developer): Uncomment these variables before running the sample.\
23-
* (Not necessary if passing values as arguments)
22+
* TODO(developer): Uncomment these variables before running the sample
23+
* (not necessary if passing values as arguments). To obtain evaluationId,
24+
* instantiate the client and run the following the commands.
2425
*/
26+
// const parentName = `projects/${project}/locations/${location}/models/${modelId}`;
27+
// const evalRequest = {
28+
// parent: parentName
29+
// };
30+
// const [evalResponse] = await modelServiceClient.listModelEvaluations(evalRequest);
31+
// console.log(evalResponse);
2532

2633
// const modelId = 'YOUR_MODEL_ID';
2734
// const evaluationId = 'YOUR_EVALUATION_ID';

0 commit comments

Comments
 (0)