메인 콘텐츠로 건너뛰기
원하는 값을 전달하여 아티팩트의 description, metadata, alias를 업데이트합니다. save() 메서드를 호출해 W&B 서버의 아티팩트를 업데이트합니다. 아티팩트는 W&B run 중이거나 run 외부에서 모두 업데이트할 수 있습니다.
Artifact.save() 또는 wandb.Run.log_artifact()를 언제 사용할지
  • 새 run을 생성하지 않고 기존 아티팩트를 업데이트하려면 Artifact.save()를 사용합니다.
  • 새 아티팩트를 생성하고 특정 run과 연결하려면 wandb.Run.log_artifact()를 사용합니다.
run 외부에서 아티팩트를 업데이트하려면 W&B Public API(wandb.Api)를 사용합니다. run 중에 아티팩트를 업데이트하려면 Artifact API(wandb.Artifact)를 사용합니다.
Model Registry에서 모델에 연결된 아티팩트의 alias는 업데이트할 수 없습니다.
다음 코드 예제는 wandb.Artifact API를 사용해 아티팩트의 description을 업데이트하는 방법을 보여줍니다:
import wandb

with wandb.init(project="<example>") as run:
    artifact = run.use_artifact("<artifact-name>:<alias>")
    artifact.description = "<description>"
    artifact.save()