Skip to content

Commit fcb50f1

Browse files
authored
docs: removed default model comment and added comment to test (#997)
1 parent 8226ee1 commit fcb50f1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

automl/snippets/src/main/java/com/example/automl/TranslateCreateModel.java

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ static void createModel(String projectId, String datasetId, String displayName)
4646
try (AutoMlClient client = AutoMlClient.create()) {
4747
// A resource that represents Google Cloud Platform location.
4848
LocationName projectLocation = LocationName.of(projectId, "us-central1");
49-
// Leave model unset to use the default base model provided by Google
5049
TranslationModelMetadata translationModelMetadata =
5150
TranslationModelMetadata.newBuilder().build();
5251
Model model =

automl/snippets/src/test/java/com/example/automl/TranslateCreateModelTest.java

+4
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@ public void testTranslateCreateModel() {
7676
String.format("test_%s", UUID.randomUUID().toString().replace("-", "_").substring(0, 26));
7777
TranslateCreateModel.createModel(PROJECT_ID, DATASET_ID, modelName);
7878
String got = bout.toString();
79+
// After setting DATASET_ID, change line below to
80+
// assertThat(got).contains("Training started...");
7981
assertThat(got).contains("Dataset does not exist");
8082
} catch (IOException | ExecutionException | InterruptedException e) {
83+
// After setting DATASET_ID, change line below to
84+
// assertThat(e.getMessage()).contains("Training started...");
8185
assertThat(e.getMessage()).contains("Dataset does not exist");
8286
}
8387
}

0 commit comments

Comments
 (0)