api.model_cache
Module Contents
Functions
|
|
|
|
|
|
|
|
|
|
|
Load (and cache) a MedCAT model pack directly from a ModelPack id. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Attributes
- api.model_cache.CDB_MAP
- api.model_cache.VOCAB_MAP
- api.model_cache.CAT_MAP
- api.model_cache.logger
- api.model_cache._MAX_MODELS_LOADED
- api.model_cache._clear_models(cdb_map=CDB_MAP, vocab_map=VOCAB_MAP, cat_map=CAT_MAP)
- Parameters:
cdb_map (Dict[str, medcat.cdb.CDB]) –
vocab_map (Dict[str, medcat.vocab.Vocab]) –
cat_map (Dict[str, medcat.cat.CAT]) –
- api.model_cache.get_medcat_from_cdb_vocab(project, cdb_map=CDB_MAP, vocab_map=VOCAB_MAP, cat_map=CAT_MAP)
- Parameters:
cdb_map (Dict[str, medcat.cdb.CDB]) –
vocab_map (Dict[str, medcat.vocab.Vocab]) –
cat_map (Dict[str, medcat.cat.CAT]) –
- Return type:
medcat.cat.CAT
- api.model_cache._parse_config_file(config, custom_config_path)
- Parameters:
config (medcat.config.config.Config) –
custom_config_path (str) –
- api.model_cache._set_value_or_alt(conf, key, value, alt_value, err=None)
- Parameters:
conf (medcat.config.config.SerialisableBaseModel) –
key (str) –
value (Any) –
alt_value (Any) –
err (Optional[pydantic.ValidationError]) –
- Return type:
None
- api.model_cache.get_medcat_from_model_pack(project, cat_map=CAT_MAP)
- Parameters:
cat_map (Dict[str, medcat.cat.CAT]) –
- Return type:
medcat.cat.CAT
- api.model_cache.get_medcat_from_model_pack_id(modelpack_id, cat_map=CAT_MAP)
Load (and cache) a MedCAT model pack directly from a ModelPack id.
- Parameters:
modelpack_id (int) –
cat_map (Dict[str, medcat.cat.CAT]) –
- Return type:
medcat.cat.CAT
- api.model_cache.get_medcat(project, cdb_map=CDB_MAP, vocab_map=VOCAB_MAP, cat_map=CAT_MAP)
- Parameters:
cdb_map (Dict[str, medcat.cdb.CDB]) –
vocab_map (Dict[str, medcat.vocab.Vocab]) –
cat_map (Dict[str, medcat.cat.CAT]) –
- api.model_cache.get_cached_medcat(project, cat_map=CAT_MAP)
- Parameters:
cat_map (Dict[str, medcat.cat.CAT]) –
- api.model_cache.clear_cached_medcat(project, cat_map=CAT_MAP)
- Parameters:
cat_map (Dict[str, medcat.cat.CAT]) –
- api.model_cache.is_model_pack_loaded(modelpack_id, cat_map=CAT_MAP)
- Parameters:
modelpack_id (int) –
cat_map (Dict[str, medcat.cat.CAT]) –
- Return type:
bool
- api.model_cache.clear_cached_medcat_by_model_pack_id(modelpack_id, cat_map=CAT_MAP)
- Parameters:
modelpack_id (int) –
cat_map (Dict[str, medcat.cat.CAT]) –
- Return type:
None
- api.model_cache.get_cached_cdb(cdb_id, cdb_map=CDB_MAP)
- Parameters:
cdb_id (str) –
cdb_map (Dict[str, medcat.cdb.CDB]) –
- Return type:
medcat.cdb.CDB
- api.model_cache.clear_cached_cdb(cdb_id, cdb_map=CDB_MAP)
- Parameters:
cdb_map (Dict[str, medcat.cdb.CDB]) –
- api.model_cache.clear_cached_vocab(vocab_id, vocab_map=VOCAB_MAP)
- Parameters:
vocab_map (Dict[str, medcat.vocab.Vocab]) –
- api.model_cache.is_model_loaded(project, cdb_map=CDB_MAP, cat_map=CAT_MAP)
- Parameters:
cdb_map (Dict[str, medcat.cdb.CDB]) –
cat_map (Dict[str, medcat.cat.CAT]) –