Does Machine Learning Codes can be access from Studio UI?.

Guilherme Matheus 120 Reputation points Microsoft Employee
2025-10-17T14:02:52.1733333+00:00

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:

enter image description here

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?

Azure Machine Learning
{count} votes

Answer accepted by question author
  1. Sina Salam 25,921 Reputation points Volunteer Moderator
    2025-10-17T17:03:07.3933333+00:00

    Hello Guilherme Matheus, Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you would like to know how to access your Machine Learning Codes can be access from Studio UI. Regarding your questions:

    Where can I see the Code asset that was created?

    The Code asset you registered using the resource type

    Microsoft.MachineLearningServices/workspaces/codes/versions exists in your workspace, but it is not surfaced as a standalone tab or searchable asset in Azure ML Studio. Instead, you can confirm it in two ways:

    1. In Deployment Details in Studio by navigating to: Azure ML Studio > Endpoints > [Your Batch Endpoint] > Deployments > [Deployment Name]. Under Deployment details, look for the Code configuration section. It will show:
      • The scoring script (e.g., batch_driver.py)
      • The code location (from your codeUri or linked asset) This is the only place in Studio where the registered Code asset is referenced visually.
    2. Programmatic verification (REST/CLI) by using the ARM ID of the Code asset version to query it:
         GET https://management.azure.com/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.MachineLearningServices/workspaces/<workspace>/codes/<codeName>/versions/<version>?api-version=2022-05-01
      
      The response will include properties.codeUri, description, and the full id. Check this link for more details: https://free.blessedness.top/en-us/azure/templates/microsoft.machinelearningservices/workspaces/codes/versions

    Is it something that can be seen through Studio?

    No! Not as a separate “Assets > Code” tab or via global search. Azure ML Studio currently supports search and navigation for Jobs, Models, Components, Environments, and Data, but Code assets are not included in these filters. https://free.blessedness.top/en-us/azure/machine-learning/how-to-search-assets?view=azureml-api-2 So:

    • You cannot browse Code assets directly in Studio like you can for Models or Data.
    • You can only see the Code reference inside the deployment details page (as I have explained above).

    I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anshika Varshney 1,910 Reputation points Microsoft External Staff Moderator
    2025-10-17T18:12:20.1266667+00:00

    Hello Guilherme Matheus,

    No, not in a way you can browse them like you do models, data, or environments. studio doesn’t provide a separate “code” tab or search filter for code assets.

    here’s how you can see or access them:

    In the deployment details: when you go to your endpoint in Studio → select a deployment → under deployment details, you’ll find a section showing the code configuration (like the scoring script or codeUri) that references your registered code.

    Via REST API / CLI / ARM: you can query the resource directly using its ARM path — something like codes/{codeName}/versions/{version}, which returns information such as codeUri, description, and the full id.

    hope this clears it up!


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.