0Pricing
MLOps Academy · レッスン

ML向けのGitHub Actionsワークフロー

プッシュのたびにlint、テスト、学習を実行します。

「ML向けのGitHub Actionsワークフロー」はCoddyKit上の無料MLOps Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これは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.

よくある質問

「ML向けのGitHub Actionsワークフロー」レッスンは無料ですか?

はい。「ML向けのGitHub Actionsワークフロー」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、MLOps Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 MLOps Academyコースには全4レッスンが含まれています。

「ML向けのGitHub Actionsワークフロー」で何を学びますか?

プッシュのたびにlint、テスト、学習を実行します。 ブラウザで直接実行するハンズオンコードでMLOps Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

MLOps Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのMLOps Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「ML向けのGitHub Actionsワークフロー」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このMLOps Academyレッスンでコードを書いて実行できますか?

はい。すべてのMLOps Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. モデルにおけるCI/CDとは
  2. ML向けのGitHub Actionsワークフロー
  3. モデル品質をマージの条件にする
  4. リリース時にイメージをビルドしてプッシュする
← MLOps Academyに戻る