2020from labelbox .pagination import PaginatedCollection
2121from labelbox .schema .consensus_settings import ConsensusSettings
2222from labelbox .schema .data_row import DataRow
23- from labelbox .schema .export_params import ModelRunExportParams
23+ from labelbox .schema .export_params import ProjectExportParams
2424from labelbox .schema .media_type import MediaType
2525from labelbox .schema .queue_mode import QueueMode
2626from labelbox .schema .resource_tag import ResourceTag
@@ -287,7 +287,7 @@ def label_generator(self, timeout_seconds=600, **kwargs):
287287 return LBV1Converter .deserialize_video (json_data , self .client )
288288 return LBV1Converter .deserialize (json_data )
289289
290- def export_labels_v2 (
290+ def export_labels (
291291 self ,
292292 download = False ,
293293 timeout_seconds = 1800 ,
@@ -379,23 +379,22 @@ def _validate_datetime(string_date: str) -> bool:
379379 """
380380 Creates a project run export task with the given params and returns the task.
381381
382- >>> export_task = export_labels_v2 ("my_export_task", filter={"media_attributes": True})
382+ >>> export_task = export_v2 ("my_export_task", filter={"media_attributes": True})
383383
384384 """
385385
386- def export_labels_v2 (self , task_name : str ,
387- params : Optional [ModelRunExportParams ]) -> Task :
386+ def export_v2 (self , task_name : str ,
387+ params : Optional [ProjectExportParams ]) -> Task :
388388 _params = params or {}
389- mutation_name = "exportDataRows "
390- create_task_query_str = """mutation exportDataRowsPyApi ($input: ExportDataRowsInput !){
389+ mutation_name = "exportDataRowsInProject "
390+ create_task_query_str = """mutation exportDataRowsInProjectPyApi ($input: ExportDataRowsInProjectInput !){
391391 %s(input: $input) {taskId} }
392392 """ % (mutation_name )
393393 params = {
394394 "input" : {
395395 "taskName" : task_name ,
396396 "filters" : {
397- "modelRunIds" : [],
398- "projectIds" : [self .uid ]
397+ "projectId" : self .uid
399398 },
400399 "params" : {
401400 "includeAttachments" :
@@ -412,9 +411,6 @@ def export_labels_v2(self, task_name: str,
412411 _params .get ('include_labels' , False ),
413412 "includePerformanceDetails" :
414413 _params .get ('include_performance_details' , False ),
415- # Arguments locked based on exectuion context
416- "includeModelRuns" :
417- False ,
418414 },
419415 }
420416 }
0 commit comments