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

# 코드를 저장하려면 어떻게 해야 하나요?‌

`wandb.init`에서 `save_code=True`를 사용하면 run을 시작하는 메인 스크립트나 노트북을 저장할 수 있습니다. run의 모든 코드를 저장하려면 Artifacts로 코드를 버전 관리하세요. 다음 예제는 이 과정을 보여줍니다.

```python theme={null}
code_artifact = wandb.Artifact(type="code")
code_artifact.add_file("./train.py")
wandb.log_artifact(code_artifact)
```

***

<Badge stroke shape="pill" color="orange" size="md">[Artifacts](/ko/support/models/tags/artifacts)</Badge>
