메인 콘텐츠로 건너뛰기
W&B Runs 를 초기화하고 관리하여 Experiments 를 정리하고 작업 내용을 추적하세요.

Experiment 생성하기

"""
Create an experiment in W&B. If the project does not exist, W&B creates it.

Note that this file only initializes the experiment; you can add code to log metrics,
artifacts, etc., within the `with` block.
"""
import wandb

# Initialize a W&B run
with wandb.init(project="<project>") as run:
    # Experiment code goes here
    pass

특정 스텝에서 기존 run 포크하기

"""Fork an existing W&B run from a specific step."""

import wandb

# Initialize a run to be forked later
with wandb.init(project="<project>", entity="<entity>") as original_run:
    # Training and logging code goes here.
    pass

# Fork the run from a specific step
with wandb.init(project="<project>",entity="<entity>", fork_from=f"{original_run.id}?_step=200") as forked_run:
    # Training and logging code goes here.
    pass

run 초기화하기

"""
Initializes a W&B run.

W&B automatically creates the project if it does not exist. Note that this
file only initializes the experiment; you can add code to log metrics,
artifacts, etc., within the `with` block.
"""
import wandb

# Note the usage of `with` statement to ensure proper resource management.
with wandb.init(project="<project>") as run:
    # Training and logging code goes here
    pass