Skip to content

Commit e5f08db

Browse files
Improve API reference.
1 parent 0ab589c commit e5f08db

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

labelbox/client.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,6 @@ def _get_single(self, db_object_type, uid):
218218
Raises:
219219
labelbox.exceptions.ResourceNotFoundError: If there is no object
220220
of the given type for the given ID.
221-
labelbox.exceptions.LabelboxError: Any error raised by
222-
`Client.execute` can also be raised by this function.
223221
"""
224222
query_str, params = query.get_single(db_object_type, uid)
225223
res = self.execute(query_str, params)
@@ -271,9 +269,6 @@ def _get_all(self, db_object_type, where):
271269
for filtering.
272270
Return:
273271
An iterable of `db_object_type` instances.
274-
Raises:
275-
labelbox.exceptions.LabelboxError: Any error raised by
276-
`Client.execute` can also be raised by this function.
277272
"""
278273
not_deleted = db_object_type.deleted == False
279274
where = not_deleted if where is None else where & not_deleted
@@ -291,9 +286,6 @@ def get_projects(self, where=None):
291286
for filtering.
292287
Return:
293288
An iterable of Projects (typically a PaginatedCollection).
294-
Raises:
295-
labelbox.exceptions.LabelboxError: Any error raised by
296-
`Client.execute` can also be raised by this function.
297289
"""
298290
return self._get_all(Project, where)
299291

@@ -305,9 +297,6 @@ def get_datasets(self, where=None):
305297
for filtering.
306298
Return:
307299
An iterable of Datasets (typically a PaginatedCollection).
308-
Raises:
309-
labelbox.exceptions.LabelboxError: Any error raised by
310-
`Client.execute` can also be raised by this function.
311300
"""
312301
return self._get_all(Dataset, where)
313302

@@ -319,9 +308,6 @@ def get_labeling_frontends(self, where=None):
319308
for filtering.
320309
Return:
321310
An iterable of LabelingFrontends (typically a PaginatedCollection).
322-
Raises:
323-
labelbox.exceptions.LabelboxError: Any error raised by
324-
`Client.execute` can also be raised by this function.
325311
"""
326312
return self._get_all(LabelingFrontend, where)
327313

labelbox/schema/dataset.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ def create_data_row(self, **kwargs):
3232
treated as an external URL.
3333
Raises:
3434
InvalidQueryError: If `DataRow.row_data` field value is not provided
35-
in `data`.
36-
any of the field names given in `data`.
35+
in `kwargs`.
3736
InvalidAttributeError: in case the DB object type does not contain
38-
any of the field names given in `data`.
37+
any of the field names given in `kwargs`.
3938
4039
"""
4140
DataRow = Entity.DataRow

labelbox/schema/project.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@ def setup(self, labeling_frontend, labeling_frontend_options):
193193
self.update(setup_complete=timestamp)
194194

195195
def set_labeling_parameter_overrides(self, data):
196-
""" Adds labeling parameter overrides to this project.
196+
""" Adds labeling parameter overrides to this project. Example:
197+
198+
>>> project.set_labeling_parameter_overrides([
199+
>>> (data_row_1, 2, 3), (data_row_2, 1, 4)])
200+
197201
Args:
198202
data (iterable): An iterable of tuples. Each tuple must contain
199203
(DataRow, priority, numberOfLabels) for the new override.

0 commit comments

Comments
 (0)