Skip to content

Commit 028f449

Browse files
author
Val Brodsky
committed
Add docstrings
1 parent 66e8cb9 commit 028f449

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

libs/labelbox/src/labelbox/schema/labeling_service_dashboard.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,23 @@ def __init__(self, **kwargs):
6363

6464
@property
6565
def tasks_completed(self):
66+
"""
67+
Count how many data rows have been completed (i.e. in the Done queue)
68+
"""
6669
return self.data_rows_done_count
6770

6871
@property
6972
def tasks_remaining(self):
73+
"""
74+
Count how many data rows have not been completed
75+
"""
7076
return self.data_rows_count - self.data_rows_done_count
7177

7278
@property
7379
def service_type(self):
80+
"""
81+
Descriptive labeling service definition by media type and editor task type
82+
"""
7483
if self.media_type is None:
7584
return None
7685

libs/labelbox/src/labelbox/schema/media_type.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ def _missing_(cls, value):
3535
return cls.Unknown
3636

3737
def matches(value, name):
38+
"""
39+
This will convert string values (from api) to match enum values
40+
Some string values come as snake case (i.e. llm-prompt-creation)
41+
Some string values come as camel case (i.e. llmPromptCreation)
42+
etc depending on which api returns the value
43+
"""
3844
value_upper = value.upper()
3945
name_upper = name.upper()
4046
value_underscore = value.replace("-", "_")

0 commit comments

Comments
 (0)