Batch

class labelbox.schema.batch.Batch(client, project_id, *args, failed_data_row_ids=[], **kwargs)[source]

Bases: DbObject

A Batch is a group of data rows submitted to a project for labeling

name
Type:

str

created_at
Type:

datetime

updated_at
Type:

datetime

deleted
Type:

bool

project[source]

ToOne relationship to Project

Type:

Relationship

created_by

ToOne relationship to User

Type:

Relationship

delete() None[source]

Deletes the given batch.

Note: Batch deletion for batches that has labels is forbidden.

Parameters:

batch (Batch) – Batch to remove queued data rows from

delete_labels(set_labels_as_template=False) None[source]

Deletes labels that were created for data rows in the batch.

Parameters:
  • batch (Batch) – Batch to remove queued data rows from

  • set_labels_as_template (bool) – When set to true, the deleted labels will be kept as templates.

project() Project[source]

Returns Project which this Batch belongs to

Raises:

LabelboxError – if the project is not found

remove_queued_data_rows() None[source]

Removes remaining queued data rows from the batch and labeling queue.

Parameters:

batch (Batch) – Batch to remove queued data rows from