> ## 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.

> W&B Artifacts의 개요, 작동 방식 및 사용을 시작하는 방법입니다.

# Artifacts 개요

export const TryProductLink = ({url}) => <a href={url} target="_blank" rel="noopener noreferrer" className="github-source-link">
    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" xmlns="http://www.w3.org/2000/svg">
      <line x1="4" y1="21" x2="4" y2="14"></line>
      <line x1="4" y1="10" x2="4" y2="3"></line>
      <line x1="12" y1="21" x2="12" y2="12"></line>
      <line x1="12" y1="8" x2="12" y2="3"></line>
      <line x1="20" y1="21" x2="20" y2="16"></line>
      <line x1="20" y1="12" x2="20" y2="3"></line>
      <circle cx="4" cy="12" r="2"></circle>
      <circle cx="12" cy="10" r="2"></circle>
      <circle cx="20" cy="14" r="2"></circle>
    </svg>
    Try in W&amp;B
  </a>;

export const ColabLink = ({url}) => <a href={url} target="_blank" rel="noopener noreferrer" className="colab-link">
    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01.21.03zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z" />
    </svg>
    Try in Colab
  </a>;

<CardGroup cols={4}>
  <ColabLink url="https://colab.research.google.com/github/wandb/examples/blob/master/colabs/wandb-artifacts/Pipeline_Versioning_with_W&B_Artifacts.ipynb" />

  <TryProductLink url="https://forge.coreweave.com/wandb/wandb/arttest/artifacts/model/iv3_trained/5334ab69740f9dda4fed/lineage" />
</CardGroup>

W\&B Artifacts를 사용하여 데이터의 입력과 출력으로 [W\&B Runs](/ko/products/wandb/runs)를 추적하고 버전 관리하세요. 예를 들어, 모델 트레이닝 run은 데이터셋을 입력으로 받아 트레이닝된 모델을 출력으로 생성할 수 있습니다. run에 하이퍼파라미터, 메타데이터, 메트릭을 로깅할 수 있으며, 아티팩트를 사용하여 모델 트레이닝에 사용된 데이터셋을 입력으로, 결과 모델 체크포인트를 출력으로 로깅, 추적 및 버전 관리할 수 있습니다.

<h2 id="use-cases">
  사용 사례
</h2>

전체 ML 워크플로에서 아티팩트를 [run](/ko/products/wandb/runs)의 입력과 출력으로 사용할 수 있습니다. 데이터셋, 모델 또는 다른 아티팩트를 처리할 입력으로 사용할 수 있습니다.

<Frame>
  <img src="https://mintcdn.com/coreweave-dbfa0e8d/3Dv_sw2eg8feUJlx/products/wandb/_media/artifacts_landing_page2.png?fit=max&auto=format&n=3Dv_sw2eg8feUJlx&q=85&s=473134067fd8e18b8e2cc3988de8b5de" alt="모델 트레이닝, 데이터 처리 및 모델 평가의 입력과 출력을 보여 주는 아티팩트 워크플로 다이어그램" width="1991" height="503" data-path="products/wandb/_media/artifacts_landing_page2.png" />
</Frame>

| 사용 사례 | 입력 | 출력 |
| - | - | - |
| 모델 트레이닝 | 데이터셋 (트레이닝 및 검증 데이터) | 트레이닝된 모델 |
| 데이터셋 전처리 | 데이터셋 (원시 데이터) | 데이터셋 (전처리된 데이터) |
| 모델 평가 | 모델 + 데이터셋 (테스트 데이터) | [W\&B Table](/ko/products/wandb/tables) |
| 모델 최적화 | 모델 | 최적화된 모델 |

<Note>
  다음 코드 스니펫은 순서대로 실행하도록 작성되었습니다.
</Note>

<h2 id="create-an-artifact">
  아티팩트 만들기
</h2>

네 줄의 코드로 아티팩트를 만드세요:

1. [W\&B run](/ko/products/wandb/runs)을 만드세요.
2. [`wandb.Artifact`](/ko/products/wandb/ref/python/experiments/artifact)로 아티팩트 객체를 만드세요.
3. `wandb.Artifact.add_file()`로 모델 파일이나 데이터셋 등의 파일을 하나 이상 아티팩트 객체에 추가하세요.
4. `wandb.Run.log_artifact()`로 아티팩트를 W\&B에 로깅하세요.

예를 들어, 다음 코드 스니펫은 `dataset.h5`라는 파일을 `example_artifact`라는 아티팩트에 로깅하는 방법을 보여줍니다:

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

with wandb.init(project="artifacts-example", job_type="add-dataset") as run:
    artifact = wandb.Artifact(name="example_artifact", type="dataset")
    artifact.add_file(local_path="./dataset.h5", name="training_dataset")
    run.log_artifact(artifact)
```

* 아티팩트의 `type`은 W\&B 플랫폼에서 아티팩트가 표시되는 방식에 영향을 줍니다. `type`을 지정하지 않으면 기본값인 `unspecified`로 설정됩니다.
* 드롭다운의 각 레이블은 서로 다른 `type` 매개변수 값을 나타냅니다. 위 코드 스니펫에서 아티팩트의 `type`은 `dataset`입니다.

<Note>
  Amazon S3 버킷과 같은 외부 객체 저장소에 저장된 파일이나 디렉터리에 대한 참조를 추가하는 방법은 [외부 파일 추적](/ko/products/wandb/artifacts/track-external-files) 페이지를 참조하세요.
</Note>

<h2 id="download-an-artifact">
  아티팩트 다운로드
</h2>

[`wandb.Run.use_artifact()`](/ko/products/wandb/ref/python/experiments/run#use_artifact) 방법을 사용하여 run에 입력으로 표시할 아티팩트를 지정하세요.

이전 코드 스니펫에 이어, 다음 코드 예시는 이전에 생성한 `example_artifact`라는 아티팩트를 사용하는 방법을 보여줍니다:

```python theme={"system"}
with wandb.init(project="artifacts-example", job_type="add-dataset") as run:
    artifact = run.use_artifact("training_dataset:latest")  # "my_data" 아티팩트를 사용하는 run 객체를 반환합니다
```

아티팩트 객체를 반환합니다.

다음으로, 반환된 객체를 사용하여 아티팩트의 모든 내용을 다운로드하세요:

```python theme={"system"}
datadir = artifact.download()  # `my_data` 아티팩트 전체를 기본 디렉터리에 다운로드합니다.
```

<Note>
  `root` [매개변수](/ko/products/wandb/ref/python/experiments/artifact)에 맞춤형 경로를 전달하여 특정 디렉터리에 아티팩트를 다운로드할 수 있습니다. 아티팩트를 다운로드하는 다른 방법과 추가 매개변수는 [아티팩트 다운로드 및 사용](/ko/products/wandb/artifacts/download-and-use-an-artifact) 가이드를 참조하세요.
</Note>

<h2 id="next-steps">
  다음 단계
</h2>

* 아티팩트의 [버전 관리](/ko/products/wandb/artifacts/create-a-new-artifact-version) 및 [업데이트](/ko/products/wandb/artifacts/update-an-artifact) 방법을 알아보세요.
* [자동화](/ko/products/wandb/automations)를 사용하여 아티팩트 변경에 따라 후속 워크플로를 트리거하거나 Slack 채널에서 알림 받기를 설정하는 방법을 알아보세요.
* 트레이닝된 모델을 보관하는 공간인 [레지스트리](/ko/products/registry)에 대해 알아보세요.
* [Python SDK](/ko/products/wandb/ref/python/experiments/artifact) 및 [CLI](/ko/products/wandb/ref/cli/wandb-artifact) 레퍼런스 가이드를 살펴보세요.


## Related topics

- [개요](/ko/products/wandb/runs.md)
