diff --git a/docs/requirements.txt b/docs/requirements.txt index c46338f90..5926fb23d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,2 @@ -Sphinx==4.5.0 +Sphinx~=5.3.0 sphinx-rtd-theme==0.5.1 diff --git a/labelbox/schema/annotation_import.py b/labelbox/schema/annotation_import.py index 02a4e0f20..1cd4c0660 100644 --- a/labelbox/schema/annotation_import.py +++ b/labelbox/schema/annotation_import.py @@ -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. @@ -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() diff --git a/labelbox/schema/dataset.py b/labelbox/schema/dataset.py index 8ef194c78..9f7cba6ed 100644 --- a/labelbox/schema/dataset.py +++ b/labelbox/schema/dataset.py @@ -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: diff --git a/labelbox/schema/model_run.py b/labelbox/schema/model_run.py index ba56f2640..b2de493c7 100644 --- a/labelbox/schema/model_run.py +++ b/labelbox/schema/model_run.py @@ -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 @@ -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 """