> ## 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 삭제

> W&B App 또는 Public API를 사용하여 W&B 프로젝트에서 run을 삭제하고, 삭제된 run 데이터가 저장소에서 제거되는 방식을 알아보세요.

<h2 id="delete-runs">
  run 삭제
</h2>

프로젝트에서 W\&B App 또는 Python API를 사용하여 run을 삭제하세요.

<Tabs>
  <Tab title="W&B App" value="ui">
    1. 삭제하려는 run이 포함된 프로젝트로 이동하세요.
    2. **Runs** 탭을 선택하세요.
    3. 삭제하려는 run 옆의 체크박스를 선택하세요.
    4. table 위의 **Delete** 버튼(휴지통 아이콘)을 선택하세요.
    5. 열리는 사이드 패널에서 **Delete**를 선택하세요.

    run이 많은 프로젝트에서는 검색창에서 정규 표현식으로 삭제할 run을 필터링하거나, 필터 버튼을 사용하여 상태, 태그 또는 기타 속성을 기준으로 run을 필터링할 수 있습니다.
  </Tab>

  <Tab title="Python" value="python">
    W\&B Public API를 사용하여 run을 프로그래밍 방식으로 삭제하세요. 삭제 오퍼레이션은 단일 run 또는 여러 run에 대해 한 번에 수행할 수 있습니다.

    단일 run을 삭제하려면 [`wandb.Api.Run.delete()`](/ko/products/wandb/ref/python/public-api/run#method-run-delete)를 사용하세요. run 경로를 `entity/project/runID` 형식으로 지정하세요.

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

    api = wandb.Api()

    run_path = "entity/project/runID"
    run = api.run(path=run_path)
    run.delete()
    ```

    `wandb.Api.runs()`를 사용하여 프로젝트에서 여러 run을 가져온 다음 각 run을 삭제하세요. 다음 예시는 프로젝트의 모든 run을 삭제합니다.

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

    api = wandb.Api()

    entity = "entity"
    project = "project"

    runs = api.runs(
        path=f"{entity}/{project}")

    for run in runs:
        run.delete()
    ```

    필터를 사용하면 생성 날짜, 태그 또는 기타 메타데이터 등 특정 조건에 맞는 run만 삭제할 수 있습니다. 다음 예시는 지정된 UTC 타임스탬프 이전에 생성된 run을 미리 확인한 후 삭제합니다.

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

    api = wandb.Api()

    entity = "entity"
    project = "project"
    cutoff = "2024-01-01T00:00:00Z"  # 이 UTC 타임스탬프 이전에 생성된 run을 삭제합니다

    runs = api.runs(
        path=f"{entity}/{project}",
        filters={"createdAt": {"$lt": cutoff}},
        order="+created_at",
    )

    # 먼저 dry run을 수행합니다.
    runs_to_delete = list(runs)
    print(f"Found {len(runs_to_delete)} runs to delete:")
    for run in runs_to_delete:
        print(run.id, run.name, run.created_at)

    confirm = input("Type DELETE to permanently delete these runs: ")
    if confirm == "DELETE":
        for run in runs_to_delete:
            print(f"Deleting {run.path}")
            run.delete()  # 또는 run.delete(delete_artifacts=True)
    ```

    로깅된 미디어처럼 run에 연결된 개별 파일을 제거하려면 다음 단계를 따르세요.

    1. [`wandb.Api.Run.files()`](/ko/products/wandb/ref/python/public-api/run#method-run-files)를 사용하여 해당 파일 핸들을 획득하세요.
    2. [`File.delete()`](/ko/products/wandb/ref/python/public-api/file#method-file-delete)를 사용하여 개별 파일을 삭제하세요.
  </Tab>
</Tabs>

run ID는 해당 run을 삭제한 후에도 재사용할 수 없습니다. 재사용하면 오류가 발생하여 run이 실패합니다.

<Warning>
  run을 삭제할 때 연결된 아티팩트도 삭제하도록 선택하면 아티팩트가 영구적으로 제거되며, 나중에 run을 복원하더라도 아티팩트는 복구할 수 없습니다. 레지스트리에 연결된 아티팩트도 여기에 포함됩니다.
</Warning>

<h2 id="run-deletion-flowchart">
  run 삭제 순서도
</h2>

다음 다이어그램은 연결된 아티팩트와 레지스트리 연결 처리를 포함한 전체 run 삭제 과정을 보여줍니다:

```mermaid theme={"system"}
graph TB
    Start([사용자가<br/>run 삭제 시작]) --> RunSelect[삭제할 run을<br/>선택하세요]
    RunSelect --> DeletePrompt{연결된 아티팩트를<br/>삭제하시겠습니까?}
    DeletePrompt -->|아니요| DeleteRunOnly[run만 삭제<br/><br/>- run 메타데이터 제거됨<br/>- 아티팩트는 계속 사용 가능<br/>- 아티팩트에 계속 액세스 가능]
    DeletePrompt -->|예| CheckArtifacts[연결된 아티팩트를<br/>확인하세요]
    CheckArtifacts --> HasRegistry{아티팩트가 모델 레지스트리에<br/>연결되어 있습니까?}
    HasRegistry -->|예| RegistryWarning[⚠️ 경고<br/><br/>레지스트리 모델이 삭제됩니다<br/>프로덕션 별칭에 영향을 미칩니다]
    HasRegistry -->|아니요| DirectDelete
    RegistryWarning --> ConfirmRegistry{레지스트리 모델 삭제를<br/>확인하시겠습니까?}
    ConfirmRegistry -->|아니요| DeleteRunOnly
    ConfirmRegistry -->|예| DirectDelete[run + 아티팩트 삭제<br/><br/>- run 메타데이터 제거됨<br/>- 아티팩트 영구 삭제됨<br/>- 레지스트리 연결 제거됨<br/>- 복구 불가]
    DeleteRunOnly --> PartialEnd([run 삭제됨<br/>아티팩트 보존됨])
    DirectDelete --> FullEnd([run + 아티팩트<br/>영구 삭제됨])
    style Start fill:#e1f5fe,stroke:#333,stroke-width:2px,color:#000
    style DeletePrompt fill:#fff3e0,stroke:#333,stroke-width:2px,color:#000
    style RegistryWarning fill:#ffecb3,stroke:#333,stroke-width:2px,color:#000
    style DirectDelete fill:#ffebee,stroke:#333,stroke-width:2px,color:#000
    style DeleteRunOnly fill:#e8f5e9,stroke:#333,stroke-width:2px,color:#000
    style PartialEnd fill:#c8e6c9,stroke:#333,stroke-width:2px,color:#000
    style FullEnd fill:#ffcdd2,stroke:#333,stroke-width:2px,color:#000
```

<h2 id="when-deleted-run-data-is-removed-from-storage">
  삭제된 run 데이터가 저장소에서 제거되는 시점
</h2>

[W\&B Dedicated Cloud](/ko/products/wandb/platform/hosting/hosting-options/dedicated-cloud) 및 [W\&B Self-Managed](/ko/products/wandb/platform/hosting/hosting-options/self-managed)에서는 `GORILLA_DATA_RETENTION_PERIOD` 환경 변수로 **삭제된 run 데이터**의 보존 기간을 제어합니다. 이 기간이 지나야 데이터를 오브젝트 저장소에서 영구적으로 제거할 수 있습니다. **아티팩트는 이 설정의 영향을 받지 않습니다**. 아티팩트는 [아티팩트 삭제](/ko/products/wandb/artifacts/delete-artifacts)에 설명된 아티팩트 삭제 및 가비지 컬렉션 절차를 따릅니다.

`GORILLA_DATA_RETENTION_PERIOD`를 설정하거나 변경하면 보존 윈도우를 지난 데이터는 복구할 수 없습니다. 보존 기능을 활성화하거나 보존 기간을 단축하기 전에 데이터베이스와 버킷을 백업하세요. 레퍼런스 table과 경고 사항은 [환경 변수 설정](/ko/products/wandb/platform/hosting/env-vars)을 참조하세요.

run 또는 파일을 삭제하고 보존 처리가 완료된 후에도 백그라운드 작업이 완료될 때까지 **버킷 사용이 지연될 수 있습니다**. W\&B는 오브젝트 저장소 공간이 즉시 회수된다고 보장하지 않습니다. 아티팩트와 run 데이터의 차이, 예상 소요 시간, operator가 선택적으로 수행할 수 있는 작업에 대한 전체 개요는 [버킷 저장소 및 비용 관리](/ko/products/wandb/platform/hosting/managing-bucket-storage)를 참조하세요.

<Note>
  Public API로 삭제한 내용이 W\&B App에 예상대로 반영되지 않으면 W\&B Python SDK를 최신 릴리스로 업그레이드한 후 다시 시도하세요.
</Note>
