Skip to content

Commit

Permalink
tst update and create
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Mifsud committed Oct 31, 2023
1 parent 87d5824 commit a204adc
Showing 1 changed file with 34 additions and 23 deletions.
57 changes: 34 additions & 23 deletions .github/workflows/deploy-online-endpoint-pipeline-classical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
check_enpoint: ${{ steps.get-ml-endpoint.outputs.CHECK_ENPOINT }}
name_enpoint: ${{ format('taksi{0}', needs.get-config.outputs.oep) }}
name_enpoint: ${{ format('taxi{0}', needs.get-config.outputs.oep) }}
steps:
- name: "Az CLI login"
uses: azure/login@v1
Expand All @@ -28,42 +28,53 @@ jobs:
run: |
check_endpoint=$(az ml online-endpoint show --n ${{ format('taxi{0}', needs.get-config.outputs.oep) }} -g ${{ needs.get-config.outputs.resource_group }} -w ${{ needs.get-config.outputs.aml_workspace }} --query name | sed -e 's/^"//' -e 's/"$//')
echo "CHECK_ENPOINT=$check_endpoint" >> $GITHUB_OUTPUT
# TODO: Update if exists else create
update-endpoint:
if: ${{ needs.get-endpoint.outputs.check_enpoint == needs.get-endpoint.outputs.name_enpoint }}
needs: [get-config, get-endpoint]
runs-on: ubuntu-latest
steps:
- name: "Az CLI login"
uses: azure/login@v1
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
enable-AzPSSession: true
- name: install-extension
run: az extension add -n ml -y
- name: update-extension
run: az extension update -n ml
- id: get-ml-endpoint
name: get-ml-endpoint
run: |
az ml online-endpoint update --file mlops/azureml/deploy/online/online-endpoint.yml --resource-group ${{ needs.get-config.outputs.resource_group }}
--workspace-name ${{ needs.get-config.outputs.aml_workspace }}
create-endpoint:
if: ${{ needs.get-endpoint.outputs.check_enpoint != needs.get-endpoint.outputs.name_enpoint }}
needs: [get-config, get-endpoint]
# runs-on: ubuntu-latest
# steps:
# - id: test
# name: test
# run: |
# echo ${{ needs.get-endpoint.outputs.check_enpoint }}
# echo ${{ needs.get-endpoint.outputs.name_enpoint }}
# - id: create-end
name: create-endpoint
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: ${{ format('taksi{0}', needs.get-config.outputs.oep) }}
endpoint_name: ${{ format('taxi{0}', needs.get-config.outputs.oep) }}
endpoint_type: online
secrets:
creds: ${{secrets.AZURE_CREDENTIALS}}

# # TODO: Update if exists else create
# create-deployment:
# uses: Azure/mlops-templates/.github/workflows/create-deployment.yml@main
# needs: [get-config]
# 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: ${{ format('taxi{0}', needs.get-config.outputs.oep) }}
# endpoint_type: online
# deployment_name: taxi-online-dp
# secrets:
# creds: ${{secrets.AZURE_CREDENTIALS}}
# create-deployment:
# uses: Azure/mlops-templates/.github/workflows/create-deployment.yml@main
# needs: [get-config]
# 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: ${{ format('taxi{0}', needs.get-config.outputs.oep) }}
# endpoint_type: online
# deployment_name: taxi-online-dp
# secrets:
# creds: ${{secrets.AZURE_CREDENTIALS}}
# allocate-traffic:
# uses: Azure/mlops-templates/.github/workflows/allocate-traffic.yml@main
# needs: [get-config]
Expand Down

0 comments on commit a204adc

Please sign in to comment.