Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Sphinx==4.5.0
Sphinx~=5.3.0
sphinx-rtd-theme==0.5.1
29 changes: 17 additions & 12 deletions labelbox/schema/annotation_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def inputs(self) -> List[Dict[str, Any]]:
def errors(self) -> List[Dict[str, Any]]:
"""
Errors for each individual annotation uploaded. This is a subset of statuses

Returns:
List of dicts containing error messages. Empty list means there were no errors
See `AnnotationImport.statuses` for more details.
Expand All @@ -63,22 +64,26 @@ def errors(self) -> List[Dict[str, Any]]:
def statuses(self) -> List[Dict[str, Any]]:
"""
Status for each individual annotation uploaded.

Returns:
A status for each annotation if the upload is done running.
See below table for more details

.. list-table::
:widths: 15 150
:header-rows: 1
* - Field
- Description
* - uuid
- Specifies the annotation for the status row.
* - dataRow
- JSON object containing the Labelbox data row ID for the annotation.
* - status
- Indicates SUCCESS or FAILURE.
* - errors
- An array of error messages included when status is FAILURE. Each error has a name, message and optional (key might not exist) additional_info.
:widths: 15 150
:header-rows: 1

* - Field
- Description
* - uuid
- Specifies the annotation for the status row.
* - dataRow
- JSON object containing the Labelbox data row ID for the annotation.
* - status
- Indicates SUCCESS or FAILURE.
* - errors
- An array of error messages included when status is FAILURE. Each error has a name, message and optional (key might not exist) additional_info.

* This information will expire after 24 hours.
"""
self.wait_until_done()
Expand Down
4 changes: 2 additions & 2 deletions labelbox/schema/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def data_rows(
"""
Custom method to paginate data_rows via cursor.

Params:
Args:
from_cursor (str): Cursor (data row id) to start from, if none, will start from the beginning
where (dict(str,str)): Filter to apply to data rows. Where value is a data row column name and key is the value to filter on.
example: {'external_id': 'my_external_id'} to get a data row with external_id = 'my_external_id'
example: {'external_id': 'my_external_id'} to get a data row with external_id = 'my_external_id'


NOTE:
Expand Down
12 changes: 8 additions & 4 deletions labelbox/schema/model_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def upsert_labels(self,
label_ids: Optional[List[str]] = None,
project_id: Optional[str] = None,
timeout_seconds=3600):
""" Adds data rows and labels to a Model Run
"""
Adds data rows and labels to a Model Run

Args:
label_ids (list): label ids to insert
project_id (string): project uuid, all project labels will be uploaded
Expand Down Expand Up @@ -271,14 +273,16 @@ def add_predictions(
name: str,
predictions: Union[str, Path, Iterable[Dict], Iterable["Label"]],
) -> 'MEAPredictionImport': # type: ignore
""" Uploads predictions to a new Editor project.
"""
Uploads predictions to a new Editor project.

Args:
name (str): name of the AnnotationImport job
predictions (str or Path or Iterable):
url that is publicly accessible by Labelbox containing an
predictions (str or Path or Iterable): url that is publicly accessible by Labelbox containing an
ndjson file
OR local path to an ndjson file
OR iterable of annotation rows

Returns:
AnnotationImport
"""
Expand Down