Skip to main content
Plotly 또는 Bokeh figure를 테이블에 직접 통합하는 기능은 지원되지 않습니다. 대신 figure를 HTML로 내보낸 후 해당 HTML을 테이블에 포함하세요. 아래는 대화형 Plotly 및 Bokeh 차트로 이를 수행하는 예시입니다.
import wandb
import plotly.express as px

# 새 run 초기화
with wandb.init(project="log-plotly-fig-tables", name="plotly_html") as run:

    # 테이블 생성
    table = wandb.Table(columns=["plotly_figure"])

    # Plotly figure 경로 정의
    path_to_plotly_html = "./plotly_figure.html"

    # Plotly figure 생성
    fig = px.scatter(x=[0, 1, 2, 3, 4], y=[0, 1, 4, 9, 16])

    # Plotly figure를 HTML로 내보내기
    # auto_play를 False로 설정하면 애니메이션 Plotly 차트가 자동 재생되지 않습니다
    fig.write_html(path_to_plotly_html, auto_play=False)

    # Plotly figure를 HTML 파일로 테이블에 추가
    table.add_data(wandb.Html(path_to_plotly_html))

    # 테이블 로깅
    run.log({"test_table": table})


Experiments Tables 차트