> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-hivemind-launch.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

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

> 프로젝트에서 run이 실패하면 Slack 알림을 보내는 run 실패 알림을 구축합니다.

이 튜토리얼에서는 run 상태에 따라 트리거되는 **프로젝트** 자동화를 구축하는 방법을 안내합니다. 프로젝트의 run이 **Failed** 상태로 전환되면 W\&B가 Slack 알림을 전송합니다.

<br />

<br />

```mermaid theme={null}
%%{init: {'flowchart': {'rankSpacing': 200;}}}%%
flowchart LR
  Event[Run state change to Failed]
  Action[Slack notification]
  Event --> Action
```

<br />

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

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

* W\&B 프로젝트.
* **팀 settings**에 구성된 [Slack 인테그레이션](/ko/models/automations/create-automations/slack#add-a-slack-integration).

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

다음 지침에 따라 프로젝트 범위의 자동화를 설정하세요. 프로젝트의 run이 **Failed** 상태로 전환되면 W\&B가 Slack 알림을 보냅니다.

1. 프로젝트를 열고 사이드바에서 **Automations** 탭을 클릭한 다음 **Create automation**을 클릭하세요.
2. 이벤트로 **Run state change**를 선택하세요. 상태는 **Failed**로 설정하세요. 어떤 Runs가 자동화를 트리거할지 제한하려면 필요에 따라 run name 또는 사용자 필터를 추가하세요.
3. **Next step**을 클릭하세요. **Action type**을 **Slack notification**으로 설정하고 Slack 채널을 선택하세요.
4. **Next step**을 클릭하세요. 자동화 이름(예: "Run failure alert")과 선택 사항인 설명을 입력한 다음 **Create automation**을 클릭하세요.

자세한 내용은 [Slack 자동화 만들기](/ko/models/automations/create-automations/slack#create-an-automation) (Project 탭)을 참조하세요.

<div id="test-the-automation">
  ## 자동화 테스트하기
</div>

run을 생성하고 프로젝트에 로그한 다음, 이를 실패로 명시적으로 표시하세요:

```python theme={null}
import wandb

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

잠시 후 run 링크와 상태가 포함된 Slack 메시지를 확인할 수 있습니다.

## Go further

* [Automation events and scopes](/models/automations/automation-events) for all project and registry event types.
* [Create a Slack automation](/models/automations/create-automations/slack) and [Create a webhook automation](/models/automations/create-automations/webhook) for full UI and payload details.
