Skip to content

Commit 7f8a3be

Browse files
author
Matt Sokoloff
committed
Merge branch 'develop' of https://github.com/Labelbox/labelbox-python into ms/3.10.0-dev
2 parents e7e7ea7 + f630f37 commit 7f8a3be

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

labelbox/data/annotation_types/classification/classification.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ class ClassificationAnswer(FeatureSchema):
2525
- Because it inherits from FeatureSchema
2626
the option can be represented with either the name or feature_schema_id
2727
28-
- The key frame arg only applies to video classifications.
29-
Each answer can have a key frame indepdent of the others.
28+
- The keyframe arg only applies to video classifications.
29+
Each answer can have a keyframe independent of the others.
3030
So unlike object annotations, classification annotations
31-
track key frames at a classification answer level.
31+
track keyframes at a classification answer level.
3232
"""
3333
extra: Dict[str, Any] = {}
3434
keyframe: Optional[bool] = None

labelbox/schema/annotation_import.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,18 @@ def wait_until_done(self,
8989
sleep_time_seconds (int): a time to block between subsequent API calls
9090
show_progress (bool): should show progress bar
9191
"""
92-
pbar = tqdm(total=100) if show_progress else None
92+
pbar = tqdm(total=100,
93+
bar_format="{n}% |{bar}| [{elapsed}, {rate_fmt}{postfix}]"
94+
) if show_progress else None
9395
while self.state.value == AnnotationImportState.RUNNING.value:
9496
logger.info(f"Sleeping for {sleep_time_seconds} seconds...")
9597
time.sleep(sleep_time_seconds)
9698
self.__backoff_refresh()
97-
if self.progress and pbar:
98-
pbar.update(self.progress)
99+
if self.progress and self.progress and pbar:
100+
pbar.update(int(self.progress.replace("%", "")) - pbar.n)
99101

100102
if pbar:
101-
pbar.update(100)
103+
pbar.update(100 - pbar.n)
102104
pbar.close()
103105

104106
@backoff.on_exception(

0 commit comments

Comments
 (0)