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

Commit

Permalink
docs: removed default model comment and added comment to test (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
nayaknishant committed Dec 10, 2021
1 parent e67c946 commit 9959aea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Expand Up @@ -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 =
Expand Down
Expand Up @@ -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");
}
}
Expand Down

0 comments on commit 9959aea

Please sign in to comment.