Tutorial Lengkap Azure Machine Learning: End-to-End ML Platform

# Tutorial Lengkap Azure Machine Learning: ML End-to-End di Azure Azure Machine Learning adalah platform berbasis cloud untuk membangun, melatih, dan mendeploy model machine learning. Platform ini me...

By Ruby Abdullah · · tutorial
AzureAzure MLMLOpsCloud MLPythonMachine Learning

Tutorial Lengkap Azure Machine Learning: ML End-to-End di Azure

Azure Machine Learning adalah platform berbasis cloud untuk membangun, melatih, dan mendeploy model machine learning. Platform ini menyediakan environment MLOps komprehensif dengan tools untuk seluruh lifecycle ML.

Mengapa Azure Machine Learning?

Manfaat Utama:
  • Platform terpadu: Manajemen lifecycle ML lengkap
  • AutoML: Kemampuan machine learning otomatis
  • Enterprise-ready: Security, compliance, dan governance
  • Compute fleksibel: Dari notebooks hingga GPU clusters
  • Integrasi: Konektivitas seamless dengan ekosistem Azure

Komponen Utama:
  • Workspaces
  • Compute instances dan clusters
  • Datastores dan datasets
  • Experiments dan runs
  • Models dan endpoints

Prerequisites

pip install azure-ai-ml azure-identity

Azure CLI

az login

az extension add -n ml

Quick Start

1. Buat Workspace

from azure.ai.ml import MLClient

from azure.identity import DefaultAzureCredential

from azure.ai.ml.entities import Workspace

Autentikasi

credential = DefaultAzureCredential()

Buat workspace

workspace = Workspace(

name="my-ml-workspace",

location="eastus",

displayname="ML Workspace",

description="Azure ML workspace untuk proyek ML"

)

Buat ML client

mlclient = MLClient(

credential=credential,

subscriptionid="your-subscription-id",

resourcegroupname="my-resource-group"

)

Buat workspace

mlclient.workspaces.begincreateorupdate(workspace).result()

print(f"Workspace dibuat: {workspace.name}")

2. Koneksi ke Workspace yang Ada

from azure.ai.ml import MLClient

from azure.identity import DefaultAzureCredential

mlclient = MLClient(

credential=DefaultAzureCredential(),

subscriptionid="your-subscription-id",

resourcegroupname="my-resource-group",

workspacename="my-ml-workspace"

)

print(f"Terhubung ke workspace: {mlclient.workspacename}")

Compute Resources

1. Buat Compute Instance

from azure.ai.ml.entities import ComputeInstance

computeinstance = ComputeInstance(

name="my-compute-instance",

size="StandardDS3v2",

idletimebeforeshutdownminutes=60

)

mlclient.compute.begincreateorupdate(computeinstance).result()

print("Compute instance dibuat")

2. Buat Compute Cluster

from azure.ai.ml.entities import AmlCompute

computecluster = AmlCompute(

name="cpu-cluster",

type="amlcompute",

size="StandardDS3v2",

mininstances=0,

maxinstances=4,

idletimebeforescaledown=120

)

mlclient.compute.begincreateorupdate(computecluster).result()

print("Compute cluster dibuat")

3. GPU Cluster

gpucluster = AmlCompute(

name="gpu-cluster",

type="amlcompute",

size="StandardNC6",

mininstances=0,

maxinstances=2,

idletimebeforescaledown=300

)

mlclient.compute.begincreateorupdate(gpucluster).result()

Manajemen Data

1. Register Datastore

from azure.ai.ml.entities import AzureBlobDatastore

datastore = AzureBlobDatastore(

name="my-blob-datastore",

accountname="mystorageaccount",

containername="ml-data",

credentials={

"accountkey": "your-account-key"

}

)

mlclient.datastores.createorupdate(datastore)

print("Datastore terdaftar")

2. Buat Dataset

from azure.ai.ml.entities import Data

from azure.ai.ml.constants import AssetTypes

File dataset

filedata = Data(

name="training-data",

Artikel Terkait

Tutorial Lengkap Vertex AI: Platform ML Terpadu Google Cloud

Tutorial Lengkap Vertex AI: Platform ML Terpadu di Google Cloud Vertex AI adalah platform machine learning terpadu Googl...

Tutorial Lengkap AWS SageMaker: Machine Learning di Cloud

Tutorial Lengkap AWS SageMaker: End-to-End ML Pipeline Amazon SageMaker adalah layanan machine learning terkelola penuh ...

Tutorial Azure Databricks untuk ML: Unified Analytics Platform

Tutorial Lengkap Azure Databricks untuk ML: Platform Analytics Terpadu Azure Databricks menyediakan platform analytics k...

Tutorial Integrasi Azure MLflow: Experiment Tracking di Azure

Tutorial Lengkap Azure MLflow Integration: Experiment Tracking dan Model Management Azure Machine Learning menyediakan i...