Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make complex unique key for mem cache handler #3897

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add exception
wonjuleee committed Aug 27, 2024
commit bdfa8eda9b93b1e5d5a646c1147963627a280c9c
Original file line number Diff line number Diff line change
@@ -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):