Skip to content

Commit 886a728

Browse files
author
Val Brodsky
committed
Add docstrings
1 parent 327f967 commit 886a728

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
@@ -61,14 +61,23 @@ def __init__(self, **kwargs):
6161

6262
@property
6363
def tasks_completed(self):
64+
"""
65+
Count how many data rows have been completed (i.e. in the Done queue)
66+
"""
6467
return self.data_rows_done_count
6568

6669
@property
6770
def tasks_remaining(self):
71+
"""
72+
Count how many data rows have not been completed
73+
"""
6874
return self.data_rows_count - self.data_rows_done_count
6975

7076
@property
7177
def service_type(self):
78+
"""
79+
Descriptive labeling service definition by media type and editor task type
80+
"""
7281
if self.media_type is None:
7382
return None
7483

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)