> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 튜토리얼: 프로젝트 run 실패 알림 자동화

> 프로젝트의 run이 실패하면 Slack 알림을 보내는 run 실패 알림을 구축하세요.

이 튜토리얼에서는 run 상태를 트리거로 사용하는 **프로젝트** 자동화를 구축하는 방법을 안내합니다. 프로젝트의 run이 **Failed** 상태로 전환되면 W\&B가 Slack 알림을 보냅니다. 이 자동화를 사용하면 팀이 실패한 run을 실시간으로 파악할 수 있으므로, 나중에야 실패를 발견하는 대신 바로 원인을 조사하고 문제를 해결할 수 있습니다.

<br />

<br />

```mermaid theme={"system"}
%%{init: {'flowchart': {'rankSpacing': 200;}}}%%
flowchart LR
  Event[run 상태 변경 → Failed]
  Action[Slack 알림]
  Event --> Action
```

<br />

<Tip>레지스트리 자동화를 생성하는 방법은 [튜토리얼: 레지스트리 아티팩트 별칭 자동화](/ko/products/wandb/automations/registry-automation-tutorial)를 참조하세요.</Tip>

<h2 id="prerequisites">
  사전 요구 사항
</h2>

* W\&B 프로젝트
* **팀 설정**에서 설정한 [Slack 인테그레이션](/ko/products/wandb/automations/create-automations/slack#add-a-slack-integration)

<h2 id="create-a-project-automation">
  프로젝트 자동화 만들기
</h2>

프로젝트 범위의 자동화를 설정하여 프로젝트 내 run이 **Failed** 상태로 전환되면 W\&B가 Slack 알림을 보내도록 하세요.

1. 프로젝트를 열고 사이드바에서 **Automations** 탭을 클릭한 다음 **Create automation**을 클릭하세요.
2. 이벤트로 **run 상태 변경**을 선택하고 상태를 **Failed**로 설정하세요. 필요하면 run 이름 또는 사용자 필터를 추가하여 자동화를 트리거할 run의 범위를 좁힐 수 있습니다.
3. **Next step**을 클릭하세요. **Action type**을 **Slack 알림**으로 설정하고 Slack 채널을 선택하세요.
4. **Next step**을 클릭하세요. 자동화 이름(예: "Run failure alert")과 설명(선택 사항)을 입력한 다음 **Create automation**을 클릭하세요.

이제 프로젝트에 자동화가 활성화되어, run이 실패하면 선택한 Slack 채널에 메시지가 게시됩니다. 자세한 내용은 [Slack 자동화 만들기](/ko/products/wandb/automations/create-automations/slack#create-an-automation)(Project 탭)를 참조하세요.

<h2 id="test-the-automation">
  자동화 테스트
</h2>

자동화가 올바르게 설정되었는지 확인하려면 일부러 실패시킨 run으로 자동화를 트리거하세요. 다음과 같이 run을 생성해 프로젝트에 로깅하고, 명시적으로 실패 상태로 표시하세요.

```python theme={"system"}
import wandb

with wandb.init(project="my-project") as run:
    run.log({"loss": 1.23})
    run.finish(exit_code=1)
```

잠시 후 run 링크와 상태가 포함된 Slack 메시지가 표시됩니다.

<h2 id="go-further">
  더 알아보기
</h2>

W\&B 자동화에 대해 이 튜토리얼에서 다루지 않은 내용을 더 알아보려면 다음 리소스를 참조하세요:

* 프로젝트 및 레지스트리의 모든 이벤트 유형에 대한 [Automation events and scopes](/ko/products/wandb/automations/automation-events).
* 전체 UI 및 페이로드 세부 정보에 대한 [Slack 자동화 만들기](/ko/products/wandb/automations/create-automations/slack) 및 [웹훅 자동화 만들기](/ko/products/wandb/automations/create-automations/webhook).
