Skip to content

Commit

Permalink
Merge branch 'main' into inardini-c2-feat
Browse files Browse the repository at this point in the history
  • Loading branch information
gericdong authored Oct 8, 2024
2 parents 89325d4 + fd77968 commit 3944b2e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@
"- `Storage Object Admin` to read and write to your GCS bucket.\n",
"- `Artifact Registry Reader` to download the pipeline template from Artifact Registry.\n",
"\n",
"[Check out the documentation](https://cloud.google.com/iam/docs/manage-access-service-accounts#iam-view-access-sa-gcloud) to know how to grant those permissions to a single service account.\n"
"[Check out the documentation](https://cloud.google.com/iam/docs/manage-access-service-accounts#iam-view-access-sa-gcloud) to know how to grant those permissions to a single service account. \n",
"\n",
"**Important**: If you run following commands using Vertex AI Workbench, please directly run in the terminal. "
]
},
{
Expand All @@ -383,17 +385,12 @@
},
"outputs": [],
"source": [
"! gcloud projects add-iam-policy-binding {PROJECT_ID} \\\n",
" --member=serviceAccount:{SERVICE_ACCOUNT} \\\n",
" --role=roles/aiplatform.user\n",
"\n",
"! gcloud projects add-iam-policy-binding {PROJECT_ID} \\\n",
" --member=serviceAccount:{SERVICE_ACCOUNT} \\\n",
" --role=roles/storage.objectAdmin\n",
"\n",
"! gcloud projects add-iam-policy-binding {PROJECT_ID} \\\n",
" --member=serviceAccount:{SERVICE_ACCOUNT} \\\n",
" --role=roles/artifactregistry.reader"
"for role in ['aiplatform.user', 'storage.objectAdmin', 'artifactregistry.reader']:\n",
" \n",
" ! gcloud projects add-iam-policy-binding {PROJECT_ID} \\\n",
" --member=serviceAccount:{SERVICE_ACCOUNT} \\\n",
" --role=roles/{role} \\ \n",
" --condition=None"
]
},
{
Expand Down Expand Up @@ -480,7 +477,7 @@
"\n",
"from google.cloud import aiplatform\n",
"import pandas as pd\n",
"from utils.helpers import (\n",
"from tutorial.utils.helpers import (\n",
" async_generate,\n",
" display_eval_report,\n",
" evaluate_task,\n",
Expand Down Expand Up @@ -908,7 +905,11 @@
"source": [
"#### Run the automatic prompt optimization job\n",
"\n",
"Now you are ready to run your first Vertex AI Prompt Optimizer (Preview) job using the Vertex AI SDK for Python.\n"
"Now you are ready to run your first Vertex AI Prompt Optimizer (Preview) job using the Vertex AI SDK for Python.\n",
"\n",
"**Important:** Be sure you have provisioned enough queries per minute (QPM) quota and the recommended QPM for each model. If you configure the Vertex AI prompt optimizer with a QPM that is higher than the QPM than you have access to, the job will fail. \n",
"\n",
"[Check out](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/prompt-optimizer#before-you-begin) the documentation to know more. \n"
]
},
{
Expand Down Expand Up @@ -937,7 +938,7 @@
" worker_pool_specs=WORKER_POOL_SPECS,\n",
")\n",
"\n",
"custom_job.run()"
"custom_job.run(service_account=SERVICE_ACCOUNT)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@
"- `Artifact Registry Reader` to download the pipeline template from Artifact Registry.\n",
"- `Cloud Run Developer` to deploy function on Cloud Run.\n",
"\n",
"[Check out the documentation](https://cloud.google.com/iam/docs/manage-access-service-accounts#iam-view-access-sa-gcloud) to know how to grant those permissions to a single service account.\n"
"[Check out the documentation](https://cloud.google.com/iam/docs/manage-access-service-accounts#iam-view-access-sa-gcloud) to know how to grant those permissions to a single service account.\n",
"\n",
"**Important**: If you run following commands using Vertex AI Workbench, please directly run in the terminal. \n"
]
},
{
Expand All @@ -398,7 +400,8 @@
" \n",
" ! gcloud projects add-iam-policy-binding {PROJECT_ID} \\\n",
" --member=serviceAccount:{SERVICE_ACCOUNT} \\\n",
" --role=roles/{role}"
" --role=roles/{role} \\ \n",
" --condition=None"
]
},
{
Expand Down Expand Up @@ -1146,7 +1149,11 @@
"source": [
"#### Run the automatic prompt optimization job\n",
"\n",
"Now you are ready to run your first Vertex AI Prompt Optimizer (Preview) job using the Vertex AI SDK for Python.\n"
"Now you are ready to run your first Vertex AI Prompt Optimizer (Preview) job using the Vertex AI SDK for Python.\n",
"\n",
"**Important:** Be sure you have provisioned enough queries per minute (QPM) quota and the recommended QPM for each model. If you configure the Vertex AI prompt optimizer with a QPM that is higher than the QPM than you have access to, the job will fail. \n",
"\n",
"[Check out](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/prompt-optimizer#before-you-begin) the documentation to know more. "
]
},
{
Expand Down

0 comments on commit 3944b2e

Please sign in to comment.