Skip to content

Commit

Permalink
add exception
Browse files Browse the repository at this point in the history
  • Loading branch information
wonjuleee committed Aug 27, 2024
1 parent d4568f8 commit bdfa8ed
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ def _get_unique_key(results: Dict[str, Any]) -> Tuple:
d_item = results["dataset_item"]
if d_item.media.path: # when video extracted frames come, media.path is None
results["cache_key"] = d_item.media.path, d_item.roi.id
else:
elif len(d_item.annotation_scene.annotations) > 0:
results["cache_key"] = d_item.roi.id, d_item.annotation_scene.annotations[0].id
else:
results["cache_key"] = d_item.roi.id
return results["cache_key"]

def _get_memcache_handler(self):
Expand Down

0 comments on commit bdfa8ed

Please sign in to comment.