tmnt 0.7.46b20240331__tar.gz → 0.7.47__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. {tmnt-0.7.46b20240331/tmnt.egg-info → tmnt-0.7.47}/PKG-INFO +1 -1
  2. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/setup.py +1 -1
  3. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/data_loading.py +5 -4
  4. {tmnt-0.7.46b20240331 → tmnt-0.7.47/tmnt.egg-info}/PKG-INFO +1 -1
  5. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/LICENSE +0 -0
  6. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/NOTICE +0 -0
  7. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/README.md +0 -0
  8. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/setup.cfg +0 -0
  9. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/__init__.py +0 -0
  10. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/configuration.py +0 -0
  11. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/distribution.py +0 -0
  12. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/estimator.py +0 -0
  13. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/eval_npmi.py +0 -0
  14. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/inference.py +0 -0
  15. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/modeling.py +0 -0
  16. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/preprocess/__init__.py +0 -0
  17. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/preprocess/tokenizer.py +0 -0
  18. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/preprocess/vectorizer.py +0 -0
  19. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/utils/__init__.py +0 -0
  20. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/utils/csv2json.py +0 -0
  21. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/utils/log_utils.py +0 -0
  22. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/utils/mat_utils.py +0 -0
  23. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/utils/ngram_helpers.py +0 -0
  24. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/utils/pubmed_utils.py +0 -0
  25. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/utils/random.py +0 -0
  26. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt/utils/recalibrate.py +0 -0
  27. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt.egg-info/SOURCES.txt +0 -0
  28. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt.egg-info/dependency_links.txt +0 -0
  29. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt.egg-info/requires.txt +0 -0
  30. {tmnt-0.7.46b20240331 → tmnt-0.7.47}/tmnt.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tmnt
3
- Version: 0.7.46b20240331
3
+ Version: 0.7.47
4
4
  Summary: Topic modeling neural toolkit
5
5
  Home-page: https://github.com/mitre/tmnt.git
6
6
  Author: The MITRE Corporation
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
4
4
  from setuptools.command.install import install
5
5
  from pathlib import Path
6
6
 
7
- version = '0.7.46'
7
+ version = '0.7.47'
8
8
 
9
9
  try:
10
10
  if not os.getenv('RELEASE'):
@@ -40,20 +40,21 @@ llm_catalog = {
40
40
  'sentence-transformers/all-mpnet-base-v2' : (AutoTokenizer.from_pretrained, AutoModel.from_pretrained),
41
41
  'allenai/scibert_scivocab_uncased': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained),
42
42
  'johngiorgi/declutr-sci-base': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained),
43
- 'BAAI/bge-base-en-v1.5': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained)
43
+ 'BAAI/bge-base-en-v1.5': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained),
44
+ 'pritamdeka/BioBERT-mnli-snli-scinli-scitail-mednli-stsb': (AutoTokenizer.from_pretrained, AutoModel.from_pretrained)
44
45
  ## add more model options here if desired
45
46
  }
46
47
 
47
48
  def get_llm(model_name):
48
- tok_fn, model_fn = llm_catalog[model_name]
49
+ tok_fn, model_fn = llm_catalog.get(model_name, ((AutoTokenizer.from_pretrained, AutoModel.from_pretrained)))
49
50
  return tok_fn(model_name), model_fn(model_name)
50
51
 
51
52
  def get_llm_tokenizer(model_name):
52
- tok_fn, _ = llm_catalog[model_name]
53
+ tok_fn, model_fn = llm_catalog.get(model_name, ((AutoTokenizer.from_pretrained, AutoModel.from_pretrained)))
53
54
  return tok_fn(model_name)
54
55
 
55
56
  def get_llm_model(model_name):
56
- _, model_fn = llm_catalog[model_name]
57
+ tok_fn, model_fn = llm_catalog.get(model_name, ((AutoTokenizer.from_pretrained, AutoModel.from_pretrained)))
57
58
  return model_fn(model_name)
58
59
 
59
60
  def get_unwrapped_llm_dataloader(data, bow_vectorizer, llm_name, label_map, batch_size, max_len, shuffle=False, device='cpu'):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tmnt
3
- Version: 0.7.46b20240331
3
+ Version: 0.7.47
4
4
  Summary: Topic modeling neural toolkit
5
5
  Home-page: https://github.com/mitre/tmnt.git
6
6
  Author: The MITRE Corporation
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes