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

# Runs

[View source](https://github.com/wandb/wandb/blob/main/wandb/apis/public/runs.py#L188)

## Class wandb.apis.public.Runs

A lazy iterator of `Run` objects associated with a project and optional filter.

Runs are retrieved in pages from the W\&B server as needed.

This is generally used indirectly using the `Api.runs` namespace.

```python theme={"system"}
(service_api: 'ServiceApi',
entity: 'str',
project: 'str',
filters: 'dict[str, Any] | None' = None,
order: 'str' = '+created_at',
per_page: 'int' = 50,
include_sweeps: 'bool' = False,
lazy: 'bool' = True,
api_key: 'str | None' = None)
```

## Args

**service\_api** `ServiceApi`

The service API to use for requests.

**entity** `str`

The entity (username or team) that owns the project.

**project** `str`

The name of the project to fetch runs from.

**filters** `dict[str, Any] | None`

Filters to apply to the runs query.

**order** `str`

Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. The default order is run.created\_at from oldest to newest.

**per\_page** `int`

The number of runs to fetch per request (default is 50).

**include\_sweeps** `bool`

Whether to include sweep information in the runs. Defaults to True.

**lazy** `bool`

Whether to defer loading heavy fields (config, summaryMetrics, systemMetrics) until they are accessed. Defaults to True.

**api\_key** `str | None`

No description provided.

## Methods

### method Runs.histories()

```python theme={"system"}
self,
samples: 'int' = 500,
keys: 'list[str] | None' = None,
x_axis: 'str' = '_step',
format: "Literal['default', 'pandas', 'polars']" = 'default',
stream: "Literal['default', 'system']" = 'default'
```

Return sampled history metrics for all runs that fit the filters conditions.

##### Arguments

**samples** `int`

The number of samples to return per run

**keys** `list[str] | None`

Only return metrics for specific keys

**x\_axis** `str`

Use this metric as the xAxis defaults to \_step

**format** `Literal['default', 'pandas', 'polars']`

Format to return data in, options are "default", "pandas", "polars"

**stream** `Literal['default', 'system']`

"default" for metrics, "system" for machine metrics

### method Paginator.**next**()

```python theme={"system"}
self
```

Return the next item from the iterator. When exhausted, raise StopIteration

### method Paginator.update\_variables()

```python theme={"system"}
self
```

Update the query variables for the next page fetch.

### method Runs.upgrade\_to\_full()

```python theme={"system"}
self
```

Upgrade this Runs collection from lazy to full mode.

This switches to fetching full run data and
upgrades any already-loaded Run objects to have full data.
Uses parallel loading for better performance when upgrading multiple runs.
