Skip to content

Commit

Permalink
Make complex unique key for mem cache handler (#3897)
Browse files Browse the repository at this point in the history
* make complex unique key for mem cache handler

* tmp

* add exception

* update doc
  • Loading branch information
wonjuleee authored Aug 27, 2024
1 parent 3f4c1e3 commit ae994cb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
- Fix labels names in hierarchical config (<https://github.com/openvinotoolkit/training_extensions/pull/3879>)
- Fix Learning Rate and Loss Handling in Tile Classifier MaskRCNN EfficientNet (<https://github.com/openvinotoolkit/training_extensions/pull/3873>)
- Disable Tile Classifier in Rotated Detection (<https://github.com/openvinotoolkit/training_extensions/pull/3894>)
- Enhance Memeory Cache Handler with Complex Unique Keys (<https://github.com/openvinotoolkit/training_extensions/pull/3897>)

## \[v1.6.4\]

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ You can find more details with examples in the [CLI command intro](https://openv

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

### Release History

Expand Down
1 change: 1 addition & 0 deletions docs/source/guide/release_notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ v1.6.5 (3Q24)

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

v1.6.4 (3Q24)
-------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ 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 None
results["cache_key"] = d_item.media.path, d_item.roi.id
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 ae994cb

Please sign in to comment.