Skip to content
Permalink
Browse files
docs: removed default model comment and added comment to test (#997)
  • Loading branch information
nayaknishant committed Dec 10, 2021
1 parent e67c946 commit 9959aea2e3fca2ec2202a0b3cccb5a2aae793c72
@@ -46,7 +46,6 @@ static void createModel(String projectId, String datasetId, String displayName)
try (AutoMlClient client = AutoMlClient.create()) {
// A resource that represents Google Cloud Platform location.
LocationName projectLocation = LocationName.of(projectId, "us-central1");
// Leave model unset to use the default base model provided by Google
TranslationModelMetadata translationModelMetadata =
TranslationModelMetadata.newBuilder().build();
Model model =
@@ -76,8 +76,12 @@ public void testTranslateCreateModel() {
String.format("test_%s", UUID.randomUUID().toString().replace("-", "_").substring(0, 26));
TranslateCreateModel.createModel(PROJECT_ID, DATASET_ID, modelName);
String got = bout.toString();
// After setting DATASET_ID, change line below to
// assertThat(got).contains("Training started...");
assertThat(got).contains("Dataset does not exist");
} catch (IOException | ExecutionException | InterruptedException e) {
// After setting DATASET_ID, change line below to
// assertThat(e.getMessage()).contains("Training started...");
assertThat(e.getMessage()).contains("Dataset does not exist");
}
}

0 comments on commit 9959aea

Please sign in to comment.