Skip to content

Commit 1f35904

Browse files
authored
Merge pull request #636 from Labelbox/jtso/deprecate_video_label_generator
[AL-3044] Deprecate video label generator
2 parents aa644a1 + fc54a7c commit 1f35904

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

labelbox/schema/project.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -223,38 +223,6 @@ def export_queued_data_rows(self,
223223
self.uid)
224224
time.sleep(sleep_time)
225225

226-
def video_label_generator(self, timeout_seconds=600, **kwargs):
227-
"""
228-
Download video annotations
229-
230-
Returns:
231-
LabelGenerator for accessing labels for each video
232-
"""
233-
warnings.warn(
234-
"video_label_generator will be deprecated in a future release. "
235-
"Use label_generator for video or text/image labels.")
236-
_check_converter_import()
237-
json_data = self.export_labels(download=True,
238-
timeout_seconds=timeout_seconds,
239-
**kwargs)
240-
# assert that the instance this would fail is only if timeout runs out
241-
assert isinstance(
242-
json_data,
243-
List), "Unable to successfully get labels. Please try again"
244-
if json_data is None:
245-
raise TimeoutError(
246-
f"Unable to download labels in {timeout_seconds} seconds."
247-
"Please try again or contact support if the issue persists.")
248-
is_video = [
249-
'frames' in row['Label'] for row in json_data if row['Label']
250-
]
251-
if len(is_video) and not all(is_video):
252-
raise ValueError(
253-
"Found non-video data rows in export. "
254-
"Use project.export_labels() to export projects with mixed data types. "
255-
"Or use project.label_generator() for text and imagery data.")
256-
return LBV1Converter.deserialize_video(json_data, self.client)
257-
258226
def label_generator(self, timeout_seconds=600, **kwargs):
259227
"""
260228
Download text and image annotations, or video annotations.

0 commit comments

Comments
 (0)