tmnt 0.7.42b20231227__py3-none-any.whl → 0.7.42b20231229__py3-none-any.whl

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.
tmnt/data_loading.py CHANGED
@@ -394,19 +394,6 @@ def load_vocab(vocab_file, encoding='utf-8'):
394
394
  return build_vocab(w_dict)
395
395
 
396
396
 
397
- def file_to_data(sp_file, voc_size, batch_size=1000):
398
- with open(sp_file) as f:
399
- for i, l in enumerate(f):
400
- pass
401
- data_size = i+1
402
- num_batches = data_size // batch_size
403
- last_batch_size = data_size % batch_size
404
- X, y = load_svmlight_file(sp_file, n_features=voc_size, dtype='int32', zero_based=True)
405
- wd_freqs = mx.nd.array(np.array(X.sum(axis=0)).squeeze())
406
- total_words = X.sum()
407
- return X, y, wd_freqs, total_words
408
-
409
-
410
397
  class StratifiedDualBatchSampler:
411
398
  """Stratified batch sampling
412
399
  Provides equal representation of target classes in each batch
tmnt/inference.py CHANGED
@@ -8,18 +8,13 @@ import json
8
8
  import numpy as np
9
9
  import io
10
10
  import os
11
- import scipy
12
11
  import torch
13
- #import umap
14
- import logging
15
12
  import pickle
16
13
  from tmnt.modeling import BowVAEModel, CovariateBowVAEModel, SeqBowVED, MetricSeqBowVED
17
14
  from tmnt.estimator import BowEstimator, CovariateBowEstimator, SeqBowEstimator, SeqBowMetricEstimator
18
- from tmnt.data_loading import file_to_data, SparseDataLoader
15
+ from tmnt.data_loading import SparseDataLoader
19
16
  from tmnt.preprocess.vectorizer import TMNTVectorizer
20
- from tmnt.distribution import LogisticGaussianDistribution
21
17
  from tmnt.utils.recalibrate import recalibrate_scores
22
- from multiprocessing import Pool
23
18
  from sklearn.datasets import load_svmlight_file
24
19
  from functools import partial
25
20
  from tmnt.data_loading import get_llm_tokenizer
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tmnt
3
- Version: 0.7.42b20231227
3
+ Version: 0.7.42b20231229
4
4
  Summary: Topic modeling neural toolkit
5
5
  Home-page: https://github.com/mitre/tmnt.git
6
6
  Author: The MITRE Corporation
@@ -1,10 +1,10 @@
1
1
  tmnt/__init__.py,sha256=EPNq1H7UMyMewWT_zTGBaC7ZouvCywX_gMX4G1dtmvw,250
2
2
  tmnt/configuration.py,sha256=P8PEhzVPKO5xG0FrdTLRQ60OYWigbzPY-OSx_hzQlrY,10054
3
- tmnt/data_loading.py,sha256=Fnn3Pdrw16e6IR_QEPusiUfSCrHlk-3ddKeyzQW_5JE,18569
3
+ tmnt/data_loading.py,sha256=ia2DjJv_SLMXmGW_wkdg6ShiQJB8tN3jnXg7KJvr2XE,18107
4
4
  tmnt/distribution.py,sha256=JrJe2HaF2uub0S8RxLAjSykg_AF6atvgUhNWbbaxaMo,8382
5
5
  tmnt/estimator.py,sha256=oxws9vG52JRpgnvYYGv9jsBbCsPhGfXn54NJsgm2M2E,77887
6
6
  tmnt/eval_npmi.py,sha256=ODRDMsBgDM__iCNEX399ck7bAhl7ydvgDqmpfR7Y-q4,5048
7
- tmnt/inference.py,sha256=476oAbIhY1_am8gvRCiFFIHkn0HmRu3w6KCkFQEM8Xg,17992
7
+ tmnt/inference.py,sha256=Sw7GO7QiWVEtbPJKBjFB7AiKRmUOZbFZn3tCrsStzWw,17845
8
8
  tmnt/modeling.py,sha256=NTgjTqvi3sUsEfQa8Kq8lGW3vST905B8OkNhQmNwpwA,32841
9
9
  tmnt/preprocess/__init__.py,sha256=gwMejkQrnqKS05i0JVsUru2hDUR5jE1hKC10dL934GU,170
10
10
  tmnt/preprocess/tokenizer.py,sha256=-ZgowfbHrM040vbNTktZM_hdl6HDTqxSJ4mDAxq3dUs,14050
@@ -17,9 +17,9 @@ tmnt/utils/ngram_helpers.py,sha256=VrIzou2oQHCLBLSWODDeikN3PYat1NqqvEeYQj_GhbA,1
17
17
  tmnt/utils/pubmed_utils.py,sha256=3sHwoun7vxb0GV-arhpXLMUbAZne0huAh9xQNy6H40E,1274
18
18
  tmnt/utils/random.py,sha256=qY75WG3peWoMh9pUyCPBEo6q8IvkF6VRjeb5CqJOBF8,327
19
19
  tmnt/utils/recalibrate.py,sha256=TmpB8An8bslICZ13UTJfIvr8VoqiSedtpHxec4n8CHk,1439
20
- tmnt-0.7.42b20231227.dist-info/LICENSE,sha256=qFZJrfJ7Zi4IXDiyiGVrHWic_l1h2tc36tI8Z7rK9bs,11356
21
- tmnt-0.7.42b20231227.dist-info/METADATA,sha256=-XUQqVSs1OrEqQDldPsqxslLJCas42j-JZ4OpV_-JgE,1404
22
- tmnt-0.7.42b20231227.dist-info/NOTICE,sha256=p0kYIVAkReTFaGb4C-qPa7h5ztze6hGzOpjCMMbOipU,425
23
- tmnt-0.7.42b20231227.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
24
- tmnt-0.7.42b20231227.dist-info/top_level.txt,sha256=RpYgUl187sXnqmiwKjZZdcDlHz2AALs6bGdUcukyd_E,5
25
- tmnt-0.7.42b20231227.dist-info/RECORD,,
20
+ tmnt-0.7.42b20231229.dist-info/LICENSE,sha256=qFZJrfJ7Zi4IXDiyiGVrHWic_l1h2tc36tI8Z7rK9bs,11356
21
+ tmnt-0.7.42b20231229.dist-info/METADATA,sha256=gqPnOdITTXcEvfU5CfIOF-ZCQs5azrTvdB-ueAyh6ug,1404
22
+ tmnt-0.7.42b20231229.dist-info/NOTICE,sha256=p0kYIVAkReTFaGb4C-qPa7h5ztze6hGzOpjCMMbOipU,425
23
+ tmnt-0.7.42b20231229.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
24
+ tmnt-0.7.42b20231229.dist-info/top_level.txt,sha256=RpYgUl187sXnqmiwKjZZdcDlHz2AALs6bGdUcukyd_E,5
25
+ tmnt-0.7.42b20231229.dist-info/RECORD,,