I have uploaded the batch_driver.py file in a storage account, then I have created this Code using Bicep template:
param codeAssetDescription string = 'This is a test description for a code asset created by an ARM template'
@description('If the name version are system generated (anonymous registration).')
param isAnonymous bool = false
param workspaceName string = 'gmatheus01rmlw'
param codeAssetName string = 'codeTestGui'
resource workspaceName_codeAssetName_codeAssetVersion 'Microsoft.MachineLearningServices/workspaces/codes/versions@2022-05-01' = {
name: '${workspaceName}/${codeAssetName}/1'
properties: {
description: codeAssetDescription
#disable-next-line no-hardcoded-env-urls
codeUri: 'https://storageAccount.blob.core.windows.net/azureml-blobstore-005340c3-177e-469c-98c1-dd71d2c77a11/models/hr/scoring/'
isArchived: false
isAnonymous: isAnonymous
properties: {}
tags: {}
}
}
output codeVersionId string = workspaceName_codeAssetName_codeAssetVersion.id
output codeVersionName string = workspaceName_codeAssetName_codeAssetVersion.name
output codeVersionUri string = workspaceName_codeAssetName_codeAssetVersion.properties.codeUri
Which is then, defined in codeId in batch template below. So I am creating a Batch Endpoint that will rely on a scoring script as it's mentioned here in Author scoring scripts for batch deployments, we can also find examples in here Deploy models for scoring in batch endpoints. So I have created this Batch Endpoint template using Bicep:
metadata description = 'Deploys a Batch Endpoint to an existing Azure Machine Learning workspace.'
@description('Specifies the name of the Azure Machine Learning workspace.')
param workspaceName string
@description('Specifies the location for all resources.')
param location string
@description('Specifies the batch endpoints and deployments to be created.')
param endpoints array
param ARMId string
@description('Tags to be applied to this resource.')
param tags object = {
MLOps: true
}
@description('References the existing Azure Machine Learning workspace resource.')
resource mlWorkspace 'Microsoft.MachineLearningServices/workspaces@2024-10-01' existing = {
name: workspaceName
}
@description('Flatten the deployments array from the endpoints parameter.')
var deployments = flatten(map(
endpoints,
(endpoint, i) => map(endpoint.deployments, deployment => union({ endpointIndex: i }, deployment))
))
@description('References the existing Azure Machine Learning environments.')
resource mlEnvironments 'Microsoft.MachineLearningServices/workspaces/environments@2024-10-01' existing = [
for (deployment, i) in deployments: {
name: deployment.environmentName
parent: mlWorkspace
}
]
@description('References the existing Azure Machine Learning environment versions.')
resource mlEnvironmentsVersions 'Microsoft.MachineLearningServices/workspaces/environments/versions@2024-10-01' existing = [
for (deployment, i) in deployments: {
name: mlEnvironments[i].properties.latestVersion
parent: mlEnvironments[i]
}
]
@description('References the existing Azure Machine Learning models in the workspace.')
resource mlModels 'Microsoft.MachineLearningServices/workspaces/models@2025-07-01-preview' existing = [
for (deployment, i) in deployments: {
name: deployment.modelName
parent: mlWorkspace
}
]
@description('References the existing versions of the Azure Machine Learning models in the workspace.')
resource mlModelsVersion 'Microsoft.MachineLearningServices/workspaces/models/versions@2025-07-01-preview' existing = [
for (deployment, i) in deployments: {
name: mlModels[i].properties.latestVersion
parent: mlModels[i]
}
]
@description('Creates a batch endpoint for model inference in the Azure Machine Learning workspace.')
resource batchEndpoint 'Microsoft.MachineLearningServices/workspaces/batchEndpoints@2025-06-01' = [
for (endpoint, i) in endpoints: if (length(endpoints) > 0) {
name: endpoint.name
parent: mlWorkspace
location: location
identity: {
type: 'SystemAssigned'
}
properties: {
authMode: 'AADToken'
description: endpoint.description
}
tags: tags
}
]
@description('The Azure Machine Learning compute cluster resource for the workspace.')
resource computes 'Microsoft.MachineLearningServices/workspaces/computes@2025-06-01' existing = [
for (deployment, i) in deployments: {
name: deployment.computeName
parent: mlWorkspace
}
]
@description('Creates model deployments for the specified endpoints in the Azure Machine Learning workspace.')
resource batchDeployment 'Microsoft.MachineLearningServices/workspaces/batchEndpoints/deployments@2025-06-01' = [
for (deployment, i) in deployments: if (length(deployments) > 0) {
name: deployment.name
parent: batchEndpoint[deployment.endpointIndex]
location: location
properties: {
description: deployment.description
compute: computes[i].id
errorThreshold: -1
loggingLevel: 'Debug'
maxConcurrencyPerInstance: 1
miniBatchSize: 10
environmentId: mlEnvironmentsVersions[i].id
model: {
referenceType: 'Id'
assetId: mlModelsVersion[i].id
}
codeConfiguration: {
codeId: 'ARMId'
scoringScript: 'batch_driver.py'
}
outputAction: 'AppendRow'
outputFileName: 'predictions.csv'
retrySettings: {
maxRetries: 3
}
}
tags: tags
}
]
@description('Output endpoints created in the Azure Machine Learning workspace.')
output batchEndpoints array = [
for i in range(0, length(endpoints)): {
batchEndpointName: batchEndpoint[i].name
batchEndpointId: batchEndpoint[i].id
batchDeploymentName: batchDeployment[i].name
batchDeploymentId: batchDeployment[i].id
}
]
@description('Output model information from the Azure Machine Learning workspace.')
output modelIds array = [
for i in range(0, length(endpoints)): {
modelId: mlModels[i].name
modelVersion: mlModelsVersion[i].id
}
]
And my deployment also succeeds:

But the real question is: I can see the batch endpoint created in my workspace, but where can I see that Code that was created? Is it something that can be seen through Studio?