Skip to content

Commit 8bc8867

Browse files
committed
v1.2.6
1 parent 97a172b commit 8bc8867

File tree

8 files changed

+95
-69
lines changed

8 files changed

+95
-69
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [1.2.7] - 2023-11-06
5+
6+
### Added
7+
8+
### Changed
9+
10+
- Updated state_bucket naming schema
11+
- Updated unit tests to reflect state_bucket naming schema
12+
- Updated outputs.tf block to not include csr if use_ci=False
13+
14+
### Fixed
15+
16+
417
## [1.2.6] - 2023-10-05
518

619
### Added

examples/training/00_introduction_training_example.ipynb

Lines changed: 75 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@
11051105
"metadata": {},
11061106
"outputs": [],
11071107
"source": [
1108-
"!pip3 install kfp<2.0.0 google-cloud-aiplatform"
1108+
"!pip3 install \"kfp<2.0.0\" google-cloud-aiplatform"
11091109
]
11101110
},
11111111
{
@@ -1118,7 +1118,7 @@
11181118
},
11191119
{
11201120
"cell_type": "code",
1121-
"execution_count": 13,
1121+
"execution_count": 7,
11221122
"id": "36329f82",
11231123
"metadata": {},
11241124
"outputs": [],
@@ -1139,7 +1139,7 @@
11391139
},
11401140
{
11411141
"cell_type": "code",
1142-
"execution_count": 14,
1142+
"execution_count": 8,
11431143
"id": "cf82f09f",
11441144
"metadata": {},
11451145
"outputs": [
@@ -1166,7 +1166,7 @@
11661166
},
11671167
{
11681168
"cell_type": "code",
1169-
"execution_count": 15,
1169+
"execution_count": 17,
11701170
"id": "89b82a23",
11711171
"metadata": {},
11721172
"outputs": [],
@@ -1176,7 +1176,8 @@
11761176
" 'google-cloud-bigquery', \n",
11771177
" 'pandas',\n",
11781178
" 'pyarrow',\n",
1179-
" 'db_dtypes'\n",
1179+
" 'db_dtypes',\n",
1180+
" 'appengine-python-standard'\n",
11801181
" ],\n",
11811182
" output_component_file=f'{AutoMLOps.OUTPUT_DIR}/create_dataset.yaml'\n",
11821183
")\n",
@@ -1235,7 +1236,7 @@
12351236
},
12361237
{
12371238
"cell_type": "code",
1238-
"execution_count": 16,
1239+
"execution_count": 18,
12391240
"id": "4f1a3660",
12401241
"metadata": {},
12411242
"outputs": [],
@@ -1295,7 +1296,7 @@
12951296
},
12961297
{
12971298
"cell_type": "code",
1298-
"execution_count": 17,
1299+
"execution_count": 19,
12991300
"id": "aa8047d6",
13001301
"metadata": {},
13011302
"outputs": [],
@@ -1363,7 +1364,7 @@
13631364
},
13641365
{
13651366
"cell_type": "code",
1366-
"execution_count": 18,
1367+
"execution_count": 20,
13671368
"id": "01996d4c",
13681369
"metadata": {},
13691370
"outputs": [],
@@ -1399,7 +1400,7 @@
13991400
},
14001401
{
14011402
"cell_type": "code",
1402-
"execution_count": 19,
1403+
"execution_count": 21,
14031404
"id": "bc244ca7",
14041405
"metadata": {},
14051406
"outputs": [],
@@ -1424,7 +1425,7 @@
14241425
},
14251426
{
14261427
"cell_type": "code",
1427-
"execution_count": 12,
1428+
"execution_count": 22,
14281429
"id": "6f8282e3",
14291430
"metadata": {},
14301431
"outputs": [
@@ -1434,10 +1435,12 @@
14341435
"text": [
14351436
"Writing directories under AutoMLOps/\n",
14361437
"Writing configurations to AutoMLOps/configs/defaults.yaml\n",
1437-
"Writing Kubeflow Pipelines code to AutoMLOps/pipelines, AutoMLOps/components, AutoMLOps/services\n",
14381438
"Writing README.md to AutoMLOps/README.md\n",
1439+
"Writing kubeflow pipelines code to AutoMLOps/pipelines, AutoMLOps/components\n",
14391440
"Writing scripts to AutoMLOps/scripts\n",
1440-
"Writing CloudBuild config to AutoMLOps/cloudbuild.yaml\n",
1441+
"Writing submission service code to AutoMLOps/services\n",
1442+
"Writing gcloud provisioning code to AutoMLOps/provision\n",
1443+
"Writing cloud build config to AutoMLOps/cloudbuild.yaml\n",
14411444
"Code Generation Complete.\n"
14421445
]
14431446
}
@@ -1461,7 +1464,7 @@
14611464
},
14621465
{
14631466
"cell_type": "code",
1464-
"execution_count": 13,
1467+
"execution_count": 23,
14651468
"id": "2d66e453",
14661469
"metadata": {},
14671470
"outputs": [
@@ -1470,46 +1473,49 @@
14701473
"output_type": "stream",
14711474
"text": [
14721475
"WARNING: Provisioning requires these permissions:\n",
1473-
"-cloudfunctions.functions.get\n",
1474-
"-serviceusage.services.use\n",
14751476
"-serviceusage.services.enable\n",
1476-
"-cloudfunctions.functions.create\n",
1477-
"-pubsub.subscriptions.list\n",
1478-
"-cloudscheduler.jobs.list\n",
1479-
"-pubsub.topics.create\n",
1480-
"-source.repos.list\n",
1481-
"-artifactregistry.repositories.create\n",
1477+
"-serviceusage.services.use\n",
1478+
"-storage.buckets.get\n",
1479+
"-storage.buckets.create\n",
14821480
"-resourcemanager.projects.setIamPolicy\n",
1483-
"-iam.serviceAccounts.listiam.serviceAccounts.create\n",
1481+
"-iam.serviceAccounts.list\n",
1482+
"-iam.serviceAccounts.create\n",
1483+
"-iam.serviceAccounts.actAs\n",
1484+
"-pubsub.topics.list\n",
1485+
"-pubsub.topics.create\n",
1486+
"-pubsub.subscriptions.list\n",
14841487
"-pubsub.subscriptions.create\n",
1485-
"-cloudscheduler.jobs.create\n",
1486-
"-storage.buckets.create\n",
1487-
"-source.repos.create\n",
14881488
"-artifactregistry.repositories.list\n",
1489-
"-cloudbuild.builds.create\n",
1489+
"-artifactregistry.repositories.create\n",
14901490
"-cloudbuild.builds.list\n",
1491-
"-pubsub.topics.list\n",
1492-
"-storage.buckets.get\n",
1491+
"-cloudbuild.builds.create\n",
1492+
"-cloudscheduler.jobs.list\n",
1493+
"-cloudscheduler.jobs.create\n",
1494+
"-cloudfunctions.functions.get\n",
1495+
"-cloudfunctions.functions.create\n",
1496+
"-source.repos.list\n",
1497+
"-source.repos.create\n",
14931498
"\n",
14941499
"You are currently using: srastatter@google.com. Please check your account permissions.\n",
14951500
"The following are the recommended roles for provisioning:\n",
1501+
"-roles/serviceusage.serviceUsageAdmin\n",
14961502
"-roles/resourcemanager.projectIamAdmin\n",
1497-
"-roles/cloudfunctions.admin\n",
1498-
"-roles/artifactregistry.admin\n",
14991503
"-roles/iam.serviceAccountAdmin\n",
1500-
"-roles/serviceusage.serviceUsageAdmin\n",
1501-
"-roles/aiplatform.serviceAgent\n",
1502-
"-roles/cloudscheduler.admin\n",
1504+
"-roles/iam.serviceAccountUser\n",
1505+
"-roles/storage.admin\n",
15031506
"-roles/pubsub.editor\n",
1504-
"-roles/source.admin\n",
1507+
"-roles/artifactregistry.admin\n",
15051508
"-roles/cloudbuild.builds.editor\n",
1509+
"-roles/cloudscheduler.admin\n",
1510+
"-roles/cloudfunctions.admin\n",
1511+
"-roles/source.admin\n",
15061512
"\n",
15071513
"\u001b[0;32m Setting up API services in project automlops-sandbox \u001b[0m\n",
1508-
"Operation \"operations/acat.p2-45373616427-990bb410-2998-4b37-b37f-09ed724e9519\" finished successfully.\n",
1514+
"Operation \"operations/acat.p2-45373616427-447dd1e9-9ed8-4831-9b57-ff4a2e50abf5\" finished successfully.\n",
15091515
"\u001b[0;32m Setting up Artifact Registry in project automlops-sandbox \u001b[0m\n",
15101516
"Listing items under project automlops-sandbox, location us-central1.\n",
15111517
"\n",
1512-
"dry-beans-dt-artifact-registry DOCKER STANDARD_REPOSITORY Artifact Registry dry-beans-dt-artifact-registry in us-central1. us-central1 Google-managed key 2023-09-05T11:25:48 2023-09-05T14:47:39 3200.712\n",
1518+
"dry-beans-dt-artifact-registry DOCKER STANDARD_REPOSITORY Artifact Registry dry-beans-dt-artifact-registry in us-central1. us-central1 Google-managed key 2023-09-05T11:25:48 2023-11-02T09:28:28 15534.510\n",
15131519
"Artifact Registry: dry-beans-dt-artifact-registry already exists in project automlops-sandbox\n",
15141520
"\u001b[0;32m Setting up Storage Bucket in project automlops-sandbox \u001b[0m\n",
15151521
"gs://automlops-sandbox-dry-beans-dt-bucket/\n",
@@ -1519,20 +1525,21 @@
15191525
"Service Account: vertex-pipelines already exists in project automlops-sandbox\n",
15201526
"\u001b[0;32m Setting up IAM roles for Pipeline Job Runner Service Account in project automlops-sandbox \u001b[0m\n",
15211527
"\u001b[0;32m Setting up Cloud Source Repository in project automlops-sandbox \u001b[0m\n",
1522-
"dry-beans-dt-repository automlops-sandbox https://source.developers.google.com/p/automlops-sandbox/r/dry-beans-dt-repository\n",
1528+
"dry-beans-dt-repository automlops-sandbox https://source.developers.google.com/p/automlops-sandbox/r/dry-beans-dt-repository\n",
15231529
"Cloud Source Repository: dry-beans-dt-repository already exists in project automlops-sandbox\n",
15241530
"\u001b[0;32m Setting up Queueing Service in project automlops-sandbox \u001b[0m\n",
15251531
"name: projects/automlops-sandbox/topics/dry-beans-dt-queueing-svc\n",
15261532
"Pub/Sub Topic: dry-beans-dt-queueing-svc already exists in project automlops-sandbox\n",
15271533
"\u001b[0;32m Deploying Cloud Functions: dry-beans-dt-job-submission-svc in project automlops-sandbox \u001b[0m\n",
15281534
"Deploying function (may take a while - up to 2 minutes)...\n",
15291535
"..\n",
1530-
"For Cloud Build Logs, visit: https://console.cloud.google.com/cloud-build/builds;region=us-central1/0dcd7601-a440-4c7e-8ea9-28d1cf927991?project=45373616427\n",
1531-
"........................................................................done.\n",
1536+
"For Cloud Build Logs, visit: https://console.cloud.google.com/cloud-build/builds;region=us-central1/127ff0be-d768-4d55-994f-0312a72e76df?project=45373616427\n",
1537+
"...................................done.\n",
15321538
"availableMemoryMb: 512\n",
1533-
"buildId: 0dcd7601-a440-4c7e-8ea9-28d1cf927991\n",
1534-
"buildName: projects/45373616427/locations/us-central1/builds/0dcd7601-a440-4c7e-8ea9-28d1cf927991\n",
1535-
"dockerRegistry: CONTAINER_REGISTRY\n",
1539+
"buildId: 127ff0be-d768-4d55-994f-0312a72e76df\n",
1540+
"buildName: projects/45373616427/locations/us-central1/builds/127ff0be-d768-4d55-994f-0312a72e76df\n",
1541+
"dockerRegistry: ARTIFACT_REGISTRY\n",
1542+
"dockerRepository: projects/automlops-sandbox/locations/us-central1/repositories/dry-beans-dt-artifact-registry\n",
15361543
"entryPoint: process_request\n",
15371544
"eventTrigger:\n",
15381545
" eventType: google.pubsub.topic.publish\n",
@@ -1546,11 +1553,11 @@
15461553
"name: projects/automlops-sandbox/locations/us-central1/functions/dry-beans-dt-job-submission-svc\n",
15471554
"runtime: python39\n",
15481555
"serviceAccountEmail: vertex-pipelines@automlops-sandbox.iam.gserviceaccount.com\n",
1549-
"sourceUploadUrl: https://storage.googleapis.com/uploads-961973632599.us-central1.cloudfunctions.appspot.com/a2ee896a-a9dc-41ee-a129-fc000fc59dc9.zip\n",
1556+
"sourceUploadUrl: https://storage.googleapis.com/uploads-961973632599.us-central1.cloudfunctions.appspot.com/b846a071-0e81-4549-be94-6ed6c7181aa8.zip\n",
15501557
"status: ACTIVE\n",
15511558
"timeout: 540s\n",
1552-
"updateTime: '2023-09-08T03:06:05.246Z'\n",
1553-
"versionId: '2'\n",
1559+
"updateTime: '2023-11-02T13:40:13.103Z'\n",
1560+
"versionId: '6'\n",
15541561
"\u001b[0;32m Setting up Cloud Build Trigger in project automlops-sandbox \u001b[0m\n",
15551562
"name: dry-beans-dt-build-trigger\n",
15561563
"Cloudbuild Trigger already exists in project automlops-sandbox for repo dry-beans-dt-repository\n",
@@ -1574,7 +1581,7 @@
15741581
},
15751582
{
15761583
"cell_type": "code",
1577-
"execution_count": 14,
1584+
"execution_count": 24,
15781585
"id": "e92f3e51",
15791586
"metadata": {
15801587
"scrolled": false
@@ -1585,28 +1592,28 @@
15851592
"output_type": "stream",
15861593
"text": [
15871594
"WARNING: Running precheck for deploying requires these permissions:\n",
1588-
"-artifactregistry.repositories.get\n",
1589-
"-cloudbuild.builds.get\n",
1595+
"-serviceusage.services.get\n",
15901596
"-resourcemanager.projects.getIamPolicy\n",
15911597
"-storage.buckets.update\n",
1592-
"-serviceusage.services.get\n",
1593-
"-cloudfunctions.functions.get\n",
1594-
"-pubsub.topics.get\n",
15951598
"-iam.serviceAccounts.get\n",
1596-
"-source.repos.update\n",
1599+
"-artifactregistry.repositories.get\n",
1600+
"-pubsub.topics.get\n",
15971601
"-pubsub.subscriptions.get\n",
1602+
"-cloudbuild.builds.get\n",
1603+
"-cloudfunctions.functions.get\n",
1604+
"-source.repos.update\n",
15981605
"\n",
15991606
"You are currently using: srastatter@google.com. Please check your account permissions.\n",
16001607
"The following are the recommended roles for deploying with precheck:\n",
16011608
"-roles/serviceusage.serviceUsageViewer\n",
16021609
"-roles/iam.roleViewer\n",
1603-
"-roles/pubsub.viewer\n",
16041610
"-roles/storage.admin\n",
1605-
"-roles/cloudbuild.builds.editor\n",
1606-
"-roles/source.writer\n",
16071611
"-roles/iam.serviceAccountUser\n",
1608-
"-roles/cloudfunctions.viewer\n",
16091612
"-roles/artifactregistry.reader\n",
1613+
"-roles/pubsub.viewer\n",
1614+
"-roles/cloudbuild.builds.editor\n",
1615+
"-roles/cloudfunctions.viewer\n",
1616+
"-roles/source.writer\n",
16101617
"\n",
16111618
"Checking for required API services in project automlops-sandbox...\n",
16121619
"Checking for Artifact Registry in project automlops-sandbox...\n",
@@ -1620,13 +1627,11 @@
16201627
"Checking for Cloud Build Trigger in project automlops-sandbox...\n",
16211628
"Precheck successfully completed, continuing to deployment.\n",
16221629
"\n",
1623-
"[automlops 1fa5664] Run AutoMLOps\n",
1624-
" 7 files changed, 34 insertions(+), 228 deletions(-)\n",
1625-
" delete mode 100644 AutoMLOps/components/component_base/src/custom_train_model.py\n",
1626-
" delete mode 100644 AutoMLOps/components/custom_train_model/component.yaml\n",
1627-
"remote: Waiting for private key checker: 5/5 objects left \n",
1630+
"[automlops dffe270] Run AutoMLOps\n",
1631+
" 2 files changed, 2 insertions(+), 1 deletion(-)\n",
1632+
"remote: Waiting for private key checker: 2/2 objects left \n",
16281633
"To https://source.developers.google.com/p/automlops-sandbox/r/dry-beans-dt-repository\n",
1629-
" 70a23dd..1fa5664 automlops -> automlops\n",
1634+
" 9002cdb..dffe270 automlops -> automlops\n",
16301635
"Pushing code to automlops branch, triggering build...\n",
16311636
"Cloud Build job running at: https://console.cloud.google.com/cloud-build/builds;region=us-central1\n",
16321637
"Please wait for this build job to complete.\n",
@@ -1658,6 +1663,14 @@
16581663
"AutoMLOps.deploy(precheck=True, # precheck is optional, defaults to True\n",
16591664
" hide_warnings=False) # hide_warnings is optional, defaults to True"
16601665
]
1666+
},
1667+
{
1668+
"cell_type": "code",
1669+
"execution_count": null,
1670+
"id": "41d0309f",
1671+
"metadata": {},
1672+
"outputs": [],
1673+
"source": []
16611674
}
16621675
],
16631676
"metadata": {

google_cloud_automlops/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
series of directories to support the creation of Vertex Pipelines.
2424
"""
2525
# pylint: disable=invalid-name
26-
__version__ = '1.2.6'
26+
__version__ = '1.2.7'
2727
__author__ = 'Sean Rastatter'
2828
__credits__ = 'Google'

google_cloud_automlops/provisioning/terraform/templates/environment/outputs.tf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ output "create_storage_bucket_names" {
2424
description = "Bucket names."
2525
value = google_storage_bucket.storage_bucket.name
2626
}
27-
{% if source_repo_type == 'cloud-source-repositories' %}
27+
{% if use_ci %}{% if source_repo_type == 'cloud-source-repositories' %}
2828
output "create_cloud_source_repository" {
2929
description = "Cloud Source Repository name."
3030
value = var.source_repo_name
3131
}
32-
{% endif %}{% if use_ci %}{% if pipeline_job_submission_service_type == 'cloud-run' %}
32+
{% endif %}{% if pipeline_job_submission_service_type == 'cloud-run' %}
3333
output "cloud_run_id" {
3434
description = "ID of the created service."
3535
value = module.cloud_run

google_cloud_automlops/provisioning/terraform/templates/environment/versions.tf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ terraform {
1212
}
1313
}
1414
backend "gcs" {
15-
bucket = "{{storage_bucket_name}}-bucket-tfstate"
15+
bucket = "{{storage_bucket_name}}-tfstate"
1616
prefix = "terraform/state"
1717
}
1818
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{{generated_license}}
22
project_id = "{{project_id}}"
33
storage_bucket_location = "{{storage_bucket_location}}"
4-
storage_bucket_name = "{{storage_bucket_name}}-bucket-tfstate"
4+
storage_bucket_name = "{{storage_bucket_name}}-tfstate"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
setup(
2222
name='google-cloud-automlops',
23-
version='1.2.6',
23+
version='1.2.7',
2424
description='Build MLOps Pipelines in Minutes.',
2525
long_description=readme_contents,
2626
long_description_content_type='text/markdown',

tests/unit/provisioning/terraform/builder_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def test_create_environment_variables_tf_jinja(
422422

423423
@pytest.mark.parametrize(
424424
'storage_bucket_name, is_included, expected_output_snippets',
425-
[('my-storage-bucket', True, [GENERATED_LICENSE, 'bucket = "my-storage-bucket-bucket-tfstate"'])]
425+
[('my-storage-bucket', True, [GENERATED_LICENSE, 'bucket = "my-storage-bucket-tfstate"'])]
426426
)
427427
def test_create_environment_versions_tf_jinja(
428428
storage_bucket_name: str,

0 commit comments

Comments
 (0)