Merge pull request #118 from Azure/gha-nlp

Gha nlp
This commit is contained in:
Setu Chokshi 2022-12-23 17:31:38 +08:00 коммит произвёл GitHub
Родитель 5801db4951 ea712645d2
Коммит 751c9cf9ab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 107 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,65 @@
name: deploy-model-training-pipeline
on:
workflow_dispatch:
jobs:
get-config:
uses: Azure/mlops-templates/.github/workflows/read-yaml.yml@main
with:
file_name: config-infra-prod.yml
create-compute-standard:
needs: get-config
uses: Azure/mlops-templates/.github/workflows/create-compute.yml@main
with:
cluster_name: cpu-cluster
size: STANDARD_DS3_V2
min_instances: 0
max_instances: 1
resource_group: ${{ needs.get-config.outputs.resource_group }}
workspace_name: ${{ needs.get-config.outputs.aml_workspace }}
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}
create-compute-large:
needs: get-config
uses: Azure/mlops-templates/.github/workflows/create-compute.yml@main
with:
cluster_name: cpu-cluster-lg
size: Standard_D14_v2
min_instances: 0
max_instances: 1
resource_group: ${{ needs.get-config.outputs.resource_group }}
workspace_name: ${{ needs.get-config.outputs.aml_workspace }}
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}
create-compute-gpu:
needs: get-config
uses: Azure/mlops-templates/.github/workflows/create-compute.yml@main
with:
cluster_name: gpu-cluster
size: Standard_NV6
cluster_tier: low_priority
min_instances: 0
max_instances: 1
resource_group: ${{ needs.get-config.outputs.resource_group }}
workspace_name: ${{ needs.get-config.outputs.aml_workspace }}
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}
register-environment:
needs: [get-config,create-compute-standard,create-compute-large,create-compute-gpu]
uses: Azure/mlops-templates/.github/workflows/register-environment.yml@main
with:
resource_group: ${{ needs.get-config.outputs.resource_group }}
workspace_name: ${{ needs.get-config.outputs.aml_workspace }}
environment_file: mlops/azureml/train/train-env.yaml
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}
run-pipeline:
needs: [get-config,create-compute-standard,create-compute-large,create-compute-gpu,register-environment]
uses: Azure/mlops-templates/.github/workflows/run-pipeline.yml@main
with:
resource_group: ${{ needs.get-config.outputs.resource_group }}
workspace_name: ${{ needs.get-config.outputs.aml_workspace }}
parameters-file: mlops/azureml/train/pipeline.yml
job-name: nlp_summerization
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}

Просмотреть файл

@ -0,0 +1,42 @@
name: deploy-online-endpoint-pipeline
on:
workflow_dispatch:
jobs:
get-config:
uses: Azure/mlops-templates/.github/workflows/read-yaml.yml@main
with:
file_name: config-infra-prod.yml
create-endpoint:
needs: get-config
uses: Azure/mlops-templates/.github/workflows/create-endpoint.yml@main
with:
resource_group: ${{ needs.get-config.outputs.resource_group }}
workspace_name: ${{ needs.get-config.outputs.aml_workspace }}
endpoint_file: mlops/azureml/deploy/online/online-endpoint.yml
endpoint_name: nlp-summarization-online-dp
endpoint_type: online
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}
create-deployment:
uses: Azure/mlops-templates/.github/workflows/create-deployment.yml@main
needs: [get-config,create-endpoint]
with:
resource_group: ${{ needs.get-config.outputs.resource_group }}
workspace_name: ${{ needs.get-config.outputs.aml_workspace }}
endpoint_file: mlops/azureml/deploy/online/online-deployment.yml
endpoint_name: nlp-summarization-online-dp
endpoint_type: online
deployment_name: nlp-summarization-online-dp
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}
allocate-traffic:
uses: Azure/mlops-templates/.github/workflows/allocate-traffic.yml@main
needs: [get-config,create-deployment]
with:
resource_group: ${{ needs.get-config.outputs.resource_group }}
workspace_name: ${{ needs.get-config.outputs.aml_workspace }}
traffic_allocation: nlp-summarization-online-dp=100
endpoint_name: nlp-summarization-online-dp
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}