Documentation Index
Fetch the complete documentation index at: https://translations.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
GitHub 소스 코드
function bar
bar(
table: 'wandb.Table',
label: 'str',
value: 'str',
title: 'str' = '',
split_table: 'bool' = False
) → CustomChart
wandb.Table 데이터를 사용하여 막대 차트를 생성합니다.
Args:
table: 막대 차트에 사용할 데이터를 포함하는 테이블입니다.
label: 각 막대의 레이블에 사용할 열 이름입니다.
value: 각 막대의 값에 사용할 열 이름입니다.
title: 막대 차트의 제목입니다.
split_table: 테이블을 W&B UI에서 별도의 섹션으로 분리할지 여부입니다. True이면 테이블은 “Custom Chart Tables”라는 이름의 섹션에 표시됩니다. 기본값은 False입니다.
Returns:
CustomChart: W&B에 로그할 수 있는 커스텀 차트 객체입니다. 차트를 로그하려면 이를 wandb.log()에 전달합니다.
Example:
import random
import wandb
# 테이블에 사용할 임의 데이터 생성
data = [
["car", random.uniform(0, 1)],
["bus", random.uniform(0, 1)],
["road", random.uniform(0, 1)],
["person", random.uniform(0, 1)],
]
# 데이터로 테이블 생성
table = wandb.Table(data=data, columns=["class", "accuracy"])
# W&B 실행을 초기화하고 막대 그래프 기록
with wandb.init(project="bar_chart") as run:
# 테이블에서 막대 그래프 생성
bar_plot = wandb.plot.bar(
table=table,
label="class",
value="accuracy",
title="Object Classification Accuracy",
)
# W&B에 막대 차트 기록
run.log({"bar_plot": bar_plot})