메인 콘텐츠로 건너뛰기

class Runs

프로젝트 및 선택 필터와 연결된 Run 객체의 lazy 이터레이터입니다. 필요할 때 W&B Server에서 페이지 단위로 Runs를 조회합니다. 일반적으로 Api.runs 네임스페이스를 통해 간접적으로 사용됩니다.

방법 Runs.__init__

__init__(
    client: 'RetryingClient',
    entity: 'str',
    project: 'str',
    filters: 'dict[str, Any] | None' = None,
    order: 'str' = '+created_at',
    per_page: 'int' = 50,
    include_sweeps: 'bool' = True,
    lazy: 'bool' = True,
    service_api: 'ServiceApi | None' = None
)
매개변수:
  • client: (wandb.apis.public.RetryingClient) 요청에 사용할 API 클라이언트입니다.
  • entity: (str) 프로젝트를 소유한 entity(사용자 이름 또는 팀)입니다.
  • project: (str) run을 가져올 프로젝트 이름입니다.
  • filters: (Optional[Dict[str, Any]]) run 쿼리에 적용할 필터 사전입니다.
  • order: (str) created_at, heartbeat_at, config.*.value, 또는 summary_metrics.*를 사용할 수 있습니다. 앞에 +를 붙이면 오름차순(기본값)이고, -를 붙이면 내림차순입니다. 기본 정렬 순서는 가장 오래된 항목부터 최신 항목까지의 run.created_at입니다.
  • per_page: (int) 요청당 가져올 run 수입니다(기본값: 50).
  • include_sweeps: (bool) run에 sweep 정보를 포함할지 여부입니다. 기본값은 True입니다.

속성 Runs.length


방법 Runs.histories

histories(
    samples: 'int' = 500,
    keys: 'list[str] | None' = None,
    x_axis: 'str' = '_step',
    format: "Literal['default', 'pandas', 'polars']" = 'default',
    stream: "Literal['default', 'system']" = 'default'
) → list[dict[str, Any]] | pd.DataFrame | pl.DataFrame
필터 조건에 맞는 모든 run의 샘플링된 이력 메트릭을 반환합니다. 매개변수:
  • samples: 각 run별로 반환할 샘플 수
  • keys: 특정 키에 대한 메트릭만 반환합니다
  • x_axis: 이 메트릭을 xAxis로 사용하며, 기본값은 _step입니다
  • format: 데이터를 반환할 형식입니다. 옵션은 “default”, “pandas”, “polars”입니다
  • stream: 메트릭에는 “default”, 시스템 메트릭에는 “system”을 사용합니다
반환값:
  • pandas.DataFrame: format="pandas"인 경우, 이력 메트릭이 담긴 pandas.DataFrame을 반환합니다.
  • polars.DataFrame: format="polars"인 경우, 이력 메트릭이 담긴 polars.DataFrame을 반환합니다.
  • list of dicts: format="default"인 경우, run_id 키를 포함한 이력 메트릭이 담긴 dict 목록을 반환합니다.

방법 Runs.upgrade_to_full

upgrade_to_full() → None
이 Runs collection을 lazy 모드에서 전체 모드로 업그레이드합니다. 그러면 전체 run 데이터를 가져오도록 전환되며, 이미 로드된 모든 Run 객체도 전체 데이터를 포함하도록 업그레이드됩니다. 여러 run을 업그레이드할 때 성능을 높이기 위해 병렬 로딩을 사용합니다.