Skip to content

Commit ca01b32

Browse files
authored
Merge pull request #435 from Labelbox/jtso/validoff
updating upload_annotations to have validate turned off. this was mor…
2 parents 0ab238d + 7176d2b commit ca01b32

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

labelbox/schema/project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ def upload_annotations(
823823
self,
824824
name: str,
825825
annotations: Union[str, Path, Iterable[Dict]],
826-
validate: bool = True) -> 'BulkImportRequest': # type: ignore
826+
validate: bool = False) -> 'BulkImportRequest': # type: ignore
827827
""" Uploads annotations to a new Editor project.
828828
829829
Args:

tests/integration/annotation_import/test_bulk_import_request.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ def test_validate_ndjson(tmp_path, configured_project):
101101

102102
with pytest.raises(ValueError):
103103
configured_project.upload_annotations(name="name",
104+
validate=True,
104105
annotations=str(file_path))
105106

106107

@@ -117,10 +118,12 @@ def test_validate_ndjson_uuid(tmp_path, configured_project, predictions):
117118

118119
with pytest.raises(UuidError):
119120
configured_project.upload_annotations(name="name",
121+
validate=True,
120122
annotations=str(file_path))
121123

122124
with pytest.raises(UuidError):
123125
configured_project.upload_annotations(name="name",
126+
validate=True,
124127
annotations=repeat_uuid)
125128

126129

tests/integration/annotation_import/test_ndjson_validation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,12 @@ def test_validate_ndjson_uuid(tmp_path, configured_project, predictions):
209209

210210
with pytest.raises(MALValidationError):
211211
configured_project.upload_annotations(name="name",
212+
validate=True,
212213
annotations=str(file_path))
213214

214215
with pytest.raises(MALValidationError):
215216
configured_project.upload_annotations(name="name",
217+
validate=True,
216218
annotations=repeat_uuid)
217219

218220

0 commit comments

Comments
 (0)