Skip to content

Commit 653b29e

Browse files
Add support to export all project and all model runs from SDk (#1333)
2 parents 9d9fbfc + d3995a9 commit 653b29e

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

CONTRIB.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ review the following considerations before proceeding:
1212
improvements to functions within the schema/ package.
1313
* Please ensure that any new libraries are compliant with the Apache license that governs the Labelbox SDK.
1414
* Ensure that you update any relevant docstrings and comments within your code
15+
* Ensure that any new python components like classes, methods etc that need to feature in labelbox documentation have entries in the file [index.rst](https://github.com/Labelbox/labelbox-python/blob/develop/docs/source/index.rst). Also make sure you run `make html` locally in the `docs` folder to check if the documentation correctly updated according to the docstrings in the code added.
1516

1617
## Repository Organization
1718

labelbox/schema/data_row.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ def export_v2(
240240
"model_run_ids": None,
241241
"project_ids": None,
242242
"interpolated_frames": False,
243+
"all_projects": False,
244+
"all_model_runs": False,
243245
})
244246

245247
validate_catalog_export_params(_params)
@@ -303,6 +305,10 @@ def export_v2(
303305
_params.get('project_ids', None),
304306
"modelRunIds":
305307
_params.get('model_run_ids', None),
308+
"allProjects":
309+
_params.get('all_projects', False),
310+
"allModelRuns":
311+
_params.get('all_model_runs', False),
306312
},
307313
"streamable": streamable
308314
}

labelbox/schema/dataset.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,8 @@ def export_v2(
658658
"model_run_ids": None,
659659
"project_ids": None,
660660
"interpolated_frames": False,
661+
"all_projects": False,
662+
"all_model_runs": False,
661663
})
662664
validate_catalog_export_params(_params)
663665

@@ -708,6 +710,10 @@ def export_v2(
708710
_params.get('project_ids', None),
709711
"modelRunIds":
710712
_params.get('model_run_ids', None),
713+
"allProjects":
714+
_params.get('all_projects', False),
715+
"allModelRuns":
716+
_params.get('all_model_runs', False),
711717
},
712718
"streamable": streamable,
713719
}

labelbox/schema/export_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ class CatalogExportParams(DataRowParams):
3232
model_run_ids: Optional[List[str]]
3333
project_ids: Optional[List[str]]
3434
interpolated_frames: Optional[bool]
35+
all_projects: Optional[bool]
36+
all_model_runs: Optional[bool]
3537

3638

3739
class ModelRunExportParams(DataRowParams):

labelbox/schema/slice.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ def export_v2(
108108
"model_run_ids": None,
109109
"project_ids": None,
110110
"interpolated_frames": False,
111+
"all_projects": False,
112+
"all_model_runs": False,
111113
})
112114
validate_catalog_export_params(_params)
113115

@@ -146,6 +148,10 @@ def export_v2(
146148
_params.get('project_ids', None),
147149
"modelRunIds":
148150
_params.get('model_run_ids', None),
151+
"allProjects":
152+
_params.get('all_projects', False),
153+
"allModelRuns":
154+
_params.get('all_model_runs', False),
149155
},
150156
"streamable": streamable,
151157
}

0 commit comments

Comments
 (0)