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
+32-2
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,6 @@ The service account used by the BigQuery connection chosen in Step 1 should have
25
25
- BigQuery Job User
26
26
- Vertex AI User
27
27
28
-
29
28
#### 3. Create BigQuery Dataset for ML Models
30
29
31
30
Create a dataset (e.g., `looker_bqml`) in the BigQuery connection's GCP project.
@@ -49,7 +48,7 @@ The application can be installed directly from [Looker Marketplace](https://mark
49
48
50
49
#### 5. Configure Application with User Attributes
51
50
52
-
The application uses three [Looker user attributes](https://cloud.google.com/looker/docs/admin-panel-users-user-attributes) to store its configuration settings. The following user attributes are required for the application to work properly. Each user attribute needs to be named exactly as listed below with a data type of `String`. The recommended setting for user access is `None`.
51
+
The application uses three [Looker user attributes](https://cloud.google.com/looker/docs/admin-panel-users-user-attributes) to store its configuration settings. The following user attributes are required for the application to work properly. Each user attribute needs to be named exactly as listed below with a data type of `String`. The recommended setting for user access is `View`.
53
52
54
53
Create the following user attributes and set their default values.
55
54
@@ -70,3 +69,34 @@ We recommend creating a new Looker role to easily manage user access to the appl
70
69
- Create a new Looker permission set named `ML Accelerator` containing all the permisions in the [default User permission set](https://cloud.google.com/looker/docs/admin-panel-users-roles#default_permission_sets) AND the `use_sql_runner` permission
71
70
- Create a new Looker role named `ML Accelerator` using the new model and permission set
72
71
- Assign the `ML Accelerator` role to Looker users and groups
72
+
73
+
#### 7. Setup AI-Generated Model Evaluation Summaries
74
+
75
+
After release 2.2, the application can use text generating AI to summarize the model evaluation to more clearly communicate model performance. This optional feature requires additional setup.
76
+
77
+
##### 7a: Add an External Connection from Bigquery to Vertex
78
+
In BigQuery, an [external connection](https://cloud.google.com/bigquery/docs/external-data-sources) is required to connect it to pre-trained models in Vertex AI. If one is not already set up, you must do so. A tutorial can also be found [here](https://cloud.google.com/bigquery/docs/generate-text-tutorial).
79
+
1. Under the same gcp project already in use for the application, verify the [BigQuery Connection](https://console.cloud.google.com/apis/library/bigqueryconnection.googleapis.com) and [Vertex AI](https://console.cloud.google.com/apis/library/aiplatform.googleapis.com) APIs are both enabled.
80
+
2. In BigQuery click “add,” then "Connections to external data sources."
81
+
3. Select "BigLake and remote function" and use the same location as the dataset already in use by the application
82
+
4. The ID will be the name of your connection. Since it could be used to connect to any number of pre-trained models in vertex it is wise to choose something generic, such as “ext-vertex-ai”
83
+
5. Create the connection
84
+
6. Go to the connection and copy the service account ID. In order to access remote functions from Vertex AI, the [BigQuery connection delegation service agent](https://cloud.google.com/iam/docs/service-agents#bigquery-connection-delegation-service-agent) (of the form bqcx-[#]@gcp-sa-bigquery-condel.iam.gserviceaccount.com) that is associated with this connection must have the "Vertex AI User" role, which can be added in IAM.
85
+
86
+
##### 7b: Create the Remote Text-Generation Model
87
+
88
+
In BigQuery, enter the following statement in the query editor (this code uses the suggested naming conventions for the the steps above and assumes region is US-Multi). The text-bison@002 model is suggested, but other LLM models with good performance generating text could also be used. The model_name will be later added as a User Attribute value. A suggestion for model_name is "mla-text-bison"
89
+
```
90
+
CREATE OR REPLACE MODEL project_id.dataset_id.model_name
91
+
REMOTE WITH CONNECTION `us.ext-vertex-ai`
92
+
OPTIONS (endpoint = 'text-bison@002');
93
+
```
94
+
This will take a few minutes to load and will not return any results.
95
+
96
+
##### 7c: Update the Relevant User Attribute
97
+
98
+
Similar to section 5 above.
99
+
100
+
|**Required User Attribute Name**|**Default Value Description**|
"description": "The GCP project ID for the BigQuery dataset where ML models will be saved.",
31
31
"type": "string",
32
32
"required": true,
33
33
"value_is_hidden": false,
34
-
"user_can_view": false,
34
+
"user_can_view": true,
35
35
"user_can_edit": false,
36
36
"default_value": ""
37
37
},
38
38
"bqml_model_dataset_name": {
39
-
"label": "Machine Learning Accelerator Setting: BQML Model Dataset Name",
39
+
"label": "BQML Model Dataset Name",
40
40
"description": "The dataset where ML models will be saved. Create a new dataset for BQML models (recommended) or choose the same dataset used for Looker PDTs.",
41
41
"type": "string",
42
42
"required": true,
43
43
"value_is_hidden": false,
44
-
"user_can_view": false,
44
+
"user_can_view": true,
45
+
"user_can_edit": false,
46
+
"default_value": ""
47
+
},
48
+
"generate_text_model_name": {
49
+
"label": "GenAI Text Model Name",
50
+
"description": "Name of an LLM model to generate text summaries (optional feature). Must be in same dataset as above. See https://github.com/looker-open-source/app-ml-accelerator/blob/main/README.md#7-setup-ai-generated-evaluation-summaries for setup instructions.",
0 commit comments