0Pricing
MLOps Academy · บทเรียน

เวิร์กโฟลว์ GitHub Actions สำหรับการเรียนรู้ของเครื่อง

รันการตรวจรูปแบบ การทดสอบ และการฝึกทุกครั้งที่ส่งโค้ด

เวิร์กโฟลว์ GitHub Actions สำหรับการเรียนรู้ของเครื่อง เป็นบทเรียน MLOps Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน MLOps Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส MLOps Academy มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Meet GitHub Actions

GitHub Actions runs your scripts on GitHub's servers whenever something happens in your repo, like a push, so you never run CI by hand again. ⚙️

Workflows Live in YAML

A workflow is a YAML file inside .github/workflows. GitHub reads it and follows your instructions step by step on each trigger.

.github/workflows/ml.yml

The on: Trigger

The on key says when to run. Here it fires on every push, so each commit kicks off your ML checks automatically.

on:
  push:
    branches: [main]

Jobs Run the Work

A workflow holds one or more jobs. Each job runs on a fresh virtual machine, so your pipeline always starts from a clean, predictable state.

jobs:
  build:
    runs-on: ubuntu-latest

Steps Are the Recipe

Inside a job, steps run in order from top to bottom. Each step is either a reusable action or a plain shell command you write.

Check Out Your Code

The first step almost always uses the checkout action to copy your repo onto the runner. Without it, the machine has no code to test.

- uses: actions/checkout@v4

Set Up Python

For an ML repo you set up Python next, choosing the exact version so the runner matches the environment your team trains in.

- uses: actions/setup-python@v5
  with:
    python-version: "3.11"

Install Dependencies

Then you install your pinned packages so the runner has the same libraries you use locally. This makes every CI run reproducible.

- run: pip install -r requirements.txt

Lint, Then Test

Now add the ML checks: a lint step to catch style issues, then pytest to run your data and model tests on the fresh runner.

- run: ruff check .
- run: pytest

Train on a Sample

A final step can train on a small sample to prove the pipeline works end to end, keeping CI fast while still exercising real code.

- run: python train.py --sample 1000

Watch It Run

Push your YAML and open the Actions tab. GitHub shows a live log of each step, with a green check when your ML pipeline passes. ✅

Quick Check

Where must a GitHub Actions workflow file live to be picked up?

Recap

A workflow YAML in .github/workflows defines triggers, jobs, and ordered steps. For ML you check out code, set up Python, install deps, then lint, test, and train.

คำถามที่พบบ่อย

บทเรียน “เวิร์กโฟลว์ GitHub Actions สำหรับการเรียนรู้ของเครื่อง” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “เวิร์กโฟลว์ GitHub Actions สำหรับการเรียนรู้ของเครื่อง” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส MLOps Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส MLOps Academy มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “เวิร์กโฟลว์ GitHub Actions สำหรับการเรียนรู้ของเครื่อง”

รันการตรวจรูปแบบ การทดสอบ และการฝึกทุกครั้งที่ส่งโค้ด คุณปฏิบัติ MLOps Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน MLOps Academy หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน MLOps Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 2 จากทั้งหมด 4 บทเรียน

บทเรียน “เวิร์กโฟลว์ GitHub Actions สำหรับการเรียนรู้ของเครื่อง” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน MLOps Academy นี้ได้ไหม

ได้ บทเรียน MLOps Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. CI/CD สำหรับโมเดลหมายถึงอะไร
  2. เวิร์กโฟลว์ GitHub Actions สำหรับการเรียนรู้ของเครื่อง
  3. กำหนดให้คุณภาพโมเดลเป็นเงื่อนไขการรวมโค้ด
  4. สร้างและส่งอิมเมจเมื่อออกรีลีส
← กลับไปที่ MLOps Academy