Need help on building ML endpoints from a pipeline in Azure

I’m starting with AI, I need to create a pipeline that will create an ML Workspace, all basic components, an EndPoint with one or two Models. The pipeline must be able to clean everything on the evening and recreate everything in the morning.

I was able to create one EndPoint and one Model from Azure AI Studio so I know I have sufficient access to do it but from my pipeline, I get errors trying to clean and errors when trying to build.

Could you please help me understand how to build this, if possible at all ?

Here is my code running on a Microsoft hosted VM:

Running an empty bicep file with –mode Complete to delete everything in a resource group, I know there are better ways but this should be good to test the pipeline at first

pool:
  vmImage: 'ubuntu-latest'

jobs:
- job: RunEmptyBicep
  steps:
  - task: AzureCLI@2
    name: RunEmptyBicep
    inputs:
      azureSubscription: $(azureServiceConnection)
      scriptType: 'bash'
      scriptLocation: 'inlineScript'
      inlineScript: |
        az deployment group create --mode Complete --resource-group $(resourceGroupName) --template-file empty.bicep

I noticed that even with –mode Complete above, keyvault and workspace could stay so I use this purge them both

- job: PurgeResources
  steps:
  - task: AzureCLI@2
    name: PurgeResources
    inputs:
      azureSubscription: $(azureServiceConnection)
      scriptType: 'bash'
      scriptLocation: 'inlineScript'
      inlineScript: |
        az extension add -n ml -y
        az ml workspace delete --name $(workspaceName) --resource-group $(resourceGroupName) --all-resources --permanently-delete --yes
        az keyvault purge --name $(keyVaultName)

Run a BICEP file to create basic resources and the workspace, if I use the same workspace name twice, I get an error saying it still there and needs purge even if I tried to purge it above

- job: RunCommonBicep
  steps:
  - task: AzureCLI@2
    name: RunCommonBicep
    inputs:
      azureSubscription: $(azureServiceConnection)
      scriptType: 'bash'
      scriptLocation: 'inlineScript'
      inlineScript: |
        az deployment group create --resource-group $(resourceGroupName) --template-file common.bicep --parameters storageAccountName=$(storageAccountName) keyVaultName=$(keyVaultName) applicationInsightsName=$(applicationInsightsName) containerRegistryName=$(containerRegistryName) workspaceName=$(workspaceName)

Use ML commands to build ML EndPoint and Models

- job: CreateMachineLearningEndPoint
  steps:
  - task: AzureCLI@2
    name: CreateMachineLearningEndPoint
    inputs:
      azureSubscription: $(azureServiceConnection)
      scriptType: 'bash'
      scriptLocation: 'inlineScript'
      inlineScript: |
        az extension add -n ml -y
        az ml online-endpoint create --file ./create_or_update_endpoint.yml --resource-group $(resourceGroupName) --workspace-name $(workspaceName)
        az ml online-deployment create -f ./deploy_model_to_endpoint.yml --resource-group $(resourceGroupName) --workspace-name $(workspaceName)

When running the last task, I have errors saying that I don’t have enough credits to do that, is there a recommended approach to find what I can request ? I wanted to use the same settings as the ones I created from Azure AI Studio but I don’t find how to fill “create_or_update_endpoint.yml” and “deploy_model_to_endpoint.yml” with the correct values to use. I just need something simple for start.

Here are my the three other files for now:

common.bicep:

param location string = resourceGroup().location

param storageAccountName string
param keyVaultName string
param applicationInsightsName string
param containerRegistryName string
param workspaceName string

var tenantId = subscription().tenantId

resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = {
  name: storageAccountName
  location: location
  sku: {
    name: 'Standard_RAGRS'
  }
  kind: 'StorageV2'
  properties: {
    encryption: {
      services: {
        blob: {
          enabled: true
        }
        file: {
          enabled: true
        }
      }
      keySource: 'Microsoft.Storage'
    }
    supportsHttpsTrafficOnly: true
    minimumTlsVersion: 'TLS1_2'
    allowBlobPublicAccess: false
    networkAcls: {
      defaultAction: 'Deny'
    }
  }
}
var storageAccountId = storageAccount.id

resource vault 'Microsoft.KeyVault/vaults@2022-07-01' = {
  name: keyVaultName
  location: location
  properties: {
    tenantId: tenantId
    sku: {
      name: 'standard'
      family: 'A'
    }
    accessPolicies: []
    enableSoftDelete: true
  }
}
var keyVaultId = vault.id

resource applicationInsight 'Microsoft.Insights/components@2020-02-02' = {
  name: applicationInsightsName
  location: location
  kind: 'web'
  properties: {
    Application_Type: 'web'
  }
}
var applicationInsightId = applicationInsight.id

resource registry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' = {
  name: containerRegistryName
  sku: {
    name: 'Standard'
  }
  location: location
  properties: {
    adminUserEnabled: false
  }
}
var containerRegistryId = registry.id

resource workspace 'Microsoft.MachineLearningServices/workspaces@2022-10-01' = {
  name: workspaceName
  identity: {
    type: 'SystemAssigned'
  }
  location: location
  properties: {
    friendlyName: workspaceName
    storageAccount: storageAccountId
    keyVault: keyVaultId
    applicationInsights: applicationInsightId
    containerRegistry: containerRegistryId
  }
}

create_or_update_endpoint.yml

$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineEndpoint.schema.json
name: 'my-dev-endpoint'

deploy_model_to_endpoint.yml

$schema: https://azuremlschemas.azureedge.net/latest/managedOnlineDeployment.schema.json
name: my-dev-deployment
endpoint_name: my-dev-endpoint
model: azureml://registries/azureml/models/t5-base/versions/17
instance_type: Standard_NC12s_v3
instance_count: 1
type: "managed"

Thanks for any help.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật