実験管理

あなたのモデルトレーニングのための正式な記録システム

MLモデルを追跡、比較、視覚化する 5行のコードで

スクリプトに数行を追加するだけで実験ログを迅速かつ簡単に実装し、結果のログを開始します。軽量なインテグレーションはあらゆるPythonスクリプトで動作します.

				
					import wandb

# 1. Start a W&B run
run = wandb.init(project="my_first_project")

# 2. Save model inputs and hyperparameters
config = wandb.config
config.learning_rate = 0.01

# 3. Log metrics to visualize performance over time
for i in range(10):
 run.log({"loss": 2**-i})
				
			
				
					import weave
from langchain_core.prompts import PromptTemplate
from langchain_openai import ChatOpenAI

# Initialize Weave with your project name
weave.init("langchain_demo")

llm = ChatOpenAI()
prompt = PromptTemplate.from_template("1 + {number} = ")

llm_chain = prompt | llm

output = llm_chain.invoke({"number": 2})

print(output)
				
			
				
					import weave
from llama_index.core.chat_engine import SimpleChatEngine

# Initialize Weave with your project name
weave.init("llamaindex_demo")

chat_engine = SimpleChatEngine.from_defaults()
response = chat_engine.chat(
    "Say something profound and romantic about fourth of July"
)
print(response)
				
			
				
					import wandb
# 1. Start a new run
run = wandb.init(project="gpt5")
# 2. Save model inputs and hyperparameters
config = run.config
config.dropout = 0.01
# 3. Log gradients and model parameters
run.watch(model)
for batch_idx, (data, target) in enumerate(train_loader):
...
   if batch_idx % args.log_interval == 0:
   # 4. Log metrics to visualize performance
      run.log({"loss": loss})
				
			
				
					import wandb
‍
# 1. Define which wandb project to log to and name your run
run = wandb.init(project="gpt-5",
run_name="gpt-5-base-high-lr")
‍
# 2. Add wandb in your `TrainingArguments`
args = TrainingArguments(..., report_to="wandb")
‍
# 3. W&B logging will begin automatically when your start training your Trainer
trainer = Trainer(..., args=args)
trainer.train()
				
			
				
					from lightning.pytorch.loggers import WandbLogger

# initialise the logger
wandb_logger = WandbLogger(project="llama-4-fine-tune")

# add configs such as batch size etc to the wandb config
wandb_logger.experiment.config["batch_size"] = batch_size

# pass wandb_logger to the Trainer 
trainer = Trainer(..., logger=wandb_logger)

# train the model
trainer.fit(...)

				
			
				
					import wandb
# 1. Start a new run
run = wandb.init(project="gpt4")
‍
# 2. Save model inputs and hyperparameters
config = wandb.config
config.learning_rate = 0.01
‍
# Model training here
# 3. Log metrics to visualize performance over time
‍
with tf.Session() as sess:
# ...
wandb.tensorflow.log(tf.summary.merge_all())
				
			
				
					import wandb
from wandb.keras import (
   WandbMetricsLogger,
   WandbModelCheckpoint,
)
‍
# 1. Start a new run
run = wandb.init(project="gpt-4")
‍
# 2. Save model inputs and hyperparameters
config = wandb.config
config.learning_rate = 0.01
...  # Define a model
# 3. Log layer dimensions and metrics
wandb_callbacks = [
   WandbMetricsLogger(log_freq=5),
   WandbModelCheckpoint("models"),
]
model.fit(
   X_train, y_train, validation_data=(X_test, y_test),
   callbacks=wandb_callbacks,
)
				
			
				
					import wandb
wandb.init(project="visualize-sklearn")
‍
# Model training here
# Log classifier visualizations
wandb.sklearn.plot_classifier(clf, X_train, X_test, y_train, y_test, y_pred, y_probas, labels,
model_name="SVC", feature_names=None)
‍
# Log regression visualizations
wandb.sklearn.plot_regressor(reg, X_train, X_test, y_train, y_test,  model_name="Ridge")
‍
# Log clustering visualizations
wandb.sklearn.plot_clusterer(kmeans, X_train, cluster_labels, labels=None, model_name="KMeans")
				
			
				
					import wandb
from wandb.xgboost import wandb_callback
‍
# 1. Start a new run
run = wandb.init(project="visualize-models")
‍
# 2. Add the callback
bst = xgboost.train(param, xg_train, num_round, watchlist, callbacks=[wandb_callback()])
‍
# Get predictions
pred = bst.predict(xg_test)
				
			

すべての実験を視覚化し比較する

モデル メトリクスがインタラクティブなグラフやテーブルにライブでストリーミングされることを確認します。モデルをどこでトレーニングしているかに関係なく、最新のMLモデルが以前の実験と比較してどのようにパフォーマンスを発揮しているかを簡単に確認できます。

過去のモデルチェックポイントを素早く見つけて再実行する

Weights & Biasesの実験管理システムは、後でモデルを再現するために必要なすべてを保存します—最新のgitコミット、ハイパーパラメータ、モデルの重み、さらにはサンプルテスト予測まで。実験ファイルやデータセットを直接Weights & Biasesに保存することも、あるいは自分のストレージへのポインタを保存することもできます。

import wandb

from transformers import DebertaV2ForQuestionAnswering

# 1. Create a wandb run

run = wandb.init(project=’turkish-qa’)

# 2. Connect to the model checkpoint you want on W&B

wandb_model = run.use_artifact(‘sally/turkish-qa/

deberta-v2:v5′)

# 3. Download the model files to a directory

model_dir = wandb_model.download()

# 4. Load your model

model = DebertaV2ForQuestionAnswering.from_pretrained(model_dir)

From “Inception-ResNet-V2 が遅すぎる場合” ステイシー・スヴェトリチナヤ著

CPUとGPUの使用状況をモニタリングする

GPU 使用率などのライブメトリクスを視覚化して、トレーニングのボトルネックを特定し、高価なリソースの無駄を回避します。

パフォーマンスをリアルタイムでデバッグする

モデルのパフォーマンスを確認し、トレーニング中に問題領域を特定します。画像、ビデオ、オーディオ、3Dオブジェクトなどのリッチ メディアをサポートします。

複合体N3内の COVID-19 メイン プロテアーゼ (左) およびZ31792168との複合体内のCOVID-19メイン プロテアーゼ (右) “重みと分子構造を視覚化する偏見”ニコラス・バーディ著

重複排除機能付きデータセットバージョニング 100GBの無料ストレージ

ログに記録されたデータセットは自動的にバージョン管理され、差分の検出と重複排除はWeights & Biasesによってバックグラウンドで処理されます。

MLOps 白書

機械学習チームに適切な技術スタックを構築することで、中核となるビジネスの取り組みをサポートし、知的財産を保護する方法をお読みください

どこからでもアクセス可能

デスクトップやモバイルで最新のトレーニングモデルと結果を確認できます。共同作業が可能なホステッドプロジェクトを使用して、チーム全体で連携することができます。

Weights & Biases プラットフォームは、
ワークフローをEnd-to-Endで効率化します

W&B Models

Experiments

ML実験のトラッキング
と可視化

Sweeps

ハイパーパラメータの
最適化

Registry

モデルとデータセット
の共有と公開

Automations

ワークフローの
自動トリガー

Launch

MLワークフローを
パッケージ化して実行

W&B Weave

Traces

LLMとプロンプトの
記録とトラッキング

Evaluations

生成AIアプリケーション
の評価

W&Bの価値

Artifacts

MLパイプラインの
バージョン管理

Tables

データとメトリクスの
可視化と探索

Reports

ライブレポートで
インサイトを共有

W&Bレポートによるデバッグの科学

Latent Space の Sarah Jane 著

ログに記録されたデータセットは自動的にバージョン管理され、差分検出と重複排除はWeights & Biasesによってバックグラウンドで処理されます。

進捗をプロジェクト間でシームレスに共有

軽量な記録システムでチームプロジェクトを管理します。すべての実験が自動的に十分に文書化され、中央に保存されるため、プロジェクトの引き継ぎが容易になります。

二度と進捗を失うことはありません。今すぐWeights & Biasesで実験の追跡を始めましょう。