مورد InferenceService
صرّح بنشر النموذج في ملف بيان واحد.
مورد InferenceService درس مجاني في MLOps Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MLOps Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MLOps Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Meet KServe
KServe turns a trained model into a production endpoint on Kubernetes. You describe what you want, and it handles serving, scaling, and routing for you. KServe is your serving layer. 🚀
One Resource to Rule Them
Instead of writing raw Deployments and Services by hand, you create a single custom resource. The InferenceService is the one object that defines your whole serving setup.
It Is Just YAML
You declare an InferenceService in a small YAML manifest, then apply it with kubectl. KServe reads that manifest and builds everything underneath.
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
name: sklearn-irisThe Predictor Block
The core of the spec is the predictor, which says how to load and run your model. It points KServe at the model and the runtime that should serve it.
spec:
predictor:
model:
modelFormat:
name: sklearn
storageUri: gs://kfserving-examples/models/sklearn/1.0/modelWhere Your Model Lives
The storageUri tells KServe where to pull the model from, like a GCS or S3 bucket. KServe downloads it into the serving container at startup.
Model Format Picks the Runtime
The modelFormat field, such as sklearn or pytorch, lets KServe choose a matching serving runtime automatically. No custom server code needed for common frameworks.
Apply It Like Any Resource
You ship the manifest to the cluster with a normal kubectl command. KServe sees the new object and starts reconciling it into a running service. kubectl apply kicks it off.
kubectl apply -f sklearn-iris.yamlWatch It Become Ready
After applying, you check status until the service reports READY. The READY column flips to True once the model is loaded and accepting traffic.
kubectl get inferenceservice sklearn-irisYou Get a URL
A ready InferenceService exposes a stable URL for predictions. Clients send requests there, and KServe routes them to your model behind the scenes.
Sending a Prediction
You POST your input as JSON to the predict path of that URL. KServe forwards it to the model and returns the prediction in the response body.
curl -X POST $URL/v1/models/sklearn-iris:predict \
-d '{"instances": [[5.1, 3.5, 1.4, 0.2]]}'Transformer and Explainer Too
Beyond predictor, the spec can add a transformer for pre and post processing and an explainer for insight. Each is optional and chains automatically.
Quick Check
You want KServe to serve a model. Which single object do you declare?
Recap
You learned that the InferenceService is KServe's single declarative resource. Set a predictor with a storageUri and format, apply it, and get a ready prediction URL. Nice work! 🎉
الأسئلة الشائعة
هل درس «مورد InferenceService» مجاني؟
نعم — نص درس «مورد InferenceService» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MLOps Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MLOps Academy 4 دروس في المجموع.
ماذا ستتعلم في «مورد InferenceService»؟
صرّح بنشر النموذج في ملف بيان واحد. تتمرن على MLOps Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ MLOps Academy؟
لا تُشترط خبرة سابقة. MLOps Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.
كم من الوقت يستغرق درس «مورد InferenceService»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس MLOps Academy هذا؟
نعم. كل درس في MLOps Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- مورد InferenceService
- التوسع إلى الصفر ثم العودة
- كتابة متنبئ مخصص
- مقارنة KServe وSeldon Core