13
13
14
14
from labelbox import parser
15
15
from labelbox import utils
16
- from labelbox .exceptions import (
17
- InvalidQueryError ,
18
- LabelboxError ,
19
- ProcessingWaitTimeout ,
20
- ResourceConflict ,
21
- ResourceNotFoundError
22
- )
16
+ from labelbox .exceptions import (InvalidQueryError , LabelboxError ,
17
+ ProcessingWaitTimeout , ResourceConflict ,
18
+ ResourceNotFoundError )
23
19
from labelbox .orm import query
24
20
from labelbox .orm .db_object import DbObject , Deletable , Updateable , experimental
25
21
from labelbox .orm .model import Entity , Field , Relationship
@@ -121,7 +117,11 @@ class Project(DbObject, Updateable, Deletable):
121
117
# Bind data_type and allowedMediaTYpe using the GraphQL type MediaType
122
118
media_type = Field .Enum (MediaType , "media_type" , "allowedMediaType" )
123
119
editor_task_type = Field .Enum (EditorTaskType , "editor_task_type" )
120
+ < << << << HEAD
124
121
data_row_count = Field .Int ("data_row_count" )
122
+ == == == =
123
+ model_setup_complete = Field .Boolean ("model_setup_complete" )
124
+ >> >> >> > 8 d9b99f7 (Add model_setup_complete to Project )
125
125
126
126
# Relationships
127
127
created_by = Relationship .ToOne ("User" , False , "created_by" )
@@ -1752,7 +1752,9 @@ def __check_data_rows_have_been_processed(
1752
1752
return response ["queryAllDataRowsHaveBeenProcessed" ][
1753
1753
"allDataRowsHaveBeenProcessed" ]
1754
1754
1755
- def get_overview (self , details = False ) -> Union [ProjectOverview , ProjectOverviewDetailed ]:
1755
+ def get_overview (
1756
+ self ,
1757
+ details = False ) -> Union [ProjectOverview , ProjectOverviewDetailed ]:
1756
1758
"""Return the overview of a project.
1757
1759
1758
1760
This method returns the number of data rows per task queue and issues of a project,
@@ -1792,7 +1794,7 @@ def get_overview(self, details=False) -> Union[ProjectOverview, ProjectOverviewD
1792
1794
1793
1795
# Must use experimental to access "issues"
1794
1796
result = self .client .execute (query , {"projectId" : self .uid },
1795
- experimental = True )["project" ]
1797
+ experimental = True )["project" ]
1796
1798
1797
1799
# Reformat category names
1798
1800
overview = {
@@ -1805,26 +1807,28 @@ def get_overview(self, details=False) -> Union[ProjectOverview, ProjectOverviewD
1805
1807
1806
1808
# Rename categories
1807
1809
overview ["to_label" ] = overview .pop ("unlabeled" )
1808
- overview ["total_data_rows" ] = overview .pop ("all" )
1810
+ overview ["total_data_rows" ] = overview .pop ("all" )
1809
1811
1810
1812
if not details :
1811
1813
return ProjectOverview (** overview )
1812
1814
else :
1813
1815
# Build dictionary for queue details for review and rework queues
1814
1816
for category in ["rework" , "review" ]:
1815
1817
queues = [
1816
- {tq ["name" ]: tq .get ("dataRowCount" )}
1818
+ {
1819
+ tq ["name" ]: tq .get ("dataRowCount" )
1820
+ }
1817
1821
for tq in result .get ("taskQueues" )
1818
1822
if tq .get ("queueType" ) == f"MANUAL_{ category .upper ()} _QUEUE"
1819
1823
]
1820
1824
1821
- overview [f"in_{ category } " ] = {
1825
+ overview [f"in_{ category } " ] = {
1822
1826
"data" : queues ,
1823
1827
"total" : overview [f"in_{ category } " ]
1824
1828
}
1825
-
1829
+
1826
1830
return ProjectOverviewDetailed (** overview )
1827
-
1831
+
1828
1832
def clone (self ) -> "Project" :
1829
1833
"""
1830
1834
Clones the current project.
0 commit comments