Data Version Control के साथ डेटासेट्स का वर्ज़निंग

Machine Learning के लिए CI/CD

Ravi Bhadauria

Machine Learning Engineer

डेटा वर्ज़निंग क्यों मायने रखती है

  • वर्ज़निंग से डेटा बदलावों का ऐतिहासिक रिकॉर्ड बनता है
  • डेटा वर्ज़निंग क्यों ज़रूरी है
    • Reproducibility
    • Experimentation और Iteration
    • Collaboration
    • Bug Tracking और Debugging
    • Model Monitoring और Maintenance
    • Auditing और Validation
Machine Learning के लिए CI/CD

Data Version Control (DVC)

  • DVC: Data Version Control टूल
    • डेटा और एक्सपेरिमेंट मैनेज करता है
    • Git जैसा

Git और DVC के साथ डेटा वर्ज़निंग का कॉन्सेप्ट चित्र.png

  • Git मेटाडेटा ट्रैक करता है, DVC डेटा वर्ज़निंग संभालता है
Machine Learning के लिए CI/CD

DVC स्टोरेज

  • डेटा अलग स्टोरेज में रहता है
    • SSH, HTTP/HTTPS, Local File System
    • AWS, GCP, और Azure object storage
  • लोकली इंस्टॉल करें
pip install dvc
Machine Learning के लिए CI/CD

DVC इनिशियलाइज़ करना

  • Git इनिशियलाइज़ करें git init
  • DVC इनिशियलाइज़ करें
-> dvc init
Initialized DVC repository.
You can now commit the changes to git.
  • DVC प्रोजेक्ट फाइलें सेट होती हैं, डेटा वर्ज़न करने को तैयार
.dvc
|- .gitignore
|- config
|- tmp
Machine Learning के लिए CI/CD

DVC में फाइलें जोड़ना

  • dvc add <file> कमांड से डेटा फाइलें जोड़ें
-> dvc add data.csv
  • .dvc placeholders बनते हैं जिनमें फाइल मेटाडेटा होता है
    • हर DVC-ट्रैक्ड फाइल की अपनी .dvc फाइल होती है (data.csv -> data.csv.dvc)
    • डेटा वर्ज़न मैनेज करने को Git में चेक-इन होती है
  • .dvc/cache में DVC cache बनता है
Machine Learning के लिए CI/CD

DVC डेटा फाइलें

  • डेटा फाइल
-> cat data.csv
This is a sample data file.
  • data.csv.dvc फाइल
-> cat data.csv.dvc
 outs:
 - md5: ea9972ac9f8fa321ea74969e93acc196

size: 28
hash: md5
path: data.csv
Machine Learning के लिए CI/CD

सारांश

  • डेटा वर्ज़निंग से reproducibility और collaboration सुनिश्चित होते हैं
  • DVC: डेटा वर्ज़निंग मैनेज करने का टूल, Git के साथ काम करता है
  • dvc init से DVC शुरू करें, dvc add <file> से फाइलें जोड़ें
  • .dvc फाइलें मेटाडेटा रखती हैं, Git वर्ज़न ट्रैक करता है
Machine Learning के लिए CI/CD

अभ्यास करते हैं!

Machine Learning के लिए CI/CD

Preparing Video For Download...