Skip to main content

class wandb.apis.public.ConsoleLogs

A lazy iterator over a run’s console log lines, oldest first. Fetched from the W&B backend page by page. Fetched lines are kept in memory, so iterating a second time replays the same lines instead of refetching; create a new instance to re-read a log that may have grown.

Args

  • service_api: The service API instance used to query W&B.
  • run: The run whose console log is read.
  • per_page: Number of lines to fetch per request when reading the log from the beginning. Ignored when last is given.
  • last: If set, fetch only the last N lines of the log in a single request instead of reading from the beginning. The backend caps how many lines one request returns, so a larger tail comes back truncated to the newest lines.

Methods

method Paginator.next()

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