SageMaker: Notebook, Training Jobs, Deployment

इस ब्लॉग में हम AWS SageMaker को detail में सीखेंगे, जिसमें notebook instance setup, training jobs चलाना और trained ML model को production-ready deployment करना शामिल है।

🚀 SageMaker: Notebook, Training Jobs, Deployment (AWS Deployment in Hindi)

AWS SageMaker Machine Learning developers और Data Scientists के लिए एक managed service है, जहां आप end-to-end ML workflow (data preprocessing → training → deployment) आसानी से कर सकते हैं। SageMaker का use करके आप बिना heavy infrastructure manage किए, scalable और production-ready ML systems बना सकते हैं।

⚡ Step 2: SageMaker Training Jobs

import sagemaker
from sagemaker import get_execution_role

role = get_execution_role()
sess = sagemaker.Session()

# Example: XGBoost Training
from sagemaker.xgboost.estimator import XGBoost

xgb = XGBoost(entry_point='train.py',
              role=role,
              instance_count=1,
              instance_type='ml.m5.large',
              framework_version='1.3-1')

xgb.fit({'train': 's3://your-bucket/train.csv', 'validation': 's3://your-bucket/val.csv'})
    

⚡ Step 3: Model Deployment

# Deploy trained model
predictor = xgb.deploy(
    initial_instance_count=1,
    instance_type="ml.m5.large"
)

# Prediction call
result = predictor.predict([[5.1, 3.5, 1.4, 0.2]])
print(result)