File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
data/annotation_types/classification Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ class ClassificationAnswer(FeatureSchema):
25
25
- Because it inherits from FeatureSchema
26
26
the option can be represented with either the name or feature_schema_id
27
27
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.
30
30
So unlike object annotations, classification annotations
31
- track key frames at a classification answer level.
31
+ track keyframes at a classification answer level.
32
32
"""
33
33
extra : Dict [str , Any ] = {}
34
34
keyframe : Optional [bool ] = None
Original file line number Diff line number Diff line change @@ -89,16 +89,18 @@ def wait_until_done(self,
89
89
sleep_time_seconds (int): a time to block between subsequent API calls
90
90
show_progress (bool): should show progress bar
91
91
"""
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
93
95
while self .state .value == AnnotationImportState .RUNNING .value :
94
96
logger .info (f"Sleeping for { sleep_time_seconds } seconds..." )
95
97
time .sleep (sleep_time_seconds )
96
98
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 )
99
101
100
102
if pbar :
101
- pbar .update (100 )
103
+ pbar .update (100 - pbar . n )
102
104
pbar .close ()
103
105
104
106
@backoff .on_exception (
You can’t perform that action at this time.
0 commit comments