تسجيل إصدار النموذج الأول
ادفع نموذجاً مدرّباً إلى MLflow Model Registry.
تسجيل إصدار النموذج الأول درس مجاني في MLOps Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MLOps Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MLOps Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
What a Registry Is
A model registry is a central catalog for your trained models. Instead of files scattered on laptops, every model lives in one place with a version number. 📚
Runs vs Registered Models
An MLflow run records one training attempt. A registered model is a named entry that points at the best run you choose to promote and keep.
Log Before You Register
You always log a model first inside a run. Logging saves the artifact so the registry has something concrete to point back at later.
import mlflow
with mlflow.start_run():
mlflow.sklearn.log_model(model, "model")Register in One Call
The fastest path is the registered_model_name argument. Pass it to log_model and MLflow creates the registry entry and a first version for you.
mlflow.sklearn.log_model(
model, "model",
registered_model_name="churn-classifier")Versions Start at 1
Your first registration becomes version 1. Every later registration under the same name bumps the version automatically, so history is never overwritten.
Register From a Past Run
Already logged a model? You can register it after the fact by pointing at its run URI with mlflow.register_model.
mlflow.register_model(
"runs:/<run_id>/model",
"churn-classifier")The runs URI
That runs:/ URI is how MLflow finds the artifact. It combines the run id and the artifact path you used when you logged the model.
The Tracking URI
Set the tracking URI so your code talks to the right server. Without it, MLflow registers everything to a local mlruns folder instead.
mlflow.set_tracking_uri(
"http://localhost:5000")See It in the UI
Open the MLflow UI and click the Models tab. Your new model name appears there with version 1 listed under it, ready to inspect.
Names Are Identifiers
Pick a clear, stable name like fraud-detector. Teammates and code load models by that name, so renaming later breaks everything pointing at it.
Confirm With the Client
The MlflowClient lets you verify registration in code. Fetch the model by name and read back the versions that exist.
from mlflow import MlflowClient
c = MlflowClient()
print(c.get_registered_model("churn-classifier"))Quick Check
Let us check how a first registration is numbered.
Recap
You logged a model, gave it a registry name, and got version 1. Now your best model has a home that anyone on the team can find. 🎉
الأسئلة الشائعة
هل درس «تسجيل إصدار النموذج الأول» مجاني؟
نعم — نص درس «تسجيل إصدار النموذج الأول» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MLOps Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MLOps Academy 4 دروس في المجموع.
ماذا ستتعلم في «تسجيل إصدار النموذج الأول»؟
ادفع نموذجاً مدرّباً إلى MLflow Model Registry. تتمرن على MLOps Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ MLOps Academy؟
لا تُشترط خبرة سابقة. MLOps Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.
كم من الوقت يستغرق درس «تسجيل إصدار النموذج الأول»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس MLOps Academy هذا؟
نعم. كل درس في MLOps Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- تسجيل إصدار النموذج الأول
- المراحل: Staging وProduction وArchived
- إضافة الوسوم والأوصاف إلى النماذج
- تحميل نموذج بالاسم والمرحلة