본문 바로가기

부스트캠프 AI Tech/Pytorch

[14] monitoring tool - wandb

weight & biases


  • 머신러닝 실험을 원활히 지원하기 위한 상용도구
  • 협업, code versioning, 실험 결과 기록 등 제공
  • MLOps의 대표적인 툴
  • loss, acc log 뿐아니라 gqu, cqu, network traffic 체크 가능

사용법

https://wandb.ai/

 

Weights & Biases – Developer tools for ML

WandB is a central dashboard to keep track of your hyperparameters, system metrics, and predictions so you can compare models live, and share your findings.

wandb.ai

 

로그인 하고 API키 할당 받고 새로운 프로젝트 생성

pip install wandb
import wandb

wandb login  # API 키 입력 필요

# wandb 프로젝트 실행
wandb.init(project="helloworld", entity="hantaeho")

# config 설정
wandb.config = {
  "learning_rate": 0.001,
  "epochs": 100,
  "batch_size": 128
}

# train loop 안에 log하기
wandb.log({"loss": loss})

# Optional
wandb.watch(model)

실습결과

 

### 튜토리얼 링크

https://docs.wandb.ai/guides/integrations/pytorch

 

PyTorch - Documentation

If you also want to include information alongside media, like your model's predictions or derived metrics, use a wandb.Table.

docs.wandb.ai

 

'부스트캠프 AI Tech > Pytorch' 카테고리의 다른 글

[16] Hyperparameter Tuning  (0) 2022.01.24
[15] Multi-GPU 학습  (0) 2022.01.24
[13] Monitoring tool - Tensorboard  (0) 2022.01.24
[12] 전이학습 tansfer learning  (0) 2022.01.24
[11] image transform  (1) 2022.01.23