|
1105 | 1105 | "metadata": {},
|
1106 | 1106 | "outputs": [],
|
1107 | 1107 | "source": [
|
1108 |
| - "!pip3 install kfp<2.0.0 google-cloud-aiplatform" |
| 1108 | + "!pip3 install \"kfp<2.0.0\" google-cloud-aiplatform" |
1109 | 1109 | ]
|
1110 | 1110 | },
|
1111 | 1111 | {
|
|
1118 | 1118 | },
|
1119 | 1119 | {
|
1120 | 1120 | "cell_type": "code",
|
1121 |
| - "execution_count": 13, |
| 1121 | + "execution_count": 7, |
1122 | 1122 | "id": "36329f82",
|
1123 | 1123 | "metadata": {},
|
1124 | 1124 | "outputs": [],
|
|
1139 | 1139 | },
|
1140 | 1140 | {
|
1141 | 1141 | "cell_type": "code",
|
1142 |
| - "execution_count": 14, |
| 1142 | + "execution_count": 8, |
1143 | 1143 | "id": "cf82f09f",
|
1144 | 1144 | "metadata": {},
|
1145 | 1145 | "outputs": [
|
|
1166 | 1166 | },
|
1167 | 1167 | {
|
1168 | 1168 | "cell_type": "code",
|
1169 |
| - "execution_count": 15, |
| 1169 | + "execution_count": 17, |
1170 | 1170 | "id": "89b82a23",
|
1171 | 1171 | "metadata": {},
|
1172 | 1172 | "outputs": [],
|
|
1176 | 1176 | " 'google-cloud-bigquery', \n",
|
1177 | 1177 | " 'pandas',\n",
|
1178 | 1178 | " 'pyarrow',\n",
|
1179 |
| - " 'db_dtypes'\n", |
| 1179 | + " 'db_dtypes',\n", |
| 1180 | + " 'appengine-python-standard'\n", |
1180 | 1181 | " ],\n",
|
1181 | 1182 | " output_component_file=f'{AutoMLOps.OUTPUT_DIR}/create_dataset.yaml'\n",
|
1182 | 1183 | ")\n",
|
|
1235 | 1236 | },
|
1236 | 1237 | {
|
1237 | 1238 | "cell_type": "code",
|
1238 |
| - "execution_count": 16, |
| 1239 | + "execution_count": 18, |
1239 | 1240 | "id": "4f1a3660",
|
1240 | 1241 | "metadata": {},
|
1241 | 1242 | "outputs": [],
|
|
1295 | 1296 | },
|
1296 | 1297 | {
|
1297 | 1298 | "cell_type": "code",
|
1298 |
| - "execution_count": 17, |
| 1299 | + "execution_count": 19, |
1299 | 1300 | "id": "aa8047d6",
|
1300 | 1301 | "metadata": {},
|
1301 | 1302 | "outputs": [],
|
|
1363 | 1364 | },
|
1364 | 1365 | {
|
1365 | 1366 | "cell_type": "code",
|
1366 |
| - "execution_count": 18, |
| 1367 | + "execution_count": 20, |
1367 | 1368 | "id": "01996d4c",
|
1368 | 1369 | "metadata": {},
|
1369 | 1370 | "outputs": [],
|
|
1399 | 1400 | },
|
1400 | 1401 | {
|
1401 | 1402 | "cell_type": "code",
|
1402 |
| - "execution_count": 19, |
| 1403 | + "execution_count": 21, |
1403 | 1404 | "id": "bc244ca7",
|
1404 | 1405 | "metadata": {},
|
1405 | 1406 | "outputs": [],
|
|
1424 | 1425 | },
|
1425 | 1426 | {
|
1426 | 1427 | "cell_type": "code",
|
1427 |
| - "execution_count": 12, |
| 1428 | + "execution_count": 22, |
1428 | 1429 | "id": "6f8282e3",
|
1429 | 1430 | "metadata": {},
|
1430 | 1431 | "outputs": [
|
|
1434 | 1435 | "text": [
|
1435 | 1436 | "Writing directories under AutoMLOps/\n",
|
1436 | 1437 | "Writing configurations to AutoMLOps/configs/defaults.yaml\n",
|
1437 |
| - "Writing Kubeflow Pipelines code to AutoMLOps/pipelines, AutoMLOps/components, AutoMLOps/services\n", |
1438 | 1438 | "Writing README.md to AutoMLOps/README.md\n",
|
| 1439 | + "Writing kubeflow pipelines code to AutoMLOps/pipelines, AutoMLOps/components\n", |
1439 | 1440 | "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", |
1441 | 1444 | "Code Generation Complete.\n"
|
1442 | 1445 | ]
|
1443 | 1446 | }
|
|
1461 | 1464 | },
|
1462 | 1465 | {
|
1463 | 1466 | "cell_type": "code",
|
1464 |
| - "execution_count": 13, |
| 1467 | + "execution_count": 23, |
1465 | 1468 | "id": "2d66e453",
|
1466 | 1469 | "metadata": {},
|
1467 | 1470 | "outputs": [
|
|
1470 | 1473 | "output_type": "stream",
|
1471 | 1474 | "text": [
|
1472 | 1475 | "WARNING: Provisioning requires these permissions:\n",
|
1473 |
| - "-cloudfunctions.functions.get\n", |
1474 |
| - "-serviceusage.services.use\n", |
1475 | 1476 | "-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", |
1482 | 1480 | "-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", |
1484 | 1487 | "-pubsub.subscriptions.create\n",
|
1485 |
| - "-cloudscheduler.jobs.create\n", |
1486 |
| - "-storage.buckets.create\n", |
1487 |
| - "-source.repos.create\n", |
1488 | 1488 | "-artifactregistry.repositories.list\n",
|
1489 |
| - "-cloudbuild.builds.create\n", |
| 1489 | + "-artifactregistry.repositories.create\n", |
1490 | 1490 | "-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", |
1493 | 1498 | "\n",
|
1494 | 1499 | "You are currently using: srastatter@google.com. Please check your account permissions.\n",
|
1495 | 1500 | "The following are the recommended roles for provisioning:\n",
|
| 1501 | + "-roles/serviceusage.serviceUsageAdmin\n", |
1496 | 1502 | "-roles/resourcemanager.projectIamAdmin\n",
|
1497 |
| - "-roles/cloudfunctions.admin\n", |
1498 |
| - "-roles/artifactregistry.admin\n", |
1499 | 1503 | "-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", |
1503 | 1506 | "-roles/pubsub.editor\n",
|
1504 |
| - "-roles/source.admin\n", |
| 1507 | + "-roles/artifactregistry.admin\n", |
1505 | 1508 | "-roles/cloudbuild.builds.editor\n",
|
| 1509 | + "-roles/cloudscheduler.admin\n", |
| 1510 | + "-roles/cloudfunctions.admin\n", |
| 1511 | + "-roles/source.admin\n", |
1506 | 1512 | "\n",
|
1507 | 1513 | "\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", |
1509 | 1515 | "\u001b[0;32m Setting up Artifact Registry in project automlops-sandbox \u001b[0m\n",
|
1510 | 1516 | "Listing items under project automlops-sandbox, location us-central1.\n",
|
1511 | 1517 | "\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", |
1513 | 1519 | "Artifact Registry: dry-beans-dt-artifact-registry already exists in project automlops-sandbox\n",
|
1514 | 1520 | "\u001b[0;32m Setting up Storage Bucket in project automlops-sandbox \u001b[0m\n",
|
1515 | 1521 | "gs://automlops-sandbox-dry-beans-dt-bucket/\n",
|
|
1519 | 1525 | "Service Account: vertex-pipelines already exists in project automlops-sandbox\n",
|
1520 | 1526 | "\u001b[0;32m Setting up IAM roles for Pipeline Job Runner Service Account in project automlops-sandbox \u001b[0m\n",
|
1521 | 1527 | "\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", |
1523 | 1529 | "Cloud Source Repository: dry-beans-dt-repository already exists in project automlops-sandbox\n",
|
1524 | 1530 | "\u001b[0;32m Setting up Queueing Service in project automlops-sandbox \u001b[0m\n",
|
1525 | 1531 | "name: projects/automlops-sandbox/topics/dry-beans-dt-queueing-svc\n",
|
1526 | 1532 | "Pub/Sub Topic: dry-beans-dt-queueing-svc already exists in project automlops-sandbox\n",
|
1527 | 1533 | "\u001b[0;32m Deploying Cloud Functions: dry-beans-dt-job-submission-svc in project automlops-sandbox \u001b[0m\n",
|
1528 | 1534 | "Deploying function (may take a while - up to 2 minutes)...\n",
|
1529 | 1535 | "..\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", |
1532 | 1538 | "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", |
1536 | 1543 | "entryPoint: process_request\n",
|
1537 | 1544 | "eventTrigger:\n",
|
1538 | 1545 | " eventType: google.pubsub.topic.publish\n",
|
|
1546 | 1553 | "name: projects/automlops-sandbox/locations/us-central1/functions/dry-beans-dt-job-submission-svc\n",
|
1547 | 1554 | "runtime: python39\n",
|
1548 | 1555 | "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", |
1550 | 1557 | "status: ACTIVE\n",
|
1551 | 1558 | "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", |
1554 | 1561 | "\u001b[0;32m Setting up Cloud Build Trigger in project automlops-sandbox \u001b[0m\n",
|
1555 | 1562 | "name: dry-beans-dt-build-trigger\n",
|
1556 | 1563 | "Cloudbuild Trigger already exists in project automlops-sandbox for repo dry-beans-dt-repository\n",
|
|
1574 | 1581 | },
|
1575 | 1582 | {
|
1576 | 1583 | "cell_type": "code",
|
1577 |
| - "execution_count": 14, |
| 1584 | + "execution_count": 24, |
1578 | 1585 | "id": "e92f3e51",
|
1579 | 1586 | "metadata": {
|
1580 | 1587 | "scrolled": false
|
|
1585 | 1592 | "output_type": "stream",
|
1586 | 1593 | "text": [
|
1587 | 1594 | "WARNING: Running precheck for deploying requires these permissions:\n",
|
1588 |
| - "-artifactregistry.repositories.get\n", |
1589 |
| - "-cloudbuild.builds.get\n", |
| 1595 | + "-serviceusage.services.get\n", |
1590 | 1596 | "-resourcemanager.projects.getIamPolicy\n",
|
1591 | 1597 | "-storage.buckets.update\n",
|
1592 |
| - "-serviceusage.services.get\n", |
1593 |
| - "-cloudfunctions.functions.get\n", |
1594 |
| - "-pubsub.topics.get\n", |
1595 | 1598 | "-iam.serviceAccounts.get\n",
|
1596 |
| - "-source.repos.update\n", |
| 1599 | + "-artifactregistry.repositories.get\n", |
| 1600 | + "-pubsub.topics.get\n", |
1597 | 1601 | "-pubsub.subscriptions.get\n",
|
| 1602 | + "-cloudbuild.builds.get\n", |
| 1603 | + "-cloudfunctions.functions.get\n", |
| 1604 | + "-source.repos.update\n", |
1598 | 1605 | "\n",
|
1599 | 1606 | "You are currently using: srastatter@google.com. Please check your account permissions.\n",
|
1600 | 1607 | "The following are the recommended roles for deploying with precheck:\n",
|
1601 | 1608 | "-roles/serviceusage.serviceUsageViewer\n",
|
1602 | 1609 | "-roles/iam.roleViewer\n",
|
1603 |
| - "-roles/pubsub.viewer\n", |
1604 | 1610 | "-roles/storage.admin\n",
|
1605 |
| - "-roles/cloudbuild.builds.editor\n", |
1606 |
| - "-roles/source.writer\n", |
1607 | 1611 | "-roles/iam.serviceAccountUser\n",
|
1608 |
| - "-roles/cloudfunctions.viewer\n", |
1609 | 1612 | "-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", |
1610 | 1617 | "\n",
|
1611 | 1618 | "Checking for required API services in project automlops-sandbox...\n",
|
1612 | 1619 | "Checking for Artifact Registry in project automlops-sandbox...\n",
|
|
1620 | 1627 | "Checking for Cloud Build Trigger in project automlops-sandbox...\n",
|
1621 | 1628 | "Precheck successfully completed, continuing to deployment.\n",
|
1622 | 1629 | "\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", |
1628 | 1633 | "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", |
1630 | 1635 | "Pushing code to automlops branch, triggering build...\n",
|
1631 | 1636 | "Cloud Build job running at: https://console.cloud.google.com/cloud-build/builds;region=us-central1\n",
|
1632 | 1637 | "Please wait for this build job to complete.\n",
|
|
1658 | 1663 | "AutoMLOps.deploy(precheck=True, # precheck is optional, defaults to True\n",
|
1659 | 1664 | " hide_warnings=False) # hide_warnings is optional, defaults to True"
|
1660 | 1665 | ]
|
| 1666 | + }, |
| 1667 | + { |
| 1668 | + "cell_type": "code", |
| 1669 | + "execution_count": null, |
| 1670 | + "id": "41d0309f", |
| 1671 | + "metadata": {}, |
| 1672 | + "outputs": [], |
| 1673 | + "source": [] |
1661 | 1674 | }
|
1662 | 1675 | ],
|
1663 | 1676 | "metadata": {
|
|
0 commit comments