You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-25Lines changed: 12 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -64,8 +64,8 @@ Inferencing
64
64
- Artifact Registry
65
65
66
66
**Deployment Frameworks**: Builds component docker containers, compiles pipelines, and submits Pipeline Jobs
67
-
- Cloud Build
68
67
- Github Actions
68
+
- Cloud Build
69
69
-[coming soon] Gitlab CI
70
70
-[coming soon] Bitbucket Pipelines
71
71
-[coming soon] Jenkins
@@ -87,10 +87,10 @@ Inferencing
87
87
-[coming soon] pulumi
88
88
89
89
**Source Code Repositories**: Repository for versioning generated MLOps code
90
-
-[deprecating soon] Cloud Source Repositories
91
-
- Bitbucket
92
90
- Github
91
+
- Bitbucket
93
92
- Gitlab
93
+
-[deprecated] Cloud Source Repositories
94
94
95
95
# Prerequisites
96
96
### Generate
@@ -122,11 +122,6 @@ In order to use `AutoMLOps.deploy(...)` with `use_ci=True`, the following are re
122
122
git config --global user.name "Your Name"
123
123
```
124
124
- Registered and setup your SSH key if you are using Github, Gitlab, or Bitbucket
125
-
-[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/provide-credentials-adc) are set up if you are using Cloud Source Repositories. This can be done through the following commands:
126
-
```
127
-
gcloud auth application-default login
128
-
gcloud config set account <account@example.com>
129
-
```
130
125
131
126
### Monitor
132
127
In order to use `AutoMLOps.monitor(...)`, the following are required:
@@ -170,10 +165,7 @@ AutoMLOps will makes use of the following products based on user selected option
170
165
6. if `use_ci=True` and `schedule_pattern` is specified, AutoMLOps will use:
AutoMLOps will create the following service account and update [IAM permissions](https://cloud.google.com/iam/docs/understanding-roles) during the provision step:
@@ -324,7 +314,7 @@ A description of the parameters is below:
324
314
-`workload_identity_provider`: Provider for workload identity federation.
325
315
-`workload_identity_service_account`: Service account for workload identity federation (specify the full string).
326
316
327
-
AutoMLOps will generate the resources specified by these parameters (e.g. Artifact Registry, Cloud Source Repo, etc.). If use_ci is set to True, AutoMLOps will turn the outputted AutoMLOps/ directory into a Git repo and use it for the source repo. If a cron formatted str is given as an arg for `schedule_pattern` then it will set up a Cloud Schedule to run accordingly. If `setup_model_monitoring` is set to true, a model_monitoring/ directory will be created and a monitoring section will be added to config/defaults.yaml with empty values. These values are then set by running `AutoMLOps.monitor()`.
317
+
AutoMLOps will generate the resources specified by these parameters (e.g. Artifact Registry, GCS bucket, etc.). If use_ci is set to True, AutoMLOps will turn the outputted AutoMLOps/ directory into a Git repo and use it for the source repo. If a cron formatted str is given as an arg for `schedule_pattern` then it will set up a Cloud Schedule to run accordingly. If `setup_model_monitoring` is set to true, a model_monitoring/ directory will be created and a monitoring section will be added to config/defaults.yaml with empty values. These values are then set by running `AutoMLOps.monitor()`.
328
318
329
319
# Generating Code
330
320
@@ -385,11 +375,6 @@ AutoMLOps currently provides 2 primary options for provisioning infrastructure:
385
375
### Cloud Continuous Integration and Continuous Deployment Workflow
386
376
If `use_ci=True`, AutoMLOps will generate and use a fully featured CI/CD environment for the pipeline. Otherwise, it will use the local scripts to build and run the pipeline. In the diagrams below dashed boxes show areas users can select and customize their tooling.
The steps below are required in order to deploy a model using the AutoMLOps package. The process below assumes that the [AutoMLOps](https://github.com/GoogleCloudPlatform/automlops) package is already installed in the environment where the AutoMLOps execution cells are being run.
4
+
5
+
## **Create a Repository**
6
+
7
+
Go to Github, and create a new repository leaving fields as default. Let’s call it automlops-test.
Follow [this guide](https://docs.github.com/en/authentication/connecting-to-github-with-ssh) on how to add your SSH keys to the environment from where you are running the AutoMLOps commands.
26
+
27
+
## **Pre-requisites**
28
+
29
+
Ensure that you have the following IAM Roles to provision an Identity Pool:
30
+
31
+
* roles/iam.workloadIdentityPoolAdmin
32
+
33
+
**Set up [Workload Identity Federation](https://cloud.google.com/iam/docs/workload-identity-federation) (WIF) for GitHub Actions**
5. Grant identity pool access to the SA, following the instructions at [this link](https://cloud.google.com/iam/docs/workload-download-cred-and-grant-access?_gl=1*1qn8wpp*_ga*MTU3MjE2NjAzMy4xNzA2NzI1NDU0*_ga_WH2QY8WWF5*MTczMDM4MzY1MC41OS4xLjE3MzAzODQ2NTUuNjAuMC4w#service-account-in-the-same-project).
103
+
1. Option 1
104
+
1. Select “+ Grant Access” at the top of the Identity Pool view
105
+
2. Check “Grant access using Service Account impersonation”
106
+
3. Select the service account you just created
107
+
4. For the attribute name, select “repository”
108
+
5. For the attribute value, write full name of your repo e.g. “Akhan221/automlops-test”
109
+
6. Click Save
110
+
2. Option 2
111
+
1. Navigate to IAM \-\> Service Accounts, select the desired service account from the list
112
+
2. Select “Permissions” from the top menu
113
+
3. Select “+ Grant Access”
114
+
4. Add the principal that aligns to the Identity Pool
"AutoMLOps will create the following service account and update [IAM permissions](https://cloud.google.com/iam/docs/understanding-roles) during the provision step:\n",
@@ -130,7 +129,6 @@
130
129
"- Vertex AI\n",
131
130
"- Artifact Registry\n",
132
131
"- Cloud Storage\n",
133
-
"- Cloud Source Repository\n",
134
132
"- Cloud Build\n",
135
133
"- Cloud Run\n",
136
134
"- Cloud Scheduler\n",
@@ -562,7 +560,7 @@
562
560
"metadata": {},
563
561
"source": [
564
562
"## Generate and Run the pipeline\n",
565
-
"`AutoMLOps.generate(...)` generates the MLOps codebase. Users can specify the tooling and technologies they would like to use in their MLOps pipeline."
563
+
"`AutoMLOps.generate(...)` generates the MLOps codebase. Users can specify the tooling and technologies they would like to use in their MLOps pipeline. If you are interested in integrating with Github and Github Actions, please follow the setup steps in [this doc](../../docs/Using%20Github%20With%20AMO.md) and uncomment the relevant code block below."
566
564
]
567
565
},
568
566
{
@@ -588,12 +586,29 @@
588
586
}
589
587
],
590
588
"source": [
589
+
"# Setup using local scripts and cloudbuild:\n",
591
590
"AutoMLOps.generate(project_id=PROJECT_ID,\n",
592
591
" pipeline_params=pipeline_params,\n",
593
-
" use_ci=True,\n",
592
+
" use_ci=False,\n",
594
593
" naming_prefix=MODEL_ID,\n",
595
-
" schedule_pattern='59 11 * * 0' # rerun every Sunday at Midnight\n",
596
-
")"
594
+
" deployment_framework='cloud-build',\n",
595
+
")\n",
596
+
"\n",
597
+
"# # Setup using Github, Github Actions, and Terraform:\n",
598
+
"# AutoMLOps.generate(project_id=PROJECT_ID,\n",
599
+
"# pipeline_params=pipeline_params,\n",
600
+
"# naming_prefix=MODEL_ID,\n",
601
+
"# schedule_pattern='59 11 * * 0', # retrain every Sunday at Midnight\n",
0 commit comments