> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Reports and Workspaces API Overview

> W&B Reports and Workspaces API를 사용해 프로그래밍 방식으로 리포트와 워크스페이스를 생성하고 관리합니다

`wandb_workspaces`에서 제공되는 W\&B Reports and Workspaces API를 사용하면, 웹에 게시해 결과를 공유할 수 있는 [리포트](/ko/models/reports/)를 생성하고, 트레이닝 및 fine-tuning 작업이 수행된 [워크스페이스](/ko/models/app/features/cascade-settings/)를 사용자 지정할 수 있습니다.

<Card title="소스 코드 보기" href="https://github.com/wandb/wandb-workspaces/blob/main/wandb_workspaces/" icon="github" />

<Note>
  W\&B 리포트 and Workspace API는 Public Preview 상태입니다.
</Note>

<div id="installation-and-setup">
  ## 설치 및 설정
</div>

<div id="sign-up-and-create-an-api-key">
  ### 회원가입 후 API 키 생성하기
</div>

W\&B에서 머신을 인증하려면 먼저 [User Settings](https://wandb.ai/settings)에서 API 키를 생성해야 합니다.

<div id="install-and-import-packages">
  ### 패키지 설치 및 임포트
</div>

W\&B 리포트 및 Workspaces 라이브러리를 설치합니다.

```python theme={null}
pip install wandb-workspaces
```

<div id="create-a-report">
  ### 리포트 만들기
</div>

리포트를 만들려면 팀의 entity를 지정하고 리포트 이름을 입력하세요. 꺾쇠 괄호로 둘러싸인 텍스트를 값으로 바꾸세요:

```python theme={null}
import wandb_workspaces.reports.v2 as wr 
# 생성
report = wr.Report(
    entity="<team_entity>",
    project="<project_name>",
    title='Quickstart Report',
    description="That was easy!"
)

# 리포트 저장
report.save()
```

다음으로 리포트에 블록과 패널을 추가하세요. 예를 들어, 다음 코드는 목차, 헤더, 문단이 포함된 리포트를 생성합니다.

```python theme={null}
report.blocks = [
    wr.TableOfContents(),
    wr.H1("Text and images example"),
    wr.P("Lorem ipsum dolor sit amet."),
]
report.save()
```

전체 과정을 보여주는 예제는 [Reports API 퀵스타트](https://colab.research.google.com/github/wandb/examples/blob/master/colabs/intro/Report_API_Quickstart.ipynb) Google Colab을 참조하세요.

<div id="create-a-workspace">
  ### 워크스페이스 생성하기
</div>

다음 코드는 선형 플롯, 막대 플롯, 스칼라 차트의 세 패널이 포함된 섹션이 있는 워크스페이스를 생성하는 방법을 보여줍니다. 괄호로 둘러싸인 텍스트를 사용할 값으로 바꾸세요:

```python theme={null}
# 임포트하는 방법
import wandb_workspaces.workspaces as ws

# Workspace 생성
ws.Workspace(
     entity="<team_entity>", # workspace를 소유하는 entity
     project="<project_name>", # workspace와 연결된 프로젝트
     sections=[
         ws.Section(
             name="<Validation Metrics>",
             panels=[
                 wr.LinePlot(x="Step", y=["<val_loss>"]),
                 wr.BarPlot(metrics=["<val_accuracy>"]),
                 wr.ScalarChart(metric="<f1_score>", groupby_aggfunc="<mean>"),
             ],
             is_open=True,
         ),
     ],
)
workspace.save()
```

엔드투엔드 예제는 [Workspace API 퀵스타트](https://colab.research.google.com/github/wandb/wandb-workspaces/blob/Update-wandb-workspaces-tuturial/Workspace_tutorial.ipynb#scrollTo=MmxL0wjvrNtQ) Google Colab을 참조하세요.
