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)
모든 실험을 사각화하고 비교하세요
이전 모델의 체크포인트를 빠르게 찾고 다시 실행하세요
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 “When Inception-ResNet-V2 is too slow” by Stacey Svetlichnaya
CPU 및 GPU 사용량을 모니터링하세요
GPU 활용도와 같은 실시간 메트릭스를 시각화하여 모델 학습중 발생할 수 있는 성능 저하를 식별하고 리소스 낭비를 방지할 수 있습니다.
실시간으로 성능을 디버깅하세요
학습 중인 모델의 성능을 확인하고 문제 영역을 식별하세요. 이미지, 비디오, 오디오, 3D 개체를 포함한 다양한 미디어 형식을 지원합니다.
COVID-19 main protease in complex N3 (left) and COVID-19 main protease in complex with Z31792168 (right) from “Visualizing Molecular Structure with Weights & Biases” by Nicholas Bardy
데이터셋 버전 관리는 중복 제거가 가능하며 100GB의 무료 저장 공간이 제공됩니다
Weights & Biases는 자동으로 로깅된 데이터셋의 버전을 관리하고, 백그라운드에서 차이 비교(diffing) 및 중복 제거(deduplication)를 처리합니다.
MLOps Whitepaper
머신 러닝팀에 적합한 기술 스택을 구축하여 핵심 비즈니스 활동을 지원하고 지적 재산(IP)를 보호하는 방법에 대해 알아보세요.
어디에서나 접근 가능합니다
데스크톱과 모바일에서 최신 학습 모델과 결과를 확인하세요. 팀 간 협업을 위해 호스팅 된 프로젝트를 사용할 수 있습니다.
W&B 리포트를 활용한 디버깅의 과학
By Sarah Jane of Latent Space
Weights & Biases는 자동으로 로깅된 데이터셋의 버전을 관리하고, 백그라운드에서 차이 비교(diffing) 및 중복 제거(deduplication)를 처리합니다.
프로젝트 간의 진행 상황을 원활하게 공유하세요
간단한 기록 시스템으로 팀 프로젝트를 관리할 수 있습니다. . 모든 실험이 자동으로 문서화되고 중앙 저장소에 저장되므로 프로젝트를 원활하게 위임할 수 있습니다.