Skip to content
This repository was archived by the owner on Sep 9, 2023. It is now read-only.

Commit 8826252

Browse files
docs: Added evalId comment to samples (#727)
* docs: Added evalId comment to samples * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent d35a846 commit 8826252

12 files changed

+156
-0
lines changed

samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageClassificationSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationImageClassificationSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationImageObjectDetectionSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationImageObjectDetectionSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationSliceSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ public class GetModelEvaluationSliceSample {
2929

3030
public static void main(String[] args) throws IOException {
3131
// TODO(developer): Replace these variables before running the sample.
32+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
33+
//
34+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
35+
// {
36+
// String location = "us-central1";
37+
// ModelName modelFullId = ModelName.of(project, location, modelId);
38+
// ListModelEvaluationsRequest modelEvaluationsrequest =
39+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
40+
// for (ModelEvaluation modelEvaluation :
41+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
42+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
43+
// }
44+
// }
3245
String project = "YOUR_PROJECT_ID";
3346
String modelId = "YOUR_MODEL_ID";
3447
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationTabularClassificationSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationTabularClassificationSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationTabularRegressionSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationTabularRegressionSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextClassificationSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationTextClassificationSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextEntityExtractionSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationTextEntityExtractionSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationTextSentimentAnalysisSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationTextSentimentAnalysisSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoActionRecognitionSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ public class GetModelEvaluationVideoActionRecognitionSample {
2727

2828
public static void main(String[] args) throws IOException {
2929
// TODO(developer): Replace these variables before running the sample.
30+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
31+
//
32+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
33+
// {
34+
// String location = "us-central1";
35+
// ModelName modelFullId = ModelName.of(project, location, modelId);
36+
// ListModelEvaluationsRequest modelEvaluationsrequest =
37+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
38+
// for (ModelEvaluation modelEvaluation :
39+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
40+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
41+
// }
42+
// }
3043
String project = "PROJECT";
3144
String modelId = "MODEL_ID";
3245
String evaluationId = "EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoClassificationSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationVideoClassificationSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/GetModelEvaluationVideoObjectTrackingSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public class GetModelEvaluationVideoObjectTrackingSample {
2828

2929
public static void main(String[] args) throws IOException {
3030
// TODO(developer): Replace these variables before running the sample.
31+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
32+
//
33+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
34+
// {
35+
// String location = "us-central1";
36+
// ModelName modelFullId = ModelName.of(project, location, modelId);
37+
// ListModelEvaluationsRequest modelEvaluationsrequest =
38+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
39+
// for (ModelEvaluation modelEvaluation :
40+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
41+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
42+
// }
43+
// }
3144
String project = "YOUR_PROJECT_ID";
3245
String modelId = "YOUR_MODEL_ID";
3346
String evaluationId = "YOUR_EVALUATION_ID";

samples/snippets/src/main/java/aiplatform/ListModelEvaluationSliceSample.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ public class ListModelEvaluationSliceSample {
2929

3030
public static void main(String[] args) throws IOException {
3131
// TODO(developer): Replace these variables before running the sample.
32+
// To obtain evaluationId run the code block below after setting modelServiceSettings.
33+
//
34+
// try (ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings))
35+
// {
36+
// String location = "us-central1";
37+
// ModelName modelFullId = ModelName.of(project, location, modelId);
38+
// ListModelEvaluationsRequest modelEvaluationsrequest =
39+
// ListModelEvaluationsRequest.newBuilder().setParent(modelFullId.toString()).build();
40+
// for (ModelEvaluation modelEvaluation :
41+
// modelServiceClient.listModelEvaluations(modelEvaluationsrequest).iterateAll()) {
42+
// System.out.format("Model Evaluation Name: %s%n", modelEvaluation.getName());
43+
// }
44+
// }
3245
String project = "YOUR_PROJECT_ID";
3346
String modelId = "YOUR_MODEL_ID";
3447
String evaluationId = "YOUR_EVALUATION_ID";

0 commit comments

Comments
 (0)