Etapy: Ingest, Prep, Train, Eval
Podziel trenowanie na przejrzyste kroki, które można buforować
Etapy: Ingest, Prep, Train, Eval to bezpłatna lekcja MLOps Academy na CoddyKit. To lekcja 1 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej MLOps Academy, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs MLOps Academy zawiera 4 lekcji w sumie.
Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.
From One Big Script to Stages
A single train.py that does everything is hard to reuse and slow to debug. Splitting it into stages makes each step clear and independently runnable. 🧩
The Four Classic Stages
Most training pipelines follow the same shape: ingest, prep, train, eval. Each stage takes inputs and produces outputs the next one reads.
Stage 1: Ingest
The ingest stage pulls raw data from its source, like a database or bucket, and writes it to a known local path. Nothing is cleaned yet.
import pandas as pd
df = pd.read_csv("s3://bucket/raw.csv")
df.to_parquet("data/raw.parquet")Stage 2: Prep
The prep stage cleans and transforms raw data into model-ready features. It handles missing values, encoding, and splitting into train and test sets.
Stage 3: Train
The train stage reads prepared features and fits the model, then saves the fitted artifact to disk for the next stage to score.
model.fit(X_train, y_train)
joblib.dump(model, "models/model.pkl")Stage 4: Eval
The eval stage loads the saved model, scores it on the held-out test set, and writes metrics like accuracy to a file you can track.
score = model.score(X_test, y_test)
json.dump({"accuracy": score}, open("metrics.json", "w"))Stages Pass Files, Not Variables
Stages talk to each other through files on disk, not in-memory variables. That decoupling is what lets you re-run one stage without the others.
Why Stages Are Cacheable
Because each stage has fixed inputs and outputs, a tool can cache its result. If the inputs did not change, the stage is skipped entirely.
Each Stage Is Its Own Script
Give every stage one small script with a clear job. ingest.py, prep.py, train.py, eval.py read inputs and write outputs, nothing more.
Stages Form a DAG
Stages connect into a DAG, a directed graph where each step depends on the ones before it. Eval depends on train, train on prep, prep on ingest.
Clear Stages Make Debugging Easy
When a run fails, distinct stages tell you exactly where it broke. You can re-run just the failed stage instead of the whole pipeline.
Quick Check
Let us check how stages communicate.
Recap: Ingest, Prep, Train, Eval
You learned to split training into four cacheable stages that pass data through files. Clear stages mean faster reruns and far easier debugging. 🚀
Często zadawane pytania
Czy lekcja „Etapy: Ingest, Prep, Train, Eval” jest bezpłatna?
Tak — pełny tekst „Etapy: Ingest, Prep, Train, Eval” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu MLOps Academy, przejdź na CoddyKit PRO. Kurs MLOps Academy zawiera 4 lekcji w sumie.
Co nauczysz się w „Etapy: Ingest, Prep, Train, Eval”?
Podziel trenowanie na przejrzyste kroki, które można buforować Ćwiczysz MLOps Academy z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.
Czy potrzebuję doświadczenia, aby zacząć MLOps Academy?
Nie wymagamy żadnego doświadczenia. MLOps Academy w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 1 z 4.
Ile czasu zajmuje lekcja „Etapy: Ingest, Prep, Train, Eval”?
Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.
Czy mogę pisać i uruchamiać kod w tej lekcji MLOps Academy?
Tak. Każda lekcja MLOps Academy zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.
Wszystkie lekcje w tym kursie
- Etapy: Ingest, Prep, Train, Eval
- Definiowanie potoku za pomocą etapów DVC
- Buforowanie i pomijanie niezmienionych kroków
- Parametryzowanie uruchomień za pomocą params.yaml