Skip to content

Commit

Permalink
replaced placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
willisc7 committed Jan 27, 2025
1 parent e804e20 commit a9d1a47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gemini/tuning/genai-mlops-tune-and-eval/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@ def rank_responses(instruction: str, context: str, responses: list[str]) -> tupl

@dsl.pipeline(name="gemini-tuning-pipeline")
def gemini_tuning_pipeline(
project: str = "genai-mlops-tune-and-eval",
location: str = "us-central1",
project: str = "YOUR_PROJECT_ID",
location: str = "YOUR_REGION",
source_model_name: str = "gemini-1.5-pro-002",
train_data_uri: str = "gs://github-repo/generative-ai/gemini/tuning/mlops-tune-and-eval/patient_1_glucose_examples.jsonl",
# For first run, set `baseline_model_endpoint`` to any tunable Gemini model
# because a tuned model endpoint doesn't exist yet
baseline_model_endpoint: str = "gemini-1.5-pro-002",
# For subsequent runs, set baseline_model_endpoint to a tuned model endpoint
# baseline_model_endpoint: str = "projects/824264063118/locations/us-central1/endpoints/797393320253849600",
# baseline_model_endpoint: str = "projects/824264063118/locations/YOUR_REGION/endpoints/797393320253849600",
) -> None:
"""Defines the pipeline to tune a model and compare it to the previously tuned model"""
tuning_task = gemini_tuning_component(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from google.cloud import aiplatform

aiplatform.init(
project="genai-mlops-tune-and-eval", location="us-central1"
project="YOUR_PROJECT_ID", location="YOUR_REGION"
) # Initialize the Vertex AI SDK

job = aiplatform.PipelineJob(
display_name="tuned-gemini-1-5-pro-002", # Give your run a name
template_path="pipeline.json", # Path to the compiled pipeline JSON
pipeline_root="gs://vertex-ai-pipeline-root-20250116", # Cloud Storage location for pipeline artifacts
parameter_values={
"project": "genai-mlops-tune-and-eval",
"location": "us-central1",
"project": "YOUR_PROJECT_ID",
"location": "YOUR_REGION",
"source_model_name": "gemini-1.5-pro-002",
"train_data_uri": "gs://github-repo/generative-ai/gemini/tuning/mlops-tune-and-eval/patient_1_glucose_examples.jsonl",
}, # Pass pipeline parameter values here
Expand Down

0 comments on commit a9d1a47

Please sign in to comment.