ย้อนกลับไปยังชุดข้อมูลเวอร์ชันก่อนหน้า
ใช้ dvc checkout เพื่อสร้างสถานะข้อมูลในอดีตขึ้นมาใหม่
ย้อนกลับไปยังชุดข้อมูลเวอร์ชันก่อนหน้า เป็นบทเรียน MLOps Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน MLOps Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส MLOps Academy มีบทเรียนทั้งหมด 4 บทเรียน
บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ
Why Roll Back at All
Sometimes a new dataset hurts your model, or you need the exact data from last month's experiment. DVC lets you travel back to any past version.
Git Holds the History
Each data version is captured by a committed .dvc file. So your data history lives right inside your normal Git commit history.
git log --oneline data/train.csv.dvcStep One: Move Git Back
First use git checkout to bring back the old .dvc pointer. This rewinds which data version your project expects.
git checkout HEAD~1 data/train.csv.dvcStep Two: Sync the Data
The pointer changed but the file on disk has not yet. Run dvc checkout to update the actual dataset to match the restored pointer.
dvc checkoutThe Two-Step Rule
Rolling back data is always two moves: git checkout changes the pointer, then dvc checkout swaps the data. Skip the second and your data stays stale.
Pull If Data Is Missing
If that old version is not in your local cache, dvc checkout cannot find it. Run dvc pull first to fetch it from the remote, then check out.
dvc pull
dvc checkoutRoll the Whole Project Back
To restore an entire past state, checkout a full commit, then dvc checkout. Code and data jump back to that moment together. ⏪
git checkout v1.0
dvc checkoutTag Important Versions
Give meaningful snapshots a Git tag so they are easy to return to later. Tags turn a cryptic hash into a memorable label.
git tag -a v1.0 -m "Clean baseline dataset"Go Back to the Latest
Done experimenting in the past? Switch your branch forward again and run dvc checkout to restore the newest data. Nothing is lost.
git checkout main
dvc checkoutReproducibility Unlocked
Because any commit maps to an exact dataset, you can reproduce any past result precisely. This is the whole promise of data versioning.
Peek Without Switching
Want one old file without changing branches? dvc get downloads a specific version from a repo into a chosen path, leaving your project untouched.
dvc get <repo-url> data/train.csv --rev v1.0Quick Check
You ran git checkout on an old .dvc file. What must you run next to restore the actual data?
Recap
Rolling back is a two-step dance: git checkout restores the .dvc pointer, then dvc checkout swaps the data to match. Pull first if the old version is not cached.
คำถามที่พบบ่อย
บทเรียน “ย้อนกลับไปยังชุดข้อมูลเวอร์ชันก่อนหน้า” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “ย้อนกลับไปยังชุดข้อมูลเวอร์ชันก่อนหน้า” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส MLOps Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส MLOps Academy มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “ย้อนกลับไปยังชุดข้อมูลเวอร์ชันก่อนหน้า”
ใช้ dvc checkout เพื่อสร้างสถานะข้อมูลในอดีตขึ้นมาใหม่ คุณปฏิบัติ MLOps Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน MLOps Academy หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน MLOps Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน
บทเรียน “ย้อนกลับไปยังชุดข้อมูลเวอร์ชันก่อนหน้า” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน MLOps Academy นี้ได้ไหม
ได้ บทเรียน MLOps Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- เหตุใด Git เพียงอย่างเดียวจึงจัดเวอร์ชันข้อมูลไม่ได้
- เริ่มต้นใช้งาน DVC และติดตามชุดข้อมูล
- ส่งข้อมูลไปยังพื้นที่จัดเก็บระยะไกล
- ย้อนกลับไปยังชุดข้อมูลเวอร์ชันก่อนหน้า