C.W.K.
Stream
Lesson 09 of 12 · published

비용 관리

~10 min · cost, budget, api

Level 0Apprentice
0 XP0/101 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

AI CI 청구는 달라

표준 CI 비용은 runner 분. AI CI 는 추가로 태움:

  • API token — 모든 eval 호출이 Anthropic / OpenAI 등에 닿음.
  • GPU 분 — CPU 보다 자릿수 차이.
  • Cloud egress — 모델 / dataset 들고/낼 때.
  • Model registry 저장 — checkpoint 가 쌓임.

Discipline 체크리스트

  1. (prompt SHA, 모델 버전, scorer SHA) 로 eval 결과 cache. 그거 안 바뀐 PR 에 모델 재호출 안 함.
  2. Smoke vs full — PR 엔 작은 subset, main / nightly 엔 full.
  3. Docs-only 엔 skip — AI workflow 에 paths-ignore.
  4. Concurrency — PR 재 push 에 cancel-in-progress.
  5. 예산 알림 — API provider 에 월 지출 cap; 예산 차단기 발화하면 CI fail-fast.
  6. 중노동은 self-hosted — 홈랩 GPU 분당 무료.

가시성

Run 의 API token 사용을 GitHub Step Summary 에 추가. 분기 동안 어떤 prompt / 어떤 test 패턴이 청구 지배하는지 볼 수 있음.

Code

Prompt + 모델 + scorer 의 eval cache key·yaml
      - name: Compute eval cache key
        id: keys
        run: |
          prompt_sha=$(git ls-files prompts/ | xargs sha256sum | sha256sum | cut -d' ' -f1)
          scorer_sha=$(git ls-files evals/scorers/ | xargs sha256sum | sha256sum | cut -d' ' -f1)
          echo "prompt=$prompt_sha" >> $GITHUB_OUTPUT
          echo "scorer=$scorer_sha" >> $GITHUB_OUTPUT
      - uses: actions/cache@v4
        with:
          path: .eval-cache/
          key: eval-${{ vars.MODEL_VERSION }}-${{ steps.keys.outputs.prompt }}-${{ steps.keys.outputs.scorer }}
          # Same prompt + model + scorer = re-use prior eval results

External links

Exercise

AI provider 의 지난 달 API 청구 가져와. 비용 driver 상위 3 (어떤 prompt? 어떤 test? 어떤 일정?) 식별. 가장 큰 거에 최소 하나 discipline 적용 (cache, smoke subset, paths-ignore).

Progress

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

댓글 0

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

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