Export Task
- class labelbox.schema.export_task.BufferedJsonConverterOutput(json: Any)[source]
Bases:
object
Output with the JSON object
- class labelbox.schema.export_task.BufferedStream(ctx: _TaskContext)[source]
Bases:
Generic
[OutputT
]Streams data from a Reader.
- class labelbox.schema.export_task.ExportTask(task: Task, is_export_v2: bool = False)[source]
Bases:
object
An adapter class for working with task objects, providing extended functionality and convenient access to task-related information.
This class wraps a Task object, allowing you to interact with tasks of this type. It offers methods to retrieve task results, errors, and metadata, as well as properties for accessing task details such as UID, status, and creation time.
- property completion_percentage
Returns the completion percentage of the task.
- property created_at
Returns the time the task was created.
- property created_by
Returns the user who created the task.
- property deleted
Returns whether the task is deleted.
- property errors
Returns the errors of the task.
- property errors_url
Returns the errors URL of the task.
- get_buffered_stream(stream_type: StreamType = StreamType.RESULT) BufferedStream [source]
Returns the result of the task.
- Parameters:
stream_type (StreamType, optional) – The type of stream to retrieve. Defaults to StreamType.RESULT.
- Returns:
The buffered stream object.
- Return type:
Stream
- Raises:
ExportTask.ExportTaskException – If the task has failed or is not ready yet.
ValueError – If the task does not have the specified stream type.
- get_total_file_size(stream_type: StreamType) int | None [source]
Returns the total file size for a specific task.
- get_total_lines(stream_type: StreamType) int | None [source]
Returns the total file size for a specific task.
- property metadata
Returns the metadata of the task.
- property name
Returns the name of the task.
- property organization
Returns the organization of the task.
- property result
Returns the result of the task.
- property result_url
Returns the result URL of the task.
- property status
Returns the status of the task.
- property type
Returns the type of the task.
- property uid
Returns the uid of the task.
- property updated_at
Returns the last time the task was updated.