0Pricing
MLOps Academy · درس

تحديد مسار باستخدام مراحل DVC

اربط الخطوات معاً في dvc.yaml باستخدام الاعتماديات.

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

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

Meet dvc.yaml

DVC describes your whole pipeline in one file called dvc.yaml. It lists each stage, the command it runs, and what it depends on. 📄

Add a Stage with dvc stage add

You rarely hand-write the file. The dvc stage add command builds a stage entry for you from flags you pass on the command line.

dvc stage add -n prep \
  -d data/raw.parquet -o data/prepared \
  python prep.py

The -d Flag Means Dependency

The -d flag declares a dependency: a file or script the stage reads. DVC watches these to know when the stage needs to re-run.

The -o Flag Means Output

The -o flag declares an output the stage produces. DVC tracks these files so later stages can depend on them in turn.

Wiring Stages Together

You connect stages by making one stage's output the next stage's dependency. That shared file is the link that forms the pipeline graph.

What a Stage Looks Like in YAML

Each stage in dvc.yaml has a cmd plus its deps and outs. This is the readable record of how your model was built.

stages:
  prep:
    cmd: python prep.py
    deps:
      - data/raw.parquet
    outs:
      - data/prepared

Run the Pipeline with dvc repro

The dvc repro command executes the pipeline in dependency order, running each stage only if its inputs changed.

dvc repro

DVC Builds the DAG for You

From the deps and outs, DVC infers the full DAG automatically. You never specify run order by hand; the graph decides it.

Visualize It with dvc dag

Run dvc dag to print the pipeline as a graph in your terminal. It is a quick way to confirm stages are wired the way you expect.

dvc dag

dvc.lock Records What Ran

After a run, DVC writes dvc.lock with the exact hashes of every input and output. Commit it so teammates reproduce the same result.

The Pipeline Lives in Git

dvc.yaml and dvc.lock are plain text, so they live in Git alongside your code. Your whole pipeline becomes versioned and reviewable.

Quick Check

Test your grasp of DVC stage flags.

Recap: Pipelines in dvc.yaml

You wired stages with deps and outs in dvc.yaml, then ran the graph with dvc repro. DVC tracks order and results for you. 🔗

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

هل درس «تحديد مسار باستخدام مراحل DVC» مجاني؟

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

ماذا ستتعلم في «تحديد مسار باستخدام مراحل DVC»؟

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

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

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

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

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

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

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

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

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