Jayman391 / lnlp

MIT License
0 stars 0 forks source link

IndexError: arrays used as indices must be of integer (or boolean) type #19

Open Jayman391 opened 8 months ago

Jayman391 commented 8 months ago

(nllp) MacBook-Air-3:lnlp user$ python main.py tests/test_data/data.csv

Welcome to the NLLP CLI! Loaded data from tests/test_data/data.csv

  1. Run a Topic Model
  2. Run an Optimization routine for a Topic Model (GPU reccomended)
  3. Run a Classification Model
  4. Load Global Configuration Files
  5. Exit Choose an option: 1 {'errors': [], 'info': ['Initialized Global Session Object and Global Driver', 'Initialized Landing Menu', 'Initialized Embeddings Menu', 'Initialized Dimensionality Reduction Menu', 'Initialized Cluster Menu', 'Initialized Fine Tuning Menu', 'Initialized Plotting Menu', 'Initialized ConfigMenu Menu', 'Initialized Topic Menu', 'Initialized ConfigMenu Menu'], 'data': [{'Landing': 'Topic'}]}
  6. Select LLM to generate Embeddings
  7. Select Dimensionality Reduction Technique
  8. Select Clustering Technique
  9. Fine Tuning
  10. Plotting
  11. Save Session Configuration
  12. Run Topic Model
  13. Load Session Configuration
  14. Back
  15. Exit Choose an option: 1 {'errors': [], 'info': ['Initialized Global Session Object and Global Driver', 'Initialized Landing Menu', 'Initialized Embeddings Menu', 'Initialized Dimensionality Reduction Menu', 'Initialized Cluster Menu', 'Initialized Fine Tuning Menu', 'Initialized Plotting Menu', 'Initialized ConfigMenu Menu', 'Initialized Topic Menu', 'Initialized ConfigMenu Menu'], 'data': [{'Landing': 'Topic'}, {'Topic': 'Embeddings'}]}
  16. all-MiniLM-L6-v2
  17. all-MiniLM-L12-v2
  18. multi-qa-MiniLM-L6-cos-v1
  19. all-mpnet-base-v2
  20. Muennighoff/SGPT-125M-weightedmean-msmarco-specb-bitfit
  21. Muennighoff/SGPT-125M-weightedmean-nli-bitfit
  22. Muennighoff/SGPT-1.3B-weightedmean-msmarco-specb-bitfit
  23. Add huggingface Model
  24. Back
  25. Exit Choose an option: 2 {'errors': [], 'info': ['Initialized Global Session Object and Global Driver', 'Initialized Landing Menu', 'Initialized Embeddings Menu', 'Initialized Dimensionality Reduction Menu', 'Initialized Cluster Menu', 'Initialized Fine Tuning Menu', 'Initialized Plotting Menu', 'Initialized ConfigMenu Menu', 'Initialized Topic Menu', 'Initialized ConfigMenu Menu'], 'data': [{'Landing': 'Topic'}, {'Topic': 'Embeddings'}, {'Embeddings': 'all-MiniLM-L12-v2'}]}
  26. Select LLM to generate Embeddings
  27. Select Dimensionality Reduction Technique
  28. Select Clustering Technique
  29. Fine Tuning
  30. Plotting
  31. Save Session Configuration
  32. Run Topic Model
  33. Load Session Configuration
  34. Back
  35. Exit Choose an option: 2 {'errors': [], 'info': ['Initialized Global Session Object and Global Driver', 'Initialized Landing Menu', 'Initialized Embeddings Menu', 'Initialized Dimensionality Reduction Menu', 'Initialized Cluster Menu', 'Initialized Fine Tuning Menu', 'Initialized Plotting Menu', 'Initialized ConfigMenu Menu', 'Initialized Topic Menu', 'Initialized ConfigMenu Menu'], 'data': [{'Landing': 'Topic'}, {'Topic': 'Embeddings'}, {'Embeddings': 'all-MiniLM-L12-v2'}, {'Topic': 'Dimensionality Reduction'}]}
  36. UMAP
  37. PCA
  38. t-SNE
  39. Truncated SVD
  40. Factor Analysis
  41. Back
  42. Exit Choose an option: 2 {'errors': [], 'info': ['Initialized Global Session Object and Global Driver', 'Initialized Landing Menu', 'Initialized Embeddings Menu', 'Initialized Dimensionality Reduction Menu', 'Initialized Cluster Menu', 'Initialized Fine Tuning Menu', 'Initialized Plotting Menu', 'Initialized ConfigMenu Menu', 'Initialized Topic Menu', 'Initialized ConfigMenu Menu'], 'data': [{'Landing': 'Topic'}, {'Topic': 'Embeddings'}, {'Embeddings': 'all-MiniLM-L12-v2'}, {'Topic': 'Dimensionality Reduction'}, {'Dimensionality Reduction': 'PCA'}]}
  43. Select LLM to generate Embeddings
  44. Select Dimensionality Reduction Technique
  45. Select Clustering Technique
  46. Fine Tuning
  47. Plotting
  48. Save Session Configuration
  49. Run Topic Model
  50. Load Session Configuration
  51. Back
  52. Exit Choose an option: 3 {'errors': [], 'info': ['Initialized Global Session Object and Global Driver', 'Initialized Landing Menu', 'Initialized Embeddings Menu', 'Initialized Dimensionality Reduction Menu', 'Initialized Cluster Menu', 'Initialized Fine Tuning Menu', 'Initialized Plotting Menu', 'Initialized ConfigMenu Menu', 'Initialized Topic Menu', 'Initialized ConfigMenu Menu'], 'data': [{'Landing': 'Topic'}, {'Topic': 'Embeddings'}, {'Embeddings': 'all-MiniLM-L12-v2'}, {'Topic': 'Dimensionality Reduction'}, {'Dimensionality Reduction': 'PCA'}, {'Topic': 'Cluster'}]}
  53. hdbscan
  54. kmeans
  55. spectral clustering
  56. dbscan
  57. agglomerative clustering
  58. birch
  59. affinity propagation
  60. mean shift
  61. Back
  62. Exit Choose an option: 3 {'errors': [], 'info': ['Initialized Global Session Object and Global Driver', 'Initialized Landing Menu', 'Initialized Embeddings Menu', 'Initialized Dimensionality Reduction Menu', 'Initialized Cluster Menu', 'Initialized Fine Tuning Menu', 'Initialized Plotting Menu', 'Initialized ConfigMenu Menu', 'Initialized Topic Menu', 'Initialized ConfigMenu Menu'], 'data': [{'Landing': 'Topic'}, {'Topic': 'Embeddings'}, {'Embeddings': 'all-MiniLM-L12-v2'}, {'Topic': 'Dimensionality Reduction'}, {'Dimensionality Reduction': 'PCA'}, {'Topic': 'Cluster'}, {'Cluster': 'spectral clustering'}]}
  63. Select LLM to generate Embeddings
  64. Select Dimensionality Reduction Technique
  65. Select Clustering Technique
  66. Fine Tuning
  67. Plotting
  68. Save Session Configuration
  69. Run Topic Model
  70. Load Session Configuration
  71. Back
  72. Exit Choose an option: 7 {'errors': [], 'info': ['Initialized Global Session Object and Global Driver', 'Initialized Landing Menu', 'Initialized Embeddings Menu', 'Initialized Dimensionality Reduction Menu', 'Initialized Cluster Menu', 'Initialized Fine Tuning Menu', 'Initialized Plotting Menu', 'Initialized ConfigMenu Menu', 'Initialized Topic Menu', 'Initialized ConfigMenu Menu'], 'data': [{'Landing': 'Topic'}, {'Topic': 'Embeddings'}, {'Embeddings': 'all-MiniLM-L12-v2'}, {'Topic': 'Dimensionality Reduction'}, {'Dimensionality Reduction': 'PCA'}, {'Topic': 'Cluster'}, {'Cluster': 'spectral clustering'}, {'Topic': 'BERTopic(calculate_probabilities=False, ctfidf_model=ClassTfidfTransformer(...), embedding_model=SentenceTransformer(...), hdbscan_model=HDBSCAN(...), language=None, low_memory=False, min_topic_size=10, n_gram_range=(1, 1), nr_topics=None, representation_model=None, seed_topic_list=None, top_n_words=10, umap_model=PCA(...), vectorizer_model=CountVectorizer(...), verbose=False, zeroshot_min_similarity=0.7, zeroshot_topic_list=None)'}]} Number of boolean topics: 0 [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] [] No plotting options selected. Visualizing all topics, documents, and terms. An error occurred. Please try again. Would you like to see the error trace? (y/n): y Traceback (most recent call last): File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 46, in run self._process_responses(self.landing, self.driver) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 64, in _process_responses self._process_responses(response, driver) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 64, in _process_responses self._process_responses(response, driver) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 68, in _process_responses self._process_responses(menu.parent, driver) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 64, in _process_responses self._process_responses(response, driver) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 68, in _process_responses self._process_responses(menu.parent, driver) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 64, in _process_responses self._process_responses(response, driver) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 68, in _process_responses self._process_responses(menu.parent, driver) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/_lnlpcli.py", line 66, in _process_responses driver.run_topic_model() File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/drivers/_driver.py", line 112, in run_topic_model self._visualize_topics(model, topics, dir) File "/Users/user/Desktop/Spring_2024/Research/lnlp/src/drivers/_driver.py", line 119, in _visualize_topics topic_viz = model.visualize_topics() File "/Users/user/anaconda3/envs/nllp/lib/python3.9/site-packages/bertopic-0.16.0-py3.9.egg/bertopic/_bertopic.py", line 2249, in visualize_topics File "/Users/user/anaconda3/envs/nllp/lib/python3.9/site-packages/bertopic-0.16.0-py3.9.egg/bertopic/plotting/_topics.py", line 78, in visualize_topics IndexError: arrays used as indices must be of integer (or boolean) type