Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev -> Main #1

Merged
merged 2 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.DS_Store
.AppleDouble
.LSOverride

.idea
# Icon must end with two \r
Icon

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ Follow the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule). If you'd
like more specific guidelines, see the [Contributor Covenant Code of Conduct][COC].

[OCA]: https://oca.opensource.oracle.com
[COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/
[COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/
51 changes: 31 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
# TITLE
# OCI Data science AI Quick actions - Demo.

[![License: UPL](https://img.shields.io/badge/license-UPL-green)](https://img.shields.io/badge/license-UPL-green) [![Quality gate](https://sonarcloud.io/api/project_badges/quality_gate?project=oracle-devrel_test)](https://sonarcloud.io/dashboard?id=oracle-devrel_test)
`AI Quick Actions` are a suite of actions that together can be used to deploy, evaluate and fine tune foundation models in OCI Data Science. AI Quick Actions target a user who wants to quickly leverage the capabilities of AI. They aim to expand the reach of foundation models to a broader set of users by providing a streamlined, code-free and efficient environment for working with foundation models. AI Quick Actions can be accessed from the Data Science Notebook. [Read more](https://docs.oracle.com/en-us/iaas/data-science/using/ai-quick-actions.htm)

## THIS IS A NEW, BLANK REPO THAT IS NOT READY FOR USE YET. PLEASE CHECK BACK SOON!
## Procedure to use AI Quick actions.

## Introduction
MISSING
1. [Validate Service Limits.](docs/limits.md)
1. [Policies.](docs/policies.md)
1. [Enable Quick action.](docs/notebook.md)
1. [Deploy service curated model.](docs/deployments.md)
1. [Access a deployed model.](docs/use_deployed_model.md)
1. [Register and use models.](docs/register_use_model.md)
1. [Fine tune a model.](docs/finetune.md)
1. [Evaluate a model.](docs/evaluations.md)
1. [Read more.](docs/oci_ads.md)

## Getting Started
MISSING
## Read more

### Prerequisites
MISSING

## Notes/Issues
MISSING

## URLs
* Nothing at this time
- https://blogs.oracle.com/ai-and-datascience/post/ai-quick-actions-in-oci-data-science
- https://docs.oracle.com/en-us/iaas/data-science/using/ai-quick-actions.htm

## Contributing
<!-- If your project has specific contribution requirements, update the
CONTRIBUTING.md file to ensure those requirements are clearly explained. -->

This project welcomes contributions from the community. Before submitting a pull
request, please [review our contribution guide](./CONTRIBUTING.md).


## Security

Please consult the [security guide](./SECURITY.md) for our responsible security
vulnerability disclosure process.

## Contributors

Author: [Rahul M R.](https://github.com/RahulMR42)

Last release: Aug 2024


## Credits

- [Oracle Cloud Infrastructure AI Quick actions Github samples](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/README.md).
- [Oracle Cloud Infrastructure AI Quick actions documentation](https://docs.oracle.com/en-us/iaas/data-science/using/ai-quick-actions.htm).

## License
Copyright (c) 2024 Oracle and/or its affiliates.

Copyright (c) 2024 Oracle and/or its affiliates.
Licensed under the Universal Permissive License (UPL), Version 1.0.

See [LICENSE](LICENSE.txt) for more details.
See [LICENSE](LICENSE) for more details.

ORACLE AND ITS AFFILIATES DO NOT PROVIDE ANY WARRANTY WHATSOEVER, EXPRESS OR IMPLIED, FOR ANY SOFTWARE, MATERIAL OR CONTENT OF ANY KIND CONTAINED OR PRODUCED WITHIN THIS REPOSITORY, AND IN PARTICULAR SPECIFICALLY DISCLAIM ANY AND ALL IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. FURTHERMORE, ORACLE AND ITS AFFILIATES DO NOT REPRESENT THAT ANY CUSTOMARY SECURITY REVIEW HAS BEEN PERFORMED WITH RESPECT TO ANY SOFTWARE, MATERIAL OR CONTENT CONTAINED OR PRODUCED WITHIN THIS REPOSITORY. IN ADDITION, AND WITHOUT LIMITING THE FOREGOING, THIRD PARTIES MAY HAVE POSTED SOFTWARE, MATERIAL OR CONTENT TO THIS REPOSITORY WITHOUT ANY REVIEW. USE AT YOUR OWN RISK.
ORACLE AND ITS AFFILIATES DO NOT PROVIDE ANY WARRANTY WHATSOEVER, EXPRESS OR IMPLIED, FOR ANY SOFTWARE, MATERIAL OR CONTENT OF ANY KIND CONTAINED OR PRODUCED WITHIN THIS REPOSITORY, AND IN PARTICULAR SPECIFICALLY DISCLAIM ANY AND ALL IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. FURTHERMORE, ORACLE AND ITS AFFILIATES DO NOT REPRESENT THAT ANY CUSTOMARY SECURITY REVIEW HAS BEEN PERFORMED WITH RESPECT TO ANY SOFTWARE, MATERIAL OR CONTENT CONTAINED OR PRODUCED WITHIN THIS REPOSITORY. IN ADDITION, AND WITHOUT LIMITING THE FOREGOING, THIRD PARTIES MAY HAVE POSTED SOFTWARE, MATERIAL OR CONTENT TO THIS REPOSITORY WITHOUT ANY REVIEW. USE AT YOUR OWN RISK.
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ sufficiently hardened for production use.
[1]: mailto:[email protected]
[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
[3]: https://www.oracle.com/security-alerts/encryptionkey.html
[4]: https://www.oracle.com/security-alerts/
[4]: https://www.oracle.com/security-alerts/
48 changes: 48 additions & 0 deletions docs/deployments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
### Deploy models using OCI AI Quick actions.

Under Models, you can find Model Explorer that shows all the foundation models supported by AI Quick Actions and your fine-tuned models. Under My models are service curated foundation models and models you have registered. Under Fine-tuned models are models you have fine-tuned. Under Ready-to-register models are models you can bring from Object Storage and register in AI Quick Actions.

##### Curated Models
Curated models have been tested by Data Science and the model artifacts are downloaded to a bucket in the service's object storage. They are ready to be used.

##### Ready-to-Register Models
Ready-to-Register models have been tested by Data Science, but the model artifacts must be downloaded to your Object Storage bucket and brought in to AI Quick Actions through the Model Registration process before they can be used.

#### Deploy a Curated model.

- From AI quick actions > `Models` > Click on model card

![](images/cm_deploy.png)

- Refer `README` for more details about the curated model. click `Deploy`

![](images/cm_rm.png)

- Select desired `Compute shape` , `Log group` and `Log name`

![](images/cm_deploy_shape.png)

- you may use `advanced options` to update details and can add parameters according to the inference containers (vLLM,TGI etc)

![](images/cm_deploy_advancedoptions.png)

- Wait for the model deployment to complete.

![](images/deploy_progress.png)

- You may use `View in Console` option to see the process in details.

![](images/view_console.png)
![](images/deploy_details_1.png)
- It may take several minutes (at least 5 to 7 mnts for a baremetal-based deployment) to complete the deployments

![](images/model_deployment_details.png)

- Please note that you will not be able to view or use the instance directly from the tenancy, as its deployed and securely served from OCI service managed tenancies.Respective GPU count limit will be used from User tenancy and the cost will be charged accordingly.


#### Read more
[Read more.](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/model-deployment-tips.md)


[⬅️ Notebooks](notebook.md)[🏠 Back to Home](../README.md) [➡️ Register and use models](register_use_model.md)
44 changes: 44 additions & 0 deletions docs/evaluations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
### Evaluate a deployed model using AI Quick actions.

The primary evaluation metric used by AI Quick Actions is BERTScore. This embedding-based metric assesses the semantic similarity between words in the model's response and the reference, rather than focusing on token-level syntactic similarity.

BERTScore aligns closely with human judgement. A model targeting text generation will likely score highly on BERTScore if it produces results that humans deem high-quality. For example, the following sentences are considered semantically similar:

"The cat quickly climbed up the tall tree to escape the pursuing dog." and "In an effort to evade the chasing canine, the feline ascended the lofty arboreal structure with speed." these sentences would receive low scores using BLEU or ROUGE due to the minimal overlap in words and phrases.


- OCI AI Quick actions > `Evaluations` > `Create evaluation`
- Provide name ,description and select an existing deployment.

![](images/eval1.png)

- Select all the evaluation that we need.
- Upload an evaluation date set from object storage

![](images/eval2.png)

- Create a or reuse an experiment name.
- Provide a bucket to store the output.

![](images/eval3.png)

- Click `Next`
- During evaluation, it runs inference against the deployment to validate . You may update the parameters accordingly

![](images/eval4.png)

- Validate and submit. the job runs for a while and provides the evaluation.

![](images/evaluation_progress.png)

- Once its completed , download the report to know more.

![](images/evaluation_result.png)
![](images/evaluation_report.png)



#### Read more
[Evaluation tips](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/evaluation-tips.md)

[⬅️ Register and use model](register_use_model.md)[🏠 Back to Home](../README.md) [➡️ Read more about ADS](oci_ads.md)
70 changes: 70 additions & 0 deletions docs/finetune.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
### Finetune a model using AI Quick actions.

Fine-tuning is the art of tailoring a pre-trained model to excel in specific tasks or domains. This customization is crucial because, despite their general proficiency, LLMs may not perform optimally on specialized tasks without further training. By fine-tuning an LLM on a domain-specific dataset, we can enhance its performance, making it more adept at understanding and responding to the nuances of that domain.

The primary method used by AI Quick Action for fine-tuning is Low-Rank Adaptation [LoRA](https://huggingface.co/docs/peft/main/en/conceptual_guides/lora). LoRA stands out as a parameter-efficient fine-tuning method that allows for the adaptation of pre-trained models to specific tasks without the need to retrain the entire model. This technique is particularly beneficial for those who wish to leverage the power of LLMs while operating within the constraints of limited computational resources.

⚡ **Attention**
OCI AI Quick actions a fine-tuning process will not validate, verify or correct the user data that will be used for the process. User must ensure and validate the all necessary facts before proceeding the fine tune job.The [sample file](../files/finetune_with_sm.jsonl) is made only for demo and instruction purpose only.The data with in it may be ambiguous or outdated



- Upload sample [dataset](../files/finetune_with_sm.jsonl) to the object storage.
- OCI AI Quick actions > `Model explore` > Select a model to fine tune.
- Click `Fine-Tune`

![](images/finetune_view.png)
- Provide a name and description.

![](images/tune-base.png)

- Select the `compartment` and `Object storage bucket` and the file name.

![](images/fine-jsonl-path.png)

- Create a `Version set` to logically group models.

![](images/version_set_create.png)

- Provide a bucket name (it can be the same bucket or another one) and path to store the fine-tuned model

![](images/fn-output-bucket.png)

- Select a desires `Instance shape`. If we select it will allows to select more than one replica. In such cases, we should provide Virtual cloud network and subnet to use as well as need to update policies to allow data science to use VCN family with in the compartment. If we are using Baremetal, it will allow us to use it with clustering

![](images/fn-replica.png)

- Select a `Logging group` and `Log` created.
- Update any `Hyperparameters` if needed. Refer [more about advanced configuration here](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/fine-tuning-tips.md#advanced-finetuning-options)

![](images/fn-advanced-config.png)

- Click `Next` ,validate and `Submit` the job.

![](images/fn-progress.png)

- Click `Open logs in terminal` to view the status of the finetune job. Upon clicking, it will open a new terminal and provide the job details.

![](images/fn-progress.png)

- The fine tune jobs runs in the background, the status can be checked at any time via console or using terminal view.

![](images/accelerate.png)

- Once its finished the model will be available under `Fine-tuned models`

![](images/fn-list-models.png)

- You can refer the Metric panel to validate the training loss.

The accuracy metric reflects the proportion of correct completions made by the model on a given dataset. A higher accuracy indicates that the model is performing well in terms of making correct completions. On the other hand, the loss metric represents the model's error. It quantifies how far the model's completions are from the actual target completions. The goal during training is to minimize this loss function, which typically involves optimizing the model's weights to reduce the error on the training data.

As the training progresses, monitoring both accuracy and loss provides insights into the model's learning dynamics. A decreasing loss alongside increasing accuracy suggests that the model is learning effectively. However, it's important to watch for signs of over-fitting, where the model performs exceptionally well on the training data but fails to generalize to new, unseen data. This can be detected if the validation loss stops decreasing or starts increasing, even as training loss continues to decline.

![](images/epoch_table.png)

#### Read more
[Fine-tune tips](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/fine-tuning-tips.md)



Binary file added docs/images/accelerate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/aqua_extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cm_deploy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cm_deploy_advancedoptions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cm_deploy_shape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cm_rm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/create_bucket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/create_custom_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/create_loggroup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/deploy_details_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/deploy_progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/dgs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/download_from_hf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ds_project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/epoch_table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/eval1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/eval2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/eval3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/eval4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/evaluation_progress.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/evaluation_report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/evaluation_result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/fine-jsonl-path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/finetune_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/fn-advanced-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/fn-list-models.png
Binary file added docs/images/fn-output-bucket.png
Binary file added docs/images/fn-progress.png
Binary file added docs/images/fn-replica.png
Binary file added docs/images/fn-terminal-view.png
Binary file added docs/images/hf_login.png
Binary file added docs/images/invoke_llm_details.png
Binary file added docs/images/invoke_llm_nb.png
Binary file added docs/images/limit2.png
Binary file added docs/images/limits1.png
Binary file added docs/images/ls-llms.png
Binary file added docs/images/model_deployment_details.png
Binary file added docs/images/model_endpoint.png
Binary file added docs/images/notebook1.png
Binary file added docs/images/object-files.png
Binary file added docs/images/open_nb.png
Binary file added docs/images/policies.png
Binary file added docs/images/register_llm.png
Binary file added docs/images/register_model.png
Binary file added docs/images/rms_config.png
Binary file added docs/images/test_your_model.png
Binary file added docs/images/tune-base.png
Binary file added docs/images/unreg_model.png
Binary file added docs/images/unregisteredmodel.png
Binary file added docs/images/upload_artifacts_to_os.png
Binary file added docs/images/use_register_llm.png
Binary file added docs/images/version_set_create.png
Binary file added docs/images/view_console.png
23 changes: 23 additions & 0 deletions docs/limits.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### Objective -Validate service limits.
- OCI Console > Tenancy Management > `Limits, Quotas and Usage`
- Ensure you are on the correct `OCI Region`.
- Select `Data Science` as `Service`.
- Select `Respective AD` as `Scope`.
- Search for `GPU` as `Resource` and select the desired limits.
- Select the `Tenancy name` as `Compartment`.

![](images/limits1.png)
![](images/limit2.png)

- Some of the common GPU limits are

```shell
- GPUs for GPU.A10 based VM and BM Instances
- GPUs for GPU.H100 based VM and BM Instances
- GPUs for GPU.A100 based VM and BM Instances
```
#### Read more
-[Data science service limits] (https://docs.oracle.com/en-us/iaas/Content/General/Concepts/servicelimits.htm#Data_Science_Limits)
- [Request service limit update](https://docs.public.oneportal.content.oci.oraclecloud.com/en-us/iaas/autonomous-database/doc/adbd-service-limit-increase.html)

[⬅️ Read Me](../README.md)[🏠 Back to Home](../README.md) [➡️ Policies](policies.md)
43 changes: 43 additions & 0 deletions docs/notebook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
### Create Data science notebook.

- OCI Console > `Analytics & AI` > `Data Science`
- Click `Create project`.

![](images/ds_project.png)

- Create a `Notebook session`.

![](images/notebook1.png)


### Create a custom logs.
- OCI Console > `Logging` > `Create Log Group`

![](images/create_loggroup.png)

- Under the `Log Group` > `Create custom log`

![](images/create_custom_log.png)
- Skip `Agent configuration` and create the custom log.

### Validate the notebook sessions.

- Go back the `Data science` > `Project`>`Note book` > `Open`

![](images/open_nb.png)

- Use proper credentials and open the notebook.
- Validate that the notebook has `AI quick actions` extension.

![](images/aqua_extension.png)

- Click `Extend` to extend the sessions.

**ℹ️ Information**

```shell
If you have active notebooks created from before the release of AI quick actions, to access AI quick actions from them, deactivate and reactivate them.
All notebooks created after the release of AI quick actions have AI quick actions available.
```

[⬅️ Policies](policies.md)[🏠 Back to Home](../README.md) [➡️ Deployments](deployments.md)
12 changes: 12 additions & 0 deletions docs/oci_ads.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Oracle Accelerated Data Science (ADS)

Oracle Accelerated Data Science (ADS) is maintained by the Oracle Cloud Infrastructure Data Science service team. It speeds up common data science activities by providing tools that automate and/or simplify common data science tasks, along with providing a data-scientist-friendly pythonic interface to Oracle Cloud Infrastructure (OCI) services, most notably OCI Data Science, Data Flow, Object Storage, and the Autonomous Database. ADS gives you an interface to manage the lifecycle of machine learning models, from data acquisition to model evaluation, interpretation, and model deployment.

####
- [Read more](https://accelerated-data-science.readthedocs.io/en/latest/)

- [ADS CLI Tips ](https://github.com/oracle-samples/oci-data-science-ai-samples/blob/main/ai-quick-actions/cli-tips.md)

- [ADS SDK](https://accelerated-data-science.readthedocs.io/en/latest/)

[⬅️ Evaluate model](evaluations.md)[🏠 Back to Home](../README.md)
24 changes: 24 additions & 0 deletions docs/policies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Policies to use OCI AI Quick actions.

- AI Quick actions needs policies set at the `root` of the tenancies.Ensue the users with which we are executing below steps has necessary permissions to manage dynamic groups and policies
- You may use OCI Stack to setup the policies - Details are [here.](https://docs.oracle.com/en-us/iaas/data-science/using/ai-quick-actions-policies.htm#ai-quick-actions-policies-terraform)
- strongly recommend to use `All policies` option with the RMS Stack.

![](images/rms_config.png)

- Or You may set the policies manually—Details are [here.](https://docs.oracle.com/en-us/iaas/data-science/using/ai-quick-actions-policies.htm#ai-quick-actions-manually-add-policies)
- When we use OCI RMS to set the policies, it will create 2 dynamic groups and 2 policies.

![](images/dgs.png)
![](images/policies.png)

- The Policies allow the AI quick actions to access other OCI resources via `resource principal` and allow to have cross tenancy access to consume the curated models from `service tenancies`
- Add below policies to one created (either by RMS stack or manual) to allow write access to object-storage for fine-tune operations.

```shell
Allow dynamic-group id <OCID of Dynamic group which has resource types as `datasciencenotebooksession`, `datasciencemodeldeployment` and `datasciencejobrun`> to manage object-family in compartment id <OCID of the OCI Compartment>
```
#### Read more
[Details about policies.](https://github.com/oracle-samples/oci-data-science-ai-samples/tree/main/ai-quick-actions/policies)

[⬅️ Limits](limits.md)[🏠 Back to Home](../README.md) [➡️Notebooks](notebook.md)
Loading