Skip to content

Commit 122b12e

Browse files
Add Aqua Verification - CLI Help (#614)
* Add Aqua Verification Help * Add billing link
1 parent 2769ef7 commit 122b12e

File tree

2 files changed

+161
-2
lines changed

2 files changed

+161
-2
lines changed

ai-quick-actions/policies/README.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [Setting Up Policies Manually](#setting-up-policies-manually)
88
- [Dynamic Groups](#dynamic-groups)
99
- [Policies](#policies-1)
10+
- [Aqua Policy Verification Tool](#aqua-policy-verification-tool)
1011

1112

1213
---
@@ -121,6 +122,163 @@ These policies and dynamic groups set up the necessary permissions to enable AI
121122
> **Note:** To save fine-tuned models, versioning has to be enabled in the selected Object Storage bucket. See [here](https://docs.oracle.com/iaas/data-science/using/ai-quick-actions-fine-tuning.htm) for more information.
122123
123124
![Setup 3](../web_assets/policies3.png)
125+
126+
## Aqua Policy Verification Tool
127+
128+
The **Aqua Policy Verification Tool** is a command-line utility designed to **validate IAM policies** required to use key features of AI Quick action (AQUA) platform.
129+
130+
It simulates actual operations — like registering models, creating job runs, or accessing object storage — to determine whether the currently configured IAM user/group has sufficient permissions.
131+
132+
Before running real workloads (deploying, fine-tuning, etc.), users can verify they have the **right access privileges**. This tool provides:
133+
- Immediate feedback on missing policies
134+
- Policy hints to help fix permission issues
135+
136+
137+
### How to Use
138+
139+
To run the policy-checks from Notebook terminal:
140+
141+
```bash
142+
ads aqua verify_policies <operation> [OPTIONS]
143+
```
144+
145+
Where `<operation>` is one of:
146+
- `common_policies`
147+
- `model_register`
148+
- `model_deployment`
149+
- `evaluation`
150+
- `finetune`
151+
152+
153+
### Description of Policy Verification Operations
154+
155+
Each operation simulates certain actions in AQUA and checks whether those succeed. Here’s what each one does:
156+
157+
#### 1. `common_policies`
158+
159+
**Purpose**: Verifies basic **read-level permissions** across key Data Science resources.
160+
161+
**Simulated actions**:
162+
- Listing compartments
163+
- Listing models and model version sets
164+
- Listing jobs and job runs
165+
- Listing object storage buckets
166+
- Listing logging groups
167+
- Getting service limits
168+
169+
**Examples:**
170+
171+
```bash
172+
ads aqua verify_policies common_policies
173+
```
174+
175+
176+
#### 2. `model_register`
177+
178+
**Purpose**: Verifies ability to **register a model**, which includes writing artifacts to Object Storage.
179+
180+
**Simulated actions**:
181+
- Managing a specified Object Storage bucket
182+
- Registering a new model in the OCI Data Science platform
183+
- Deleting the test model (cleanup)
184+
185+
>**Note**: This operation will create and delete the following temporary resources, which may incur charges. [[See pricing]](https://www.oracle.com/artificial-intelligence/data-science/pricing/)
186+
> - A model with name `AQUA Policy Verification - Model` in OCI Data Science
187+
> - A test file with name `AQUA Policy Verification - OBJECT STORAGE` to your specified bucket. The model and object will be deleted after verification.
188+
189+
**Examples:**
190+
191+
```bash
192+
ads aqua verify_policies model_register
193+
```
194+
or
195+
```bash
196+
ads aqua verify_policies model_register --bucket my-model-artifacts-bucket
197+
```
198+
199+
200+
#### 3. `model_deployment`
201+
202+
**Purpose**: Verifies ability to **deploy a model** after registration.
203+
204+
**Simulated actions**:
205+
- Registering a model (same as `model_register`)
206+
- Creating a model deployment
207+
- Deleting the deployment and the model (cleanup)
208+
209+
> **Note**: This operation will create and delete the following temporary resources, which may incur charges. [[See pricing]](https://www.oracle.com/artificial-intelligence/data-science/pricing/):
210+
> - A model with name `AQUA Policy Verification - Model`
211+
> - A test file with name `AQUA Policy Verification - OBJECT STORAGE` to your specified bucket.
212+
> - A model deployment named `AQUA Policy Verification - Model Deployment`
213+
> These will be deleted after verification is complete.
214+
215+
**Examples:**
216+
217+
```bash
218+
ads aqua verify_policies model_deployment
219+
```
220+
or
221+
```bash
222+
ads aqua verify_policies model_deployment --bucket my-model-bucket
223+
```
224+
225+
#### 4. `evaluation`
226+
227+
**Purpose**: Verifies policies required for **evaluation workflows**, such as automated testing or validation.
228+
229+
**Simulated actions**:
230+
- Creating and deleting a Model Version Set (MVS)
231+
- Registering a model
232+
- Running a job and job run
233+
- Deleting all test resources
234+
235+
> **Note**: This operation will create and delete the following temporary resources, which may incur charges. [[See pricing]](https://www.oracle.com/artificial-intelligence/data-science/pricing/):
236+
> - A **Model Version Set** named `AQUA Policy Verification - Model Version Set`
237+
> - A model with name `AQUA Policy Verification - Model`
238+
> - A test file with name `AQUA Policy Verification - OBJECT STORAGE` to your specified bucket.
239+
> - A test model (as in `model_register`)
240+
> - A **Job** and **Job Run** named `AQUA Policy Verification - Job` and `AQUA Policy Verification - Job Run`
241+
242+
**Examples:**
243+
244+
```bash
245+
ads aqua verify_policies evaluation
246+
```
247+
or
248+
```bash
249+
ads aqua verify_policies evaluation --bucket eval-bucket
250+
```
251+
252+
253+
#### 5. `finetune`
254+
255+
**Purpose**: Verifies whether you can run a **fine-tuning workflow**, typically involving training jobs, storage, and networking.
256+
257+
**Simulated actions**:
258+
- Validates bucket access (datasets, scripts, model output)
259+
- Optionally verifies subnet access for job runs
260+
- Creates and deletes MVS
261+
- Runs finetune jobs
262+
263+
> **Note**: This operation will create and delete the following temporary resources, which may incur charges. [[See pricing]](https://www.oracle.com/artificial-intelligence/data-science/pricing/):
264+
> - A **Model Version Set** named `AQUA Policy Verification - Model Version Set`
265+
> - A test file with name `AQUA Policy Verification - OBJECT STORAGE` to your specified bucket.
266+
> - A **Job** and **Job Run** named `AQUA Policy Verification - Job` and `AQUA Policy Verification - Job Run`
267+
268+
**Examples:**
269+
270+
```bash
271+
ads aqua verify_policies finetune
272+
```
273+
or
274+
```bash
275+
ads aqua verify_policies finetune --bucket fine-tune-data --ignore_subnet
276+
```
277+
or
278+
```bash
279+
ads aqua verify_policies finetune --bucket fine-tune-data --subnet_id ocid1.subnet.oc1..examplesubnetID
280+
```
281+
124282
- [Home](../README.md)
125283
- [CLI](../cli-tips.md)
126284
- [Model Deployment](../model-deployment-tips.md)

ai-quick-actions/troubleshooting-tips.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ TODO
165165
Authorization issues arise due to missing policy and/or using non-versioned OCI Object Storage Buckets with AQUA.
166166
1. Set up policies for AQUA as seen [here](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/policies/README.md)
167167
- We strongly encourage using ORM option (automated setup of policies, not manual) mentioned in the policy document.
168-
2. The notebook session has to be in the **same compartment** as the one defined by the dynamic group.
168+
2. Verify the policies by running AQUA verification tool as mention [here](../ai-quick-actions/policies/README.md#aqua-policy-verification-tool)
169+
3. The notebook session has to be in the **same compartment** as the one defined by the dynamic group.
169170
- The dynamic group definition used while setting up ORM stack identifies the notebook from where AI Quick Actions is being used.
170-
3. Ensure that the bucket used with AQUA has object versioning enabled
171+
4. Ensure that the bucket used with AQUA has object versioning enabled
171172

172173
![object versioning](./web_assets/object-versioning.png)
173174

0 commit comments

Comments
 (0)