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

# Python SDK 0.27.0

> インストール手順、クラス、関数のドキュメントを含む W&B Python SDK API リファレンスを参照できます。

`wandb` から利用できる W\&B Python SDK を使用すると、モデルのトレーニングやファインチューニングを行い、実験から本番までモデルを管理できます。

> この SDK でトレーニングとファインチューニングを行った後は、[Public API](/ja/models/ref/python/public-api) を使用してログされたデータをクエリして分析し、[Reports and Workspaces API](/ja/models/ref/wandb_workspaces) を使用して、作業内容を要約した Web で公開可能な[レポート](/ja/models/reports/)を生成できます。

<div id="installation-and-setup">
  ## インストールと設定
</div>

<div id="sign-up-and-create-an-api-key">
  ### サインアップしてAPIキーを発行する
</div>

W\&Bでこのマシンを認証するには、まず [User Settings](https://wandb.ai/settings) でAPIキーを発行する必要があります。

<div id="install-and-import-packages">
  ### パッケージのインストールとインポート
</div>

W\&B ライブラリをインストールします。

```
pip install wandb
```

<div id="import-wb-python-sdk">
  ### W\&B Python SDK をインポートする:
</div>

```python theme={null}
import wandb

# チーム entityを指定する
entity = "<team_entity>"

# runが記録されるproject
project = "my-awesome-project"

with wandb.init(entity=entity, project=project) as run:
   run.log({"accuracy": 0.9, "loss": 0.1})
```
