> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-dependabot-npm-and-yarn-scripts-css-minify-npm.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Automations Overview

> ML 파이프라인에서 자동화된 워크플로를 생성하고 관리하려면 W&B Automations API를 사용하세요

W\&B Automations API를 사용하면 ML 파이프라인의 이벤트에 반응하는 자동화된 워크플로를 프로그래밍 방식으로 생성하고 관리할 수 있습니다. 모델 성능 임계값이나 아티팩트 생성처럼 특정 조건이 충족될 때 트리거되도록 액션을 구성하세요.

<h3 id="core-classes">
  핵심 클래스
</h3>

| 클래스 | 설명 |
| - | - |
| [`Automation`](/ko/models/ref/python/automations/automation/) | 설정이 포함된 저장된 Automation 인스턴스를 나타냅니다. |
| [`NewAutomation`](/ko/models/ref/python/automations/newautomation/) | 새 Automation을 생성하는 빌더 클래스입니다. |

<h3 id="events-triggers">
  이벤트 (트리거)
</h3>

| 이벤트 | 설명 |
| - | - |
| [`OnRunMetric`](/ko/models/ref/python/automations/onrunmetric/) | run 메트릭이 정의된 조건(임계값, 변경 등)을 충족하면 트리거됩니다. |
| [`OnCreateArtifact`](/ko/models/ref/python/automations/oncreateartifact/) | 컬렉션에 새 아티팩트가 생성되면 트리거됩니다. |
| [`OnLinkArtifact`](/ko/models/ref/python/automations/onlinkartifact/) | 아티팩트가 레지스트리에 연결되면 트리거됩니다. |
| [`OnAddArtifactAlias`](/ko/models/ref/python/automations/onaddartifactalias/) | 아티팩트에 별칭이 추가되면 트리거됩니다. |

<h3 id="actions">
  액션
</h3>

| 액션 | 설명 |
| - | - |
| [`SendNotification`](/ko/models/ref/python/automations/sendnotification/) | Slack 또는 기타 통합 채널을 통해 알림을 전송합니다. |
| [`SendWebhook`](/ko/models/ref/python/automations/sendwebhook/) | 외부 서비스로 HTTP 웹훅 요청을 보냅니다. |
| [`DoNothing`](/ko/models/ref/python/automations/donothing/) | 자동화 설정을 테스트하기 위한 자리 표시자 액션입니다. |

<h3 id="filters">
  필터
</h3>

| 필터 | 설명 |
| - | - |
| [`MetricThresholdFilter`](/ko/models/ref/python/automations/metricthresholdfilter/) | 임계값과의 메트릭 값 비교를 기준으로 run을 필터링합니다. |
| [`MetricChangeFilter`](/ko/models/ref/python/automations/metricchangefilter/) | 시간에 따른 메트릭 값 변화를 기준으로 run을 필터링합니다. |

<h2 id="common-use-cases">
  일반적인 활용 사례
</h2>

<h3 id="model-performance-monitoring">
  모델 성능 모니터링
</h3>

* 모델 정확도가 임계값 아래로 떨어지면 알림
* 트레이닝 loss가 정체되면 팀에 알림
* 성능 메트릭을 기준으로 재트레이닝 파이프라인 트리거

<h3 id="artifact-management">
  Artifact 관리
</h3>

* 새 모델 버전이 생성되면 알림 전송
* 아티팩트에 태그가 지정되면 배포 워크플로 트리거
* 데이터셋이 업데이트되면 다운스트림 처리 자동화

<h3 id="experiment-tracking">
  실험 추적
</h3>

* 실패했거나 비정상 종료된 run에 대한 알림
* 장시간 실행되는 실험이 완료되면 알림 받기
* 실험 메트릭의 일일 요약 전송

<h3 id="integration-workflows">
  인테그레이션 워크플로
</h3>

* 웹훅을 통해 외부 추적 시스템을 업데이트
* 모델 레지스트리를 배포 플랫폼과 동기화
* W\&B 이벤트를 기반으로 CI/CD 파이프라인을 트리거

<h2 id="example-usage">
  사용 예시
</h2>

다음 예시에서는 `custom-metric`이라는 메트릭이 10을 초과할 때마다 Slack 알림을 보내는 자동화를 생성합니다. `custom-metric`은 트레이닝 중 `wandb.Run.log({"custom-metric": value })`를 사용해 로깅된다고 가정합니다.

```python theme={null}
import wandb
from wandb.automations import OnRunMetric, RunEvent, SendNotification

api = wandb.Api()

project = api.project("<my-project>", entity="<my-team>")

# 팀의 첫 번째 Slack 인테그레이션 사용
slack_hook = next(api.slack_integrations(entity="<my-team>"))

# 트리거 이벤트 생성
event = OnRunMetric(
     scope=project,
     filter=RunEvent.metric("custom-metric") > 10,
)

# 이벤트에 응답하는 액션 생성
action = SendNotification.from_integration(slack_hook)

# 자동화 생성
automation = api.create_automation(
     event >> action,
     name="my-automation",
     description="'custom-metric'이 10을 초과할 때마다 Slack 메시지 전송.",
)
```

Automations API를 사용하는 방법에 대한 자세한 내용은 [Automations 가이드](/ko/models/automations/)를 참조하세요.
