Skip to content

Commit 47ecd63

Browse files
Merge branch 'main' into extend-compute_hyperdisk_pool_create
2 parents 55c7835 + 002b4ae commit 47ecd63

33 files changed

+1592
-59
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
/security-command-center @GoogleCloudPlatform/java-samples-reviewers @yoshi-approver @GoogleCloudPlatform/cloud-samples-reviewers @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/gcp-security-command-center
4545
/servicedirectory @GoogleCloudPlatform/java-samples-reviewers @yoshi-approver @GoogleCloudPlatform/cloud-samples-reviewers @GoogleCloudPlatform/dee-infra
4646
/webrisk @GoogleCloudPlatform/java-samples-reviewers @yoshi-approver @GoogleCloudPlatform/cloud-samples-reviewers @GoogleCloudPlatform/dee-infra
47+
/tpu @GoogleCloudPlatform/java-samples-reviewers @yoshi-approver @GoogleCloudPlatform/cloud-samples-reviewers @GoogleCloudPlatform/dee-infra
4748

4849
# DEE Platform Ops (DEEPO)
4950
/errorreporting @GoogleCloudPlatform/java-samples-reviewers @yoshi-approver @GoogleCloudPlatform/cloud-samples-reviewers

aiplatform/src/main/java/aiplatform/EmbeddingBatchSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static void main(String[] args) throws IOException, InterruptedException
4040
// Could be a BigQuery table or a Google Cloud Storage file.
4141
// E.g. "gs://[BUCKET]/[OUTPUT].jsonl" OR "bq://[PROJECT].[DATASET].[TABLE]"
4242
String outputUri = "gs://YOUR_BUCKET/embedding_batch_output";
43-
String textEmbeddingModel = "textembedding-gecko@003";
43+
String textEmbeddingModel = "text-embedding-005";
4444

4545
embeddingBatchSample(project, location, inputUri, outputUri, textEmbeddingModel);
4646
}

aiplatform/src/main/java/aiplatform/EmbeddingModelTuningSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static PipelineJob createEmbeddingModelTuningPipelineJob(
8484
Matcher matcher = Pattern.compile("^(?<Location>\\w+-\\w+)").matcher(apiEndpoint);
8585
String location = matcher.matches() ? matcher.group("Location") : "us-central1";
8686
String templateUri =
87-
"https://us-kfp.pkg.dev/ml-pipeline/llm-text-embedding/tune-text-embedding-model/v1.1.3";
87+
"https://us-kfp.pkg.dev/ml-pipeline/llm-text-embedding/tune-text-embedding-model/v1.1.4";
8888
PipelineServiceSettings settings =
8989
PipelineServiceSettings.newBuilder().setEndpoint(apiEndpoint).build();
9090
try (PipelineServiceClient client = PipelineServiceClient.create(settings)) {

aiplatform/src/main/java/aiplatform/PredictTextEmbeddingsSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException {
4141
// https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings
4242
String endpoint = "us-central1-aiplatform.googleapis.com:443";
4343
String project = "YOUR_PROJECT_ID";
44-
String model = "text-embedding-004";
44+
String model = "text-embedding-005";
4545
predictTextEmbeddings(
4646
endpoint,
4747
project,

aiplatform/src/main/java/aiplatform/PredictTextEmbeddingsSamplePreview.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void main(String[] args) throws IOException {
4141
// https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings
4242
String endpoint = "us-central1-aiplatform.googleapis.com";
4343
String project = "YOUR_PROJECT_ID";
44-
String model = "text-embedding-preview-0815";
44+
String model = "text-embedding-005";
4545
// Calculate the embedding for a code retrieval query. Using 'CODE_RETRIEVAL_QUERY' for query.
4646
predictTextEmbeddings(
4747
endpoint,

aiplatform/src/test/java/aiplatform/EmbeddingBatchSampleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class EmbeddingBatchSampleTest extends TestCase {
4141
"gs://cloud-samples-data/generative-ai/embeddings/embeddings_input.jsonl";
4242
private static final String GCS_OUTPUT_URI =
4343
String.format("gs://%s/embedding_batch_output", BUCKET_NAME);
44-
private static final String MODEL_ID = "textembedding-gecko@003";
44+
private static final String MODEL_ID = "text-embedding-005";
4545
static Storage storage;
4646
static Bucket bucket;
4747

aiplatform/src/test/java/aiplatform/EmbeddingModelTuningSampleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class EmbeddingModelTuningSampleTest {
5353

5454
private static final String API_ENDPOINT = "us-central1-aiplatform.googleapis.com:443";
5555
private static final String PROJECT = System.getenv("UCAIP_PROJECT_ID");
56-
private static final String BASE_MODEL_VERSION_ID = "text-embedding-004";
56+
private static final String BASE_MODEL_VERSION_ID = "text-embedding-005";
5757
private static final String TASK_TYPE = "DEFAULT";
5858
private static final String JOB_DISPLAY_NAME = "embedding-customization-pipeline-sample";
5959
private static final String CORPUS =

aiplatform/src/test/java/aiplatform/PredictTextEmbeddingsSampleTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void testPredictTextEmbeddings() throws IOException {
5252
PredictTextEmbeddingsSample.predictTextEmbeddings(
5353
APIS_ENDPOINT,
5454
PROJECT,
55-
"text-embedding-004",
55+
"text-embedding-005",
5656
texts,
5757
"QUESTION_ANSWERING",
5858
OptionalInt.of(5));
@@ -70,7 +70,7 @@ public void testPredictTextEmbeddingsPreview() throws IOException {
7070
PredictTextEmbeddingsSamplePreview.predictTextEmbeddings(
7171
APIS_ENDPOINT,
7272
PROJECT,
73-
"text-embedding-preview-0815",
73+
"text-embedding-005",
7474
texts,
7575
"CODE_RETRIEVAL_QUERY",
7676
OptionalInt.of(5));

cdn/signed-urls/src/main/java/com/google/cdn/SignedUrls.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@
2727
import javax.crypto.Mac;
2828
import javax.crypto.spec.SecretKeySpec;
2929

30-
/**
31-
* Samples to create a signed URL for a Cloud CDN endpoint
32-
*/
30+
// [START cloudcdn_sign_url]
31+
/** Samples to create a signed URL for a Cloud CDN endpoint */
3332
public class SignedUrls {
3433

35-
// [START cloudcdn_sign_url]
3634
/**
3735
* Creates a signed URL for a Cloud CDN endpoint with the given key
3836
* URL must start with http:// or https://, and must contain a forward

compute/cloud-client/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@
5959
<groupId>com.google.cloud</groupId>
6060
<scope>test</scope>
6161
</dependency>
62+
<dependency>
63+
<groupId>org.mockito</groupId>
64+
<artifactId>mockito-core</artifactId>
65+
<version>5.13.0</version>
66+
<scope>test</scope>
67+
</dependency>
68+
6269

6370
<dependency>
6471
<artifactId>truth</artifactId>

0 commit comments

Comments
 (0)