0Pricing
MLOps Academy · درس

تحديد توقيع النموذج ومخططه

صرّح بالمدخلات والمخرجات المتوقعة بوضوح.

تحديد توقيع النموذج ومخططه درس مجاني في MLOps Academy على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MLOps Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MLOps Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

What Goes In, What Comes Out

A model's signature declares exactly what inputs it expects and what outputs it returns. It is the model's contract. 📜

Why Signatures Matter

With a clear schema, callers know which columns and types to send. Bad input gets caught early instead of crashing at predict time.

Inputs and Outputs

A signature has two parts: the input schema describing each feature, and the output schema describing the prediction shape.

Column vs Tensor Schemas

Tabular models use a column schema of named, typed fields. Image or text models often use a tensor schema of shapes and dtypes.

Infer It Automatically

The easiest path is infer_signature: hand it sample inputs and outputs and MLflow figures out the schema for you.

from mlflow.models import infer_signature
sig = infer_signature(X, model.predict(X))

Attach It When Logging

Pass the inferred signature into log_model so it gets saved right inside the model's MLmodel file.

mlflow.sklearn.log_model(model, name='m', signature=sig)

Add an Input Example

Logging an input_example too gives teammates a copy-paste sample of valid input and helps tools build correct requests.

mlflow.sklearn.log_model(model, name='m',
    input_example=X[:1])

Enforcement at Serving

When you serve the model, MLflow checks each request against the schema and rejects inputs with the wrong type or missing fields. 🛡️

Safe Type Coercion

MLflow can quietly upcast safe types, like int to long, but it blocks lossy changes so your model never sees corrupted data.

Optional and Extra Columns

You can mark fields optional, and extra unexpected columns are dropped, so minor input changes do not break serving.

A Living Document

The signature doubles as docs: open the MLmodel file and you instantly see the model's full input and output contract.

Quick Check

Final check on model signatures and schemas.

Recap

A signature is your model's input and output contract: infer it, log it with an example, and let MLflow enforce it at serving. 🎉

الأسئلة الشائعة

هل درس «تحديد توقيع النموذج ومخططه» مجاني؟

نعم — نص درس «تحديد توقيع النموذج ومخططه» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MLOps Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MLOps Academy 4 دروس في المجموع.

ماذا ستتعلم في «تحديد توقيع النموذج ومخططه»؟

صرّح بالمدخلات والمخرجات المتوقعة بوضوح. تتمرن على MLOps Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ MLOps Academy؟

لا تُشترط خبرة سابقة. MLOps Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «تحديد توقيع النموذج ومخططه»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس MLOps Academy هذا؟

نعم. كل درس في MLOps Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. التسلسل باستخدام Pickle وJoblib
  2. صيغة نموذج MLflow
  3. التصدير إلى ONNX لإتاحة النقل
  4. تحديد توقيع النموذج ومخططه
← العودة إلى MLOps Academy