Skip to content

Commit d346404

Browse files
fix: Tidy up text embedding model tuning demo. (#11426)
* fix: Set better default args suggested by quality engineers. * fix: Set better default args; tidy up api_endpoint processing. * tidy up api_endpoint processing.
1 parent c6afe86 commit d346404

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

generative_ai/embedding_model_tuning.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ def tune_embedding_model(
3131
corpus_path: str = "gs://embedding-customization-pipeline/dataset/corpus.jsonl",
3232
train_label_path: str = "gs://embedding-customization-pipeline/dataset/train.tsv",
3333
test_label_path: str = "gs://embedding-customization-pipeline/dataset/test.tsv",
34-
batch_size: int = 50,
35-
iterations: int = 300,
34+
batch_size: int = 128,
35+
iterations: int = 1000,
3636
) -> pipeline_jobs.PipelineJob:
37-
match = re.search(r"(.+)(-autopush|-staging)?-aiplatform.+", api_endpoint)
37+
match = re.search(r"^(\w+-\w+)", api_endpoint)
3838
location = match.group(1) if match else "us-central1"
3939
job = aiplatform.PipelineJob(
4040
display_name=pipeline_job_display_name,

0 commit comments

Comments
 (0)