Skip to content

Commit ae994cb

Browse files
authored
Make complex unique key for mem cache handler (#3897)
* make complex unique key for mem cache handler * tmp * add exception * update doc
1 parent 3f4c1e3 commit ae994cb

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
99
- Fix labels names in hierarchical config (<https://github.com/openvinotoolkit/training_extensions/pull/3879>)
1010
- Fix Learning Rate and Loss Handling in Tile Classifier MaskRCNN EfficientNet (<https://github.com/openvinotoolkit/training_extensions/pull/3873>)
1111
- Disable Tile Classifier in Rotated Detection (<https://github.com/openvinotoolkit/training_extensions/pull/3894>)
12+
- Enhance Memeory Cache Handler with Complex Unique Keys (<https://github.com/openvinotoolkit/training_extensions/pull/3897>)
1213

1314
## \[v1.6.4\]
1415

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ You can find more details with examples in the [CLI command intro](https://openv
102102

103103
- Fix labels names in hierarchical config
104104
- Fix Learning Rate and Loss Handling in Tile Classifier MaskRCNN EfficientNet
105+
- Enhance Memeory Cache Handler with Complex Unique Keys
105106

106107
### Release History
107108

docs/source/guide/release_notes/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ v1.6.5 (3Q24)
99

1010
- Fix labels names in hierarchical config
1111
- Fix Learning Rate and Loss Handling in Tile Classifier MaskRCNN EfficientNet
12+
- Enhance Memeory Cache Handler with Complex Unique Keys
1213

1314
v1.6.4 (3Q24)
1415
-------------

src/otx/algorithms/common/adapters/mmcv/pipelines/load_image_from_otx_dataset.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ def _get_unique_key(results: Dict[str, Any]) -> Tuple:
4242
if "cache_key" in results:
4343
return results["cache_key"]
4444
d_item = results["dataset_item"]
45-
results["cache_key"] = d_item.media.path, d_item.roi.id
45+
if d_item.media.path: # when video extracted frames come, media.path is None
46+
results["cache_key"] = d_item.media.path, d_item.roi.id
47+
elif len(d_item.annotation_scene.annotations) > 0:
48+
results["cache_key"] = d_item.roi.id, d_item.annotation_scene.annotations[0].id
49+
else:
50+
results["cache_key"] = d_item.roi.id
4651
return results["cache_key"]
4752

4853
def _get_memcache_handler(self):

0 commit comments

Comments
 (0)