> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# `wandb` ファイルのローカルの保存場所を指定するにはどうすればよいですか？

`wandb` がローカルでファイルを保存する場所は、次の環境変数を設定するか、該当する場合は SDK に同等の引数を渡すことで制御できます。各変数はそれぞれ異なる場所に対応しており、個別のデフォルト値があります。

* `WANDB_DIR=<path>` または `wandb.init(dir=<path>)`: トレーニングスクリプト用に作成される `wandb` フォルダの場所を設定します。デフォルトは `./wandb` です。このフォルダには run のデータとログが保存されます。
* `WANDB_ARTIFACT_DIR=<path>` または `wandb.Artifact().download(root="<path>")`: `wandb` が Artifacts をダウンロードする場所を設定します。デフォルトは `./artifacts` です。
* `WANDB_CACHE_DIR=<path>`: `wandb.Artifact` を呼び出したときに Artifacts が作成され、保存される場所です。デフォルトは `~/.cache/wandb` です。
* `WANDB_CONFIG_DIR=<path>`: 設定ファイルが保存される場所です。デフォルトは `~/.config/wandb` です。
* `WANDB_DATA_DIR=<path>`: upload 時に Artifacts をステージングするために使用される場所を制御します。デフォルトは `~/.cache/wandb-data/` です。

***

<Badge stroke shape="pill" color="orange" size="md">[環境変数](/ja/support/models/tags/environment-variables)</Badge><Badge stroke shape="pill" color="orange" size="md">[Experiments](/ja/support/models/tags/experiments)</Badge>
