0Pricing
MLOps Academy · درس

المراحل: الإدخال والإعداد والتدريب والتقييم

قسّم التدريب إلى خطوات واضحة قابلة للتخزين المؤقت.

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

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

From One Big Script to Stages

A single train.py that does everything is hard to reuse and slow to debug. Splitting it into stages makes each step clear and independently runnable. 🧩

The Four Classic Stages

Most training pipelines follow the same shape: ingest, prep, train, eval. Each stage takes inputs and produces outputs the next one reads.

Stage 1: Ingest

The ingest stage pulls raw data from its source, like a database or bucket, and writes it to a known local path. Nothing is cleaned yet.

import pandas as pd
df = pd.read_csv("s3://bucket/raw.csv")
df.to_parquet("data/raw.parquet")

Stage 2: Prep

The prep stage cleans and transforms raw data into model-ready features. It handles missing values, encoding, and splitting into train and test sets.

Stage 3: Train

The train stage reads prepared features and fits the model, then saves the fitted artifact to disk for the next stage to score.

model.fit(X_train, y_train)
joblib.dump(model, "models/model.pkl")

Stage 4: Eval

The eval stage loads the saved model, scores it on the held-out test set, and writes metrics like accuracy to a file you can track.

score = model.score(X_test, y_test)
json.dump({"accuracy": score}, open("metrics.json", "w"))

Stages Pass Files, Not Variables

Stages talk to each other through files on disk, not in-memory variables. That decoupling is what lets you re-run one stage without the others.

Why Stages Are Cacheable

Because each stage has fixed inputs and outputs, a tool can cache its result. If the inputs did not change, the stage is skipped entirely.

Each Stage Is Its Own Script

Give every stage one small script with a clear job. ingest.py, prep.py, train.py, eval.py read inputs and write outputs, nothing more.

Stages Form a DAG

Stages connect into a DAG, a directed graph where each step depends on the ones before it. Eval depends on train, train on prep, prep on ingest.

Clear Stages Make Debugging Easy

When a run fails, distinct stages tell you exactly where it broke. You can re-run just the failed stage instead of the whole pipeline.

Quick Check

Let us check how stages communicate.

Recap: Ingest, Prep, Train, Eval

You learned to split training into four cacheable stages that pass data through files. Clear stages mean faster reruns and far easier debugging. 🚀

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

هل درس «المراحل: الإدخال والإعداد والتدريب والتقييم» مجاني؟

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

ماذا ستتعلم في «المراحل: الإدخال والإعداد والتدريب والتقييم»؟

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

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

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

كم من الوقت يستغرق درس «المراحل: الإدخال والإعداد والتدريب والتقييم»؟

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

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

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

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

  1. المراحل: الإدخال والإعداد والتدريب والتقييم
  2. تحديد مسار باستخدام مراحل DVC
  3. تخزين الخطوات غير المتغيرة مؤقتاً وتجاوزها
  4. تهيئة التشغيل بالمعاملات باستخدام params.yaml
← العودة إلى MLOps Academy