Skip to content

Commit

Permalink
samples: changed AutoML model ID (#553)
Browse files Browse the repository at this point in the history
* samples: changed AutoML model ID

* fix: test

* fix: tests
  • Loading branch information
telpirion authored and Shabirmean committed Nov 18, 2022
1 parent eb49fb8 commit b4c0f06
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class BatchTranslateTextWithGlossaryAndModelTests {
private static final String INPUT_URI =
"gs://cloud-samples-data/translation/text_with_custom_model_and_glossary.txt";
private static final String GLOSSARY_ID = "DO_NOT_DELETE_TEST_GLOSSARY";
private static final String MODEL_ID = "TRL2188848820815848149";
private static final String MODEL_ID = "TRL3645318651705294848";
private static final String PREFIX = "BATCH_TRANSLATION_WITH_MODEL_OUTPUT/";
private static final String OUTPUT_URI =
String.format("gs://%s/%s%s/", PROJECT_ID, PREFIX, UUID.randomUUID());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class BatchTranslateTextWithModelTests {
private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
private static final String INPUT_URI =
"gs://cloud-samples-data/translation/custom_model_text.txt";
private static final String MODEL_ID = "TRL2188848820815848149";
private static final String MODEL_ID = "TRL3645318651705294848";
private static final String PREFIX = "BATCH_TRANSLATION_MODEL_GLOS_OUTPUT/";
private static final String OUTPUT_URI =
String.format("gs://%s/%s%s/", PROJECT_ID, PREFIX, UUID.randomUUID());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@SuppressWarnings("checkstyle:abbreviationaswordinname")
public class TranslateTextWithGlossaryAndModelTests {
private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
private static final String MODEL_ID = "TRL2188848820815848149";
private static final String MODEL_ID = "TRL3645318651705294848";
private static final String GLOSSARY_INPUT_URI =
"gs://cloud-samples-data/translation/glossary_ja.csv";
private static final String GLOSSARY_ID = "DO_NOT_DELETE_TEST_GLOSSARY";
Expand Down Expand Up @@ -78,7 +78,7 @@ public void testTranslateTextWithGlossaryAndModel() throws IOException {
TranslateTextWithGlossaryAndModel.translateTextWithGlossaryAndModel(
PROJECT_ID, "en", "ja", "That' il do it. deception", GLOSSARY_ID, MODEL_ID);
String got = bout.toString();
assertThat(got).contains("それはそうだ"); // custom model
assertThat(got).contains("やるよ欺く"); // custom model
assertThat(got).contains("欺く"); // glossary
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@SuppressWarnings("checkstyle:abbreviationaswordinname")
public class TranslateTextWithModelTests {
private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT");
private static final String MODEL_ID = "TRL2188848820815848149";
private static final String MODEL_ID = "TRL3645318651705294848";

private ByteArrayOutputStream bout;
private PrintStream out;
Expand Down Expand Up @@ -72,6 +72,6 @@ public void testTranslateTextWithModel() throws IOException {
TranslateTextWithModel.translateTextWithModel(
PROJECT_ID, "en", "ja", "That' il do it. deception", MODEL_ID);
String got = bout.toString();
assertThat(got).contains("それはそうだ");
assertThat(got).contains("やるよ欺瞞");
}
}

0 comments on commit b4c0f06

Please sign in to comment.