GitHub Actions परिचय

Machine Learning के लिए CI/CD

Ravi Bhadauria

Machine Learning Engineer

GitHub Actions क्या है?

  • GitHub Actions (GHA): CI/CD प्लेटफ़ॉर्म जो pipelines ऑटोमेट करता है
  • Pipeline: चरणों का क्रम जो काम और डेटा का फ्लो दर्शाता है
Machine Learning के लिए CI/CD

GitHub Actions क्या है?

कार असेंबली लाइन की छवि, जहाँ अलग-अलग चरणों पर कामगार इंजन लगाना, पहिए लगाना, और बॉडी पेंट करना जैसे कार्य करते हैं.

Machine Learning के लिए CI/CD

GitHub Actions क्या है?

GitHub Actions आपके सॉफ़्टवेयर प्रोजेक्ट के लिए परिभाषित actions/steps की श्रृंखला बनाता है, जैसे repository checkout, कोड build करना, tests चलाना, या application deploy करना.

1 https://medium.com/empathyco/applying-ci-cd-using-github-actions-for-android-1231e40cc52f
Machine Learning के लिए CI/CD

GHA Components: Event

  • Event: repository में कोई activity जो workflow रन को ट्रिगर करे
    • Push
    • Pull Request
    • Issue खोलना
Machine Learning के लिए CI/CD

GHA Components: Workflow

  • Workflow: ऑटोमेटेड प्रक्रिया जो एक या अधिक jobs चलाती है
    • YAML फ़ाइलों में परिभाषित
    • event से अपने-आप ट्रिगर
      • Manual run संभव
    • repo में .github/workflows डायरेक्टरी में रहती है
    • कई workflows परिभाषित हो सकते हैं
Machine Learning के लिए CI/CD

GHA Components: Steps और Actions

  • Steps: काम की इकाइयाँ
    • क्रम से चलती हैं, पिछले step पर निर्भर
    • एक ही मशीन पर चलती हैं, इसलिए डेटा शेयर हो सकता है
    • काम के उदाहरण
      • कोड compile करना, shell script
      • Action: GHA प्लेटफ़ॉर्म-विशिष्ट एप्लिकेशन
        • जैसे repo checkout, PR पर टिप्पणी
Machine Learning के लिए CI/CD

GHA Components: Jobs और Runners

  • Job: steps का समूह
    • हर job स्वतंत्र
    • parallel execution संभव
    • runners नाम की compute मशीन पर execute होते हैं
Machine Learning के लिए CI/CD

एक साधारण GHA workflow

एक push event की छवि जिसने workflow ट्रिगर किया, जहाँ एक job Ubuntu Linux runner पर चलती है. Job में दो steps हैं: repo checkout और Python कोड चलाना.

  • Event: Push
  • Job: Ubuntu runner पर चलता है, दो steps हैं
    • Action: Checkout Repo
    • Python कोड चलाएँ
Machine Learning के लिए CI/CD

सब कुछ साथ में जोड़ना

एक सामान्य GitHub Action workflow के घटक, जहाँ jobs parallel और steps क्रमिक रूप से चलते हैं, का आरेख.

Machine Learning के लिए CI/CD

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

Machine Learning के लिए CI/CD

Preparing Video For Download...