Skip to content

Commit

Permalink
make complex unique key for mem cache handler
Browse files Browse the repository at this point in the history
  • Loading branch information
wonjuleee committed Aug 26, 2024
1 parent f2d5476 commit 3a29e00
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def _get_unique_key(results: Dict[str, Any]) -> Tuple:
if "cache_key" in results:
return results["cache_key"]
d_item = results["dataset_item"]
results["cache_key"] = d_item.media.path, d_item.roi.id
if d_item.media.path: # when video extracted frames come, media.path is given by None
results["cache_key"] = d_item.media.path, d_item.roi.id
else:
results["cache_key"] = d_item.roi.id, d_item.annotation_scene.annotations[0].id
return results["cache_key"]

def _get_memcache_handler(self):
Expand Down

0 comments on commit 3a29e00

Please sign in to comment.