C.W.K.
Stream
Lesson 01 of 05 · published

End-to-End Workflow

~28 min · workflow, end-to-end

Level 0Scout
0 XP0/48 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

최소 viable pipeline

End-to-end ML 프로젝트는 정해진 모양 가짐: contract → data ingestion → audit → split → preprocessing pipeline → baseline → tuned 모델 → evaluation → calibration → threshold → artifact → deployment → monitoring. 어느 step 건너뛰면 production에 알려진 failure mode 등장.

scale 되는 폴더 구조

ml_project/
├── data/{raw,interim,processed}
├── notebooks/
├── src/
│   ├── contract.py
│   ├── features.py
│   ├── train.py
│   ├── eval.py
│   └── predict.py
├── tests/
├── artifacts/
└── README.md

reproducibility hook

Dependency 핀(uv, pip-tools, 또는 poetry). 모든 random source seed. dataset hash, code commit, hyperparameter, metric을 한 experiment record에 log. 팀이 10분 안에 실험 재실행 못 하면, 프로젝트 reproducible 아냐.

Code

trainable end-to-end script·python
import joblib
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from src.contract import load_contract
from src.features import build_preprocessor
from src.eval import evaluate

def main():
    contract = load_contract("contracts/churn.yaml")
    df = load_data(contract)
    X, y = df[contract.features], df[contract.target]
    pipe = Pipeline([("pre", build_preprocessor(contract)), ("clf", LogisticRegression(max_iter=1000))])
    pipe.fit(X, y)
    evaluate(pipe, X, y, contract)
    joblib.dump(pipe, contract.artifact_path)

if __name__ == "__main__":
    main()
artifact에 영향 주는 모든 거 핀·yaml
experiment:
  id: churn_2026_05_03_a
  data_hash: a8f1d8e9
  git_commit: 4f7c2e1
  random_seed: 7
  python: 3.12.4
  packages:
    scikit-learn: 1.5.0
    lightgbm: 4.5.0
  metrics:
    pr_auc: 0.317
    recall_at_p70: 0.62

External links

Exercise

최근 notebook을 src/ 모듈로 refactor 해서 python -m src.train --config contracts/your_problem.yaml로 invoke 가능하게. fresh kernel이 같은 artifact와 metric 생산하는지 검증.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.