agatha.ml.util.embedding_lookup module¶
-
class
agatha.ml.util.embedding_lookup.
EmbeddingLookupTable
(embedding_dir, entity_db, disable_cache=False)¶ Bases:
object
-
clear_cache
()¶ - Return type
None
-
disable_cache
()¶ - Return type
None
-
enable_cache
()¶ - Return type
None
-
is_preloaded
()¶ the entity index is loaded and all paths have been loaded
- Return type
bool
-
keys
()¶ - Return type
Set
[str
]
-
preload
()¶ - Return type
None
-
-
agatha.ml.util.embedding_lookup.
parse_embedding_path
(path)¶ Given a path to an embedding hdf5 file with a name like: embeddings_s_99.v5.h5 return (entity_type, partition_index)
- Return type
Tuple
[str
,int
]