Save and load hashkey for explorer#981
Save and load hashkey for explorer#981sooahleex merged 20 commits intoopen-edge-platform:developfrom
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #981 +/- ##
===========================================
- Coverage 78.75% 78.53% -0.23%
===========================================
Files 233 233
Lines 26626 26749 +123
Branches 5283 5320 +37
===========================================
+ Hits 20969 21007 +38
- Misses 4424 4497 +73
- Partials 1233 1245 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
d063c2b to
019e552
Compare
There was a problem hiding this comment.
Please move saving hash key functionality to components/exporter.py::Exporter, so that it can be usable for all data formats. This saving function should store the following file with the following directory structure.
dataset_directory/
- hash_key_meta/
- hash_keys.json # Hash key data (you can use binary file also)
- index.bin # FAISS index (future)
...There was a problem hiding this comment.
I will cover this in future PR.
There was a problem hiding this comment.
Please make loading hash key functionality global (all data formats). I think that you need to implement class DatasetExtractor by extending class DatasetBase to take in path to get the hash key checkpoint:
class DatasetExtractor(DatasetBase):
def __init__(
self,
path: str,
*,
length: Optional[int] = None,
subsets: Optional[Sequence[str]] = None,
media_type: Type[MediaElement] = Image,
ctx: Optional[ImportContext] = None,
):
...
self._load_hash_key(path)
def _load_hash_key(self, path):
...Subsequently, make all data format plugins to inherit DatasetExtractor.
However, I think it can make this PR too huge. Please do it as a separate PR and implement self._load_hash_key(path) function to DatasetExtractor and Datumaro format in this PR.
There was a problem hiding this comment.
I will cover this in future PR, too.
67a838e to
fd6e6af
Compare
Summary
HashKeyfor dataset afterexplorecommandHashKeyannotation indatumaroformatHow to test
Checklist
License
Feel free to contact the maintainers if that's a concern.