Skip to content

Commit

Permalink
replace ptn modules azd/ml-project and azd/ml-hub-dependencies
Browse files Browse the repository at this point in the history
Remove line breaks

Adjust the position of module and resource
  • Loading branch information
Menghua1 committed Oct 12, 2024
1 parent 33e0a96 commit ea4fd9c
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 56 deletions.
96 changes: 75 additions & 21 deletions avm/ptn/azd/ml-ai-environment/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Azure Machine Learning Environment `[Azd/MlAiEnvironment]`
# Azd Azure Machine Learning Environment `[Azd/MlAiEnvironment]`

Create Azure Machine Learning workspaces of type 'Hub' and 'Project' and their required dependencies.

Expand Down Expand Up @@ -61,14 +61,14 @@ Create Azure Machine Learning workspaces of type 'Hub' and 'Project' and their r
| `Microsoft.Storage/storageAccounts/blobServices` | [2022-09-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2022-09-01/storageAccounts/blobServices) |
| `Microsoft.Storage/storageAccounts/blobServices/containers` | [2022-09-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2022-09-01/storageAccounts/blobServices/containers) |
| `Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies` | [2022-09-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2022-09-01/storageAccounts/blobServices/containers/immutabilityPolicies) |
| `Microsoft.Storage/storageAccounts/fileServices` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/storageAccounts/fileServices) |
| `Microsoft.Storage/storageAccounts/fileServices` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2023-04-01/storageAccounts/fileServices) |
| `Microsoft.Storage/storageAccounts/fileServices/shares` | [2023-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2023-01-01/storageAccounts/fileServices/shares) |
| `Microsoft.Storage/storageAccounts/localUsers` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/storageAccounts/localUsers) |
| `Microsoft.Storage/storageAccounts/localUsers` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2023-04-01/storageAccounts/localUsers) |
| `Microsoft.Storage/storageAccounts/managementPolicies` | [2023-01-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2023-01-01/storageAccounts/managementPolicies) |
| `Microsoft.Storage/storageAccounts/queueServices` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/storageAccounts/queueServices) |
| `Microsoft.Storage/storageAccounts/queueServices/queues` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/storageAccounts/queueServices/queues) |
| `Microsoft.Storage/storageAccounts/tableServices` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/storageAccounts/tableServices) |
| `Microsoft.Storage/storageAccounts/tableServices/tables` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/storageAccounts/tableServices/tables) |
| `Microsoft.Storage/storageAccounts/queueServices` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2023-04-01/storageAccounts/queueServices) |
| `Microsoft.Storage/storageAccounts/queueServices/queues` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2023-04-01/storageAccounts/queueServices/queues) |
| `Microsoft.Storage/storageAccounts/tableServices` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2023-04-01/storageAccounts/tableServices) |
| `Microsoft.Storage/storageAccounts/tableServices/tables` | [2023-04-01](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Storage/2023-04-01/storageAccounts/tableServices/tables) |

## Usage examples

Expand Down Expand Up @@ -114,7 +114,7 @@ module mlAiEnvironment 'br/public:avm/ptn/azd/ml-ai-environment:<version>' = {

<details>

<summary>via JSON Parameter file</summary>
<summary>via JSON parameters file</summary>

```json
{
Expand Down Expand Up @@ -157,6 +157,29 @@ module mlAiEnvironment 'br/public:avm/ptn/azd/ml-ai-environment:<version>' = {
</details>
<p>

<details>

<summary>via Bicep parameters file</summary>

```bicep-params
using 'br/public:avm/ptn/azd/ml-ai-environment:<version>'
// Required parameters
param cognitiveServicesName = 'maemincs001'
param hubName = 'maeminhub001'
param keyVaultName = 'maeminkv00'
param openAiConnectionName = 'maeminai001-connection'
param projectName = 'maeminpro001'
param searchConnectionName = 'maeminsearch001-connection'
param storageAccountName = 'maeminsa001'
param userAssignedtName = 'maeminua001'
// Non-required parameters
param location = '<location>'
```

</details>
<p>

### Example 2: _Using large parameter set_

This instance deploys the module using large parameters.
Expand Down Expand Up @@ -208,7 +231,7 @@ module mlAiEnvironment 'br/public:avm/ptn/azd/ml-ai-environment:<version>' = {

<details>

<summary>via JSON Parameter file</summary>
<summary>via JSON parameters file</summary>

```json
{
Expand Down Expand Up @@ -279,6 +302,47 @@ module mlAiEnvironment 'br/public:avm/ptn/azd/ml-ai-environment:<version>' = {
</details>
<p>

<details>

<summary>via Bicep parameters file</summary>

```bicep-params
using 'br/public:avm/ptn/azd/ml-ai-environment:<version>'
// Required parameters
param cognitiveServicesName = 'maemaxcs001'
param hubName = 'maemaxhub001'
param keyVaultName = 'maemaxkv001'
param openAiConnectionName = 'maemaxai001-connection'
param projectName = 'maemaxpro001'
param searchConnectionName = 'maemaxsearch001-connection'
param storageAccountName = 'maemaxsta001'
param userAssignedtName = 'maemaxua001'
// Non-required parameters
param applicationInsightsName = 'maemaxappin001'
param cognitiveServicesDeployments = [
{
model: {
format: 'OpenAI'
name: 'gpt-35-turbo'
version: '0613'
}
name: 'gpt-35-turbo'
sku: {
capacity: 20
name: 'Standard'
}
}
]
param containerRegistryName = 'maemaxcr001'
param location = '<location>'
param logAnalyticsName = 'maemaxla001'
param searchServiceName = 'maemaxsearch001'
```

</details>
<p>

## Parameters

**Required parameters**
Expand Down Expand Up @@ -474,18 +538,8 @@ This section gives you an overview of all local-referenced module files (i.e., o

| Reference | Type |
| :-- | :-- |
| `ptn/azd/ml-hub-dependencies` | Local reference |
| `ptn/azd/ml-project` | Local reference |
| `br/public:avm/ptn/azd/insights-dashboard:0.1.0` | Remote reference |
| `br/public:avm/res/cognitive-services/account:0.7.0` | Remote reference |
| `br/public:avm/res/container-registry/registry:0.4.0` | Remote reference |
| `br/public:avm/res/key-vault/vault:0.7.1` | Remote reference |
| `br/public:avm/res/key-vault/vault:0.9.0` | Remote reference |
| `br/public:avm/res/machine-learning-services/workspace:0.7.0` | Remote reference |
| `br/public:avm/res/managed-identity/user-assigned-identity:0.4.0` | Remote reference |
| `br/public:avm/res/operational-insights/workspace:0.6.0` | Remote reference |
| `br/public:avm/res/search/search-service:0.6.0` | Remote reference |
| `br/public:avm/res/storage/storage-account:0.9.1` | Remote reference |
| `br/public:avm/ptn/azd/ml-hub-dependencies:0.1.0` | Remote reference |
| `br/public:avm/ptn/azd/ml-project:0.1.0` | Remote reference |

## Data Collection

Expand Down
12 changes: 7 additions & 5 deletions avm/ptn/azd/ml-ai-environment/main.bicep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
metadata name = 'Azure Machine Learning Environment'
metadata name = 'Azd Azure Machine Learning Environment'
metadata description = '''Create Azure Machine Learning workspaces of type 'Hub' and 'Project' and their required dependencies.
**Note:** This module is not intended for broad, generic use, as it was designed to cater for the requirements of the AZD CLI product. Feature requests and bug fix requests are welcome if they support the development of the AZD CLI but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case.'''
Expand Down Expand Up @@ -88,8 +88,8 @@ resource avmTelemetry 'Microsoft.Resources/deployments@2024-03-01' = if (enableT
}
}

module hubDependencies '../ml-hub-dependencies/main.bicep' = {
name: '${uniqueString(deployment().name, location)}-dependencies'
module hubDependencies 'br/public:avm/ptn/azd/ml-hub-dependencies:0.1.0' = {
name: 'mlHubDependenciesDeployment'
params: {
location: location
tags: tags
Expand All @@ -102,6 +102,7 @@ module hubDependencies '../ml-hub-dependencies/main.bicep' = {
cognitiveServicesDeployments: cognitiveServicesDeployments
searchServiceName: searchServiceName
replicaCount: replicaCount
enableTelemetry: enableTelemetry
}
}

Expand All @@ -122,13 +123,14 @@ module hub './modules/hub.bicep' = {
}
}

module project '../ml-project/main.bicep' = {
module project 'br/public:avm/ptn/azd/ml-project:0.1.0' = {
name: '${uniqueString(deployment().name, location)}-project'
params: {
name: projectName
hubResourceId: hub.outputs.resourceId
keyVaultName: hubDependencies.outputs.keyVaultName
userAssignedtName: userAssignedtName
userAssignedName: userAssignedtName
enableTelemetry: enableTelemetry
}
}

Expand Down
Loading

0 comments on commit ea4fd9c

Please sign in to comment.