Slice

class labelbox.schema.slice.CatalogSlice(client, field_values)[source]

Bases: Slice

Represents a Slice used for filtering data rows in Catalog.

export(task_name: str | None = None, params: CatalogExportParams | None = None) ExportTask[source]

Creates a slice export task with the given params and returns the task. >>> slice = client.get_catalog_slice(“SLICE_ID”) >>> task = slice.export( >>> params={“performance_details”: False, “label_details”: True} >>> ) >>> task.wait_till_done() >>> task.result

export_v2(task_name: str | None = None, params: CatalogExportParams | None = None) Task | ExportTask[source]

Creates a slice export task with the given params and returns the task. >>> slice = client.get_catalog_slice(“SLICE_ID”) >>> task = slice.export_v2( >>> params={“performance_details”: False, “label_details”: True} >>> ) >>> task.wait_till_done() >>> task.result

get_data_row_identifiers() PaginatedCollection[source]

Fetches all data row ids and global keys (where defined) that match this Slice

Returns:

A PaginatedCollection of Slice.DataRowIdAndGlobalKey

get_data_row_ids() PaginatedCollection[source]

Fetches all data row ids that match this Slice

Returns:

A PaginatedCollection of mapping of data row ids to global keys

class labelbox.schema.slice.ModelSlice(client, field_values)[source]

Bases: Slice

Represents a Slice used for filtering data rows in Model.

get_data_row_identifiers(model_run_id: str) PaginatedCollection[source]

Fetches all data row ids and global keys (where defined) that match this Slice

Params: model_run_id : str, required, uid or cuid of model run

Returns:

A PaginatedCollection of Slice.DataRowIdAndGlobalKey

get_data_row_ids(model_run_id: str) PaginatedCollection[source]

Fetches all data row ids that match this Slice

Params model_run_id: str, required, uid or cuid of model run

Returns:

A PaginatedCollection of data row ids

class labelbox.schema.slice.Slice(client, field_values)[source]

Bases: DbObject

A Slice is a saved set of filters (saved query). This is an abstract class and should not be instantiated.

name
Type:

datetime

description
Type:

datetime

created_at
Type:

datetime

updated_at
Type:

datetime

filter
Type:

json

class DataRowIdAndGlobalKey(id: str, global_key: str | NoneType)[source]

Bases: object