hf-cloud-sagemaker-production-defaults
यह क्या करती है
यह स्किल एक लाइव SageMaker मॉडल endpoint बनाती है, जो ट्रैफ़िक के साथ बढ़ने और समस्याएँ रिपोर्ट करने के लिए सेट होता है। यह उन लोगों के लिए है जो ऐसा डिप्लॉयमेंट चाहते हैं जिसे चलता छोड़ा जा सके और बाद में डीबग किया जा सके।
कब इस्तेमाल करें
- ✓जब SageMaker endpoint बनने वाला हो।
- ✓जब आप चाहते हैं कि endpoint के साथ autoscaling और alarms भी सेट हों।
- ✓जब इमेज और role पता होने पर आप डिप्लॉयमेंट पूरा करना चाहते हैं।
Skill का लिंक
https://github.com/huggingface/skills/blob/main/skills/hf-cloud-sagemaker-production-defaults/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“चुना हुआ मॉडल real-time endpoint के रूप में autoscaling और alarms के साथ डिप्लॉय कीजिए, ताकि वह चलता रहे।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
AI जुड़े हुए कई संसाधन बनाता है: मॉडल, उसकी endpoint configuration, endpoint खुद, autoscaling लक्ष्य और latency व errors के लिए CloudWatch alarms। आप चालू न करें तो data capture बंद रहता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
SageMaker Production Defaults
The difference between a demo endpoint and one you can leave running is: it scales with traffic, it tells you when it breaks, and you can debug it later. This skill makes those three the default rather than optional extras.
By the time this skill runs, the planner has chosen a real-time endpoint, IAM has a usable role, and image-selection has resolved a container URI + AMI version. This skill turns those into an actual deployment.
What gets created
For every endpoint, the skill creates these as a unit:
- SageMaker Model — image + env vars + execution role + S3 artifacts
- Endpoint config — instance type, initial count, optional data capture
- Endpoint — the real-time endpoint serving inference
- Autoscaling target + policy — target tracking on invocations per instance
- CloudWatch alarms — latency, errors, platform overhead
An inference-component deployment (deploy_ic.py) creates the same set with two changes: the endpoint config carries the execution role and ManagedInstanceScaling, and an inference component carries the model. Its autoscaling target is the component, not the variant.
Data capture (logging requests/responses to S3) is off by default — useful for debugging but creates ongoing S3 costs the user didn't necessarily ask for. Enable with --enable-data-capture.
All resources get a consistent tag set including CreatedBy=agentic-deploy-skills for later cleanup.
Defaults and reasoning in references/deployment-template.md.
Running the deployment
For a text-generation LLM (vLLM), first package the pinned model snapshot as a SageMaker model.tar.gz artifact and upload it to an account-controlled S3 bucket. SageMaker extracts it under /opt/ml/model, so the deployment does not fetch or execute repository code at runtime:
python scripts/deploy.py \
--model-name qwen3-medical \
--image-uri "$IMAGE_URI" \
--inference-ami-version "$AMI" \
--role-arn "$ROLE_ARN" \
--model-s3-uri "s3://<your-model-bucket>/qwen3-medical/model.tar.gz" \
--instance-type ml.g5.xlarge \
--region "$REGION" \
--env SM_VLLM_MODEL=/opt/ml/model \
--env SM_VLLM_HOST=0.0.0.0 \
--env SM_VLLM_TRUST_REMOTE_CODE=false \
--env SM_VLLM_MAX_MODEL_LEN=4096
For an embedding model (TEI, often on CPU):
python scripts/deploy.py \
--model-name bge-large-embeddings \
--image-uri "$IMAGE_URI" \
--role-arn "$ROLE_ARN" \
--instance-type ml.c6i.2xlarge \
--region "$REGION" \
--env HF_MODEL_ID=BAAI/bge-large-en-v1.5
Note: TEI deployments do not need --inference-ami-version. That flag is vLLM-specific. TEI env vars are also simpler (HF_MODEL_ID instead of SM_VLLM_*, no host or trust-remote-code to configure).
Where each value comes from:
| Parameter | Source |
|---|---|
--image-uri |
hf-cloud-serving-image-selection — agent reads from the AWS DLC catalog page |
--inference-ami-version |
hf-cloud-serving-image-selection — required for vLLM tags containing cu130+ |
--role-arn |
hf-cloud-sagemaker-iam-preflight (check_role.py) |
--region |
hf-cloud-aws-context-discovery |
--instance-type |
User input or planner recommendation |
--env |
Model-specific; see hf-cloud-serving-image-selection for required SM_VLLM_* vars |
--model-s3-uri |
Preferred for production — S3 URI of the pinned model artifact extracted to /opt/ml/model; omit only for the Hub-at-runtime exception |
The script creates resources in order with error handling, waits for InService (up to 30 min), surfaces failure reasons, registers autoscaling and alarms, and prints a summary including the teardown command. Outputs a JSON blob on stdout with endpoint/config/model names for downstream scripting.
The scripts ship with this skill. If the installed copy is missing the scripts/ directory (some harnesses copy only SKILL.md on install), fetch them from the source repo rather than re-implementing them from this description.
Model-loading default: pre-stage pinned weights in S3 and pass --model-s3-uri; the container loads them from /opt/ml/model without a runtime Hub dependency. Loading from the Hub is an explicit exception: expect a 5–15+ minute download after endpoint startup, provide a token for gated models, and keep SM_VLLM_TRUST_REMOTE_CODE=false unless the specific architecture requires reviewed custom code. deploy.py waits 30 minutes.
InServi
अक्सर पूछे जाने वाले सवाल
क्या data capture चालू है?
नहीं। अनुरोध और जवाब S3 में लॉग करना डिफ़ॉल्ट रूप से बंद है, क्योंकि उससे लगातार storage का खर्च आता है।
autoscaling क्या करता है?
यह ट्रैफ़िक के आधार पर इंस्टेंस की संख्या बदलता है, हर इंस्टेंस पर invocations के लक्ष्य के हिसाब से।
क्या endpoint शून्य तक स्केल हो सकता है?
हाँ। real-time scale-to-zero विकल्प उन endpoint प्रकारों में है जिन्हें यह सपोर्ट करती है।
जानकारी
लेखक का मूल विवरण
Create a SageMaker endpoint (real-time, real-time scale-to-zero, or async) with autoscaling, CloudWatch alarms, and tagging enabled by default. Use this skill whenever about to create a SageMaker endpoint, write deployment code that calls `create_endpoint`, or finalize a deployment after the image URI and IAM role are known. Provides deploy.py for real-time endpoints, deploy_ic.py for real-time endpoints that scale to zero instances via inference components, and deploy_async.py for async endpoints (also scale-to-zero). This is the last step in the SageMaker deployment workflow. Never generate
repo: huggingface/skills
लोकप्रियता
- GitHub स्टार
- 11k
- रैंकिंग में स्थान
- #11770
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 30/10/2026
कमेंट
- …
इस repository की और skills
hf-cli
11kयह आपके एजेंट को hf कमांड लाइन टूल से Hugging Face पर मॉडल, डेटासेट, Spaces, रिपो और लोकल कैश डाउनलोड करने, अपलोड करने और संभालने में मदद करती है।
hf-cloud-aws-context-discovery
11kयह आपके एजेंट को किसी भी क्लाउड काम से पहले AWS प्रोफ़ाइल, क्षेत्र और खाते का विवरण खोजने में मदद करती है, ताकि वह अंदाज़ा लगाकर खाता न चुने।
hf-cloud-python-env-setup
11kयह आपके एजेंट को SageMaker या AWS ऑटोमेशन चलाने से पहले सही Python संस्करण और ताज़ा लाइब्रेरी वाला साफ़ Python वातावरण सेट करने में मदद करती है।
hf-cloud-sagemaker-deployment-planner
11kयह आपके एजेंट को मॉडल को Amazon SageMaker पर डिप्लॉय करने की योजना बनाने में मदद करती है, real-time, serverless, async या batch होस्टिंग में से सही विकल्प चुनकर।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।