> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-2516.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Sweep

export const GitHubLink = ({url, compact = false}) => <a href={url} target="_blank" rel="noopener noreferrer" className={compact ? "source-link" : "github-source-link"}>
    {compact ? "소스 보기" : <>
    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
    </svg>
    GitHub 소스 코드
      </>}
  </a>;

<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/apis/public/sweeps.py#L272" />

## <Badge color="yellow" size="lg" shape="rounded">클래스</Badge> wandb.apis.public.Sweep

스윕에 연결된 Runs 집합입니다.

```python theme={null}
(service_api: 'ServiceApi',
entity: 'str',
project: 'str',
sweep_id: 'str',
attrs: 'Mapping[str, Any] | None' = None)
```

<div id="args">
  ## 인수
</div>

<ResponseField name="service_api" type="ServiceApi">
  설명이 제공되지 않았습니다.
</ResponseField>

<ResponseField name="entity" type="str">
  설명이 제공되지 않았습니다.
</ResponseField>

<ResponseField name="project" type="str">
  설명이 제공되지 않았습니다.
</ResponseField>

<ResponseField name="sweep_id" type="str">
  설명이 제공되지 않았습니다.
</ResponseField>

<ResponseField name="attrs" type="Mapping[str, Any] | None">
  설명이 제공되지 않았습니다.
</ResponseField>

<div id="attributes">
  ## 속성
</div>

* `runs` (`Runs`): Runs 목록
* `id` (`str`): 스윕 ID
* `project` (`str`): 스윕가 속한 프로젝트 이름
* `config` (`dict`): 스윕 설정이 포함된 사전
* `state` (`str`): 스윕의 상태입니다. "Finished", "Failed", "Crashed" 또는 "Running"일 수 있습니다.
* `expected_run_count` (`int`): 스윕의 예상 Runs 수

<div id="attributes">
  ## 속성
</div>

<ResponseField name="config" type="">
  스윕에 사용되는 스윕 설정입니다.
</ResponseField>

<ResponseField name="entity" type="str">
  스윕과 연결된 entity입니다.
</ResponseField>

<ResponseField name="expected_run_count" type="int | None">
  스윕에서 예상되는 Runs 수를 반환합니다. 무한 Runs의 경우 None을 반환합니다.
</ResponseField>

<ResponseField name="name" type="">
  스윕의 이름입니다.

  다음 우선순위에 따라 존재하는 첫 번째 이름을 반환합니다.

  1. 사용자가 편집한 표시 이름
  2. 생성 시 설정된 이름
  3. 스윕 ID
</ResponseField>

<ResponseField name="order" type="">
  스윕의 순서 키를 반환합니다.
</ResponseField>

<ResponseField name="path" type="">
  프로젝트의 경로를 반환합니다.

  경로는 entity, 프로젝트 이름 및 스윕 ID가 포함된 목록입니다.
</ResponseField>

<ResponseField name="url" type="">
  스윕의 URL입니다.

  스윕 URL은 entity, 프로젝트, "sweeps"라는 용어 및 스윕 ID.run\_id로 생성됩니다.
  SaaS 사용자의 경우 형식은
  `https://wandb.ai/entity/project/sweeps/sweeps_ID`입니다.
</ResponseField>

<ResponseField name="username" type="str">
  사용 중단되었습니다. 대신 `Sweep.entity`를 사용하세요.
</ResponseField>

<div id="methods">
  ## 메서드
</div>

### <Badge color="blue" size="lg" shape="rounded">방법</Badge> Sweep.agent()

```python theme={null}
self,
agent_id: 'str'
```

이 스윕에서 ID로 에이전트를 쿼리합니다.

<div id="arguments">
  ##### 인수
</div>

<ResponseField name="agent_id" type="str">
  조회할 에이전트의 ID입니다.
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">방법</Badge> Sweep.agents()

```python theme={null}
self
```

이 스윕의 모든 에이전트 목록을 쿼리합니다.

### <Badge color="blue" size="lg" shape="rounded">방법</Badge> Sweep.best\_run()

```python theme={null}
(self, order=None)
```

설정에 정의된 메트릭 또는 전달된 순서를 기준으로 정렬된 최상의 run을 반환합니다.

<div id="arguments">
  ##### 인수
</div>

<ResponseField name="order" type="_empty">
  설명이 없습니다.
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">방법</Badge> Sweep.enqueue\_run()

```python theme={null}
self,
config: 'dict',
display_name: 'str | None' = None
```

스윕의 run을 큐에 추가합니다.

<div id="arguments">
  ##### 인수
</div>

<ResponseField name="config" type="dict">
  run의 설정입니다.
</ResponseField>

<ResponseField name="display_name" type="str | None">
  run의 선택적 표시 이름입니다.
</ResponseField>

<div id="raises">
  ##### 예외
</div>

* `UnsupportedError`: 서버가 스윕 run의 대기열 추가를 지원하지 않는 경우.

### <Badge color="blue" size="lg" shape="rounded">방법</Badge> Sweep.get()

```python theme={null}
(api: 'Api',
entity: 'str | None' = None,
project: 'str | None' = None,
sid: 'str | None' = None,
order: 'str | None' = None,
query: 'str | None' = None, **kwargs)
```

클라우드 백엔드에 쿼리를 실행합니다.

<div id="arguments">
  ##### 인수
</div>

<ResponseField name="api" type="Api">
  W\&B API 인스턴스입니다.
</ResponseField>

<ResponseField name="entity" type="str | None">
  프로젝트를 소유한 entity(사용자 이름 또는 팀)입니다.
</ResponseField>

<ResponseField name="project" type="str | None">
  스윕을 가져올 프로젝트 이름입니다.
</ResponseField>

<ResponseField name="sid" type="str | None">
  쿼리할 스윕 ID입니다.
</ResponseField>

<ResponseField name="order" type="str | None">
  스윕의 Runs가 반환되는 순서입니다.
</ResponseField>

<ResponseField name="query" type="str | None">
  쿼리 실행에 사용할 쿼리입니다.
</ResponseField>

<ResponseField name="kwargs" type="_empty">
  설명이 제공되지 않았습니다.
</ResponseField>

### <Badge color="blue" size="lg" shape="rounded">방법</Badge> Sweep.to\_html()

```python theme={null}
self,
height: 'int' = 420,
hidden: 'bool' = False
```

이 스윕을 표시하는 iframe이 포함된 HTML을 생성합니다.

<div id="arguments">
  ##### 인수
</div>

<ResponseField name="height" type="int">
  설명이 없습니다.
</ResponseField>

<ResponseField name="hidden" type="bool">
  설명이 없습니다.
</ResponseField>
