Tinkex.CLI.Pagination (Tinkex v0.3.4)

View Source

Pagination logic for listing checkpoints and training runs.

Summary

Functions

Extracts the total count from a cursor.

Determines the initial page limit based on the requested limit and page size.

Calculates the pagination target based on limit, total count, and offset.

Functions

cursor_total(map)

Extracts the total count from a cursor.

initial_page_limit(limit, page_size)

Determines the initial page limit based on the requested limit and page size.

paginate_with(fetch_fun, acc, offset, page_size, target, total_count, initial_offset, label)

Paginates through results using a fetch function.

pagination_target(limit, total_count, offset)

Calculates the pagination target based on limit, total count, and offset.