กำหนดไปป์ไลน์ด้วยระยะของ DVC
เชื่อมขั้นตอนต่าง ๆ ใน dvc.yaml พร้อม Dependencies
กำหนดไปป์ไลน์ด้วยระยะของ DVC เป็นบทเรียน MLOps Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 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.pyThe -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/preparedRun the Pipeline with dvc repro
The dvc repro command executes the pipeline in dependency order, running each stage only if its inputs changed.
dvc reproDVC 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 dagdvc.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” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส MLOps Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส MLOps Academy มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “กำหนดไปป์ไลน์ด้วยระยะของ DVC”
เชื่อมขั้นตอนต่าง ๆ ใน dvc.yaml พร้อม Dependencies คุณปฏิบัติ MLOps Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน MLOps Academy หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน MLOps Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน
บทเรียน “กำหนดไปป์ไลน์ด้วยระยะของ DVC” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน MLOps Academy นี้ได้ไหม
ได้ บทเรียน MLOps Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- ระยะ: รับข้อมูล เตรียม ฝึก ประเมิน
- กำหนดไปป์ไลน์ด้วยระยะของ DVC
- แคชและข้ามขั้นตอนที่ไม่เปลี่ยนแปลง
- กำหนดพารามิเตอร์การรันด้วย params.yaml