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

> W&B を Julia と統合して、Julia プログラムから実験をトラッキングし、メトリクスをログして、モデル性能を可視化します。

# Julia 向け W&B

Julia で機械学習の実験を実行している場合は、コミュニティコントリビューターが作成した非公式の Julia バインディングである [`wandb.jl`](https://github.com/avik-pal/Wandb.jl) を使用できます。

その他の例については、[`wandb.jl` の examples ディレクトリ](https://github.com/avik-pal/Wandb.jl/tree/main/docs/src/examples) を参照してください。次のコードは、`wandb.jl` リポジトリの導入用サンプルです。

```julia theme={null}
using Wandb, Dates, Logging

# 新しいrunを開始し、設定でハイパーパラメーターをトラッキングする
lg = WandbLogger(project = "Wandb.jl",
                 name = "wandbjl-demo-$(now())",
                 config = Dict("learning_rate" => 0.01,
                               "dropout" => 0.2,
                               "architecture" => "CNN",
                               "dataset" => "CIFAR-100"))

# LoggingExtras.jl を使用して複数のロガーにまとめてログする
global_logger(lg)

# トレーニングまたは評価ループのシミュレーション
for x ∈ 1:50
    acc = log(1 + x + rand() * get_config(lg, "learning_rate") + rand() + get_config(lg, "dropout"))
    loss = 10 - log(1 + x + rand() + x * get_config(lg, "learning_rate") + rand() + get_config(lg, "dropout"))
    # スクリプトからW&Bにメトリクスをログする
    @info "metrics" accuracy=acc loss=loss
end

# runを終了する
close(lg)
```
