Skip to content

Commit

Permalink
feat(workshop): clean up for workshop
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-chervet committed Dec 18, 2023
1 parent 102367a commit 3fc573b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
--resource_group_name ${{ env.AZURE_RESOURCE_GROUP_NAME }} \
--workspace_name ${{ env.AZURE_ML_WORKSPACE_NAME }} \
--location ${{ env.AZURE_LOCATION }} \
--tags "{\"triggering_actor\":\"${{github.triggering_actor}}\"}" \
--tags "{\"git\":\"${{ github.head_ref }}.${{ github.sha }}\",\"version\":\"${{ needs.tags.outputs.new_version }}\",\"triggering_actor\":\"${{github.triggering_actor}}\"}" \
> train_output.txt
cat train_output.txt
working-directory: train
Expand Down
8 changes: 4 additions & 4 deletions bin/init_repository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ gh api --method PUT -H "Accept: application/vnd.github+json" repos/${repositoryF
# Retrieve the current subscription and current tenant identifiers
$subscriptionId=$(az account show --query "id" -o tsv)
$tenantId=$(az account show --query "tenantId" -o tsv)
$credentials=$(az ad sp create-for-rbac --name "mlapp" --role contributor \
--scopes /subscriptions/<subscription-id> \
--sdk-auth)
$credentials=$(az ad sp create-for-rbac --name "mlapp" --role contributor --scopes /subscriptions/$subscriptionId --sdk-auth)
# Create an App Registration and its associated service principal
#$appId=$(az ad app create --display-name "GitHub Action OIDC for ${repositoryFullName}" --query "appId" -o tsv)
#$servicePrincipalId=$(az ad sp create --id $appId --query "id" -o tsv)
Expand Down Expand Up @@ -60,7 +58,9 @@ $credentials=$(az ad sp create-for-rbac --name "mlapp" --role contributor \
#gh secret set AZURE_TENANT_ID --body $tenantId --env $environmentName
#gh secret set AZURE_SUBSCRIPTION_ID --body $subscriptionId --env $environmentName
#gh secret set AZURE_CLIENT_ID --body $appId --env $environmentName
gh secret set AZURE_CREDENTIALS --body $credentials --env "$environmentName"
$jsonCredentials = $credentials | ConvertTo-Json -Compress
echo $jsonCredentials
gh secret set AZURE_CREDENTIALS --body "$jsonCredentials" --env "$environmentName"
gh secret set DOCKER_PASSWORD --body "robertcarry" --env "$environmentName"
gh secret set DOCKER_USENAME --body "dckr_pat_e2lZ9YgpMt8APE-Qxzn89u6mt28" --env "$environmentName"

Expand Down
7 changes: 3 additions & 4 deletions bin/init_repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ gh api --method PUT -H "Accept: application/vnd.github+json" "repos/${repository
# Retrieve the current subscription and current tenant identifiers using Azure CLI
subscriptionId=$(az account show --query "id" -o tsv)
tenantId=$(az account show --query "tenantId" -o tsv)
credentials=$(az ad sp create-for-rbac --name "mlapp" --role contributor \
--scopes /subscriptions/<subscription-id> \
--sdk-auth)
credentials=$(az ad sp create-for-rbac --name "mlapp" --role contributor --scopes /subscriptions/$subscriptionId --sdk-auth)
# Create an App Registration and its associated service principal using Azure CLI
#appId=$(az ad app create --display-name "GitHub Action OIDC for ${repositoryFullName}" --query "appId" -o tsv)
#servicePrincipalId=$(az ad sp create --id "$appId" --query "id" -o tsv)
Expand All @@ -59,7 +57,8 @@ credentials=$(az ad sp create-for-rbac --name "mlapp" --role contributor \
#gh secret set AZURE_TENANT_ID --body "$tenantId" --env "$environmentName"
#gh secret set AZURE_SUBSCRIPTION_ID --body "$subscriptionId" --env "$environmentName"
#gh secret set AZURE_CLIENT_ID --body "$appId" --env "$environmentName"
gh secret set AZUREML_CREDENTIALS --body "$credentials" --env "$environmentName"
json_credentials=$(echo $credentials | jq -c .)
gh secret set AZUREML_CREDENTIALS --body "$json_credentials" --env "$environmentName"
gh secret set DOCKER_PASSWORD --body "robertcarry" --env "$environmentName"
gh secret set DOCKER_USENAME --body "dckr_pat_e2lZ9YgpMt8APE-Qxzn89u6mt28" --env "$environmentName"

Expand Down
1 change: 1 addition & 0 deletions train/extraction/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
file.write(computed_hash)

console_output = f"""
number_files_input: {result.number_files_input}
number_images_output: {result.number_images_output}
computed_hash: {computed_hash}"""
Expand Down

0 comments on commit 3fc573b

Please sign in to comment.