Skip to content

Commit

Permalink
Sped up tests and fixed error in figures test
Browse files Browse the repository at this point in the history
  • Loading branch information
x-tabdeveloping committed Jul 2, 2024
1 parent 60c3583 commit 1439d86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/test_figures.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ def test_figures():
)
texts = newsgroups.data
labels = list(np.array(newsgroups.target_names)[newsgroups.target])
trf = SentenceTransformer("all-MiniLM-L6-v2")
trf = SentenceTransformer(
"sentence-transformers/average_word_embeddings_glove.6B.300d"
)
embeddings = np.asarray(trf.encode(texts))
models = dict()
models["nmf"] = make_topic_pipeline(
Expand All @@ -37,8 +39,6 @@ def test_figures():
TfidfVectorizer(stop_words="english", max_features=8000),
TruncatedSVD(10),
).fit(texts)
models["s3"] = SemanticSignalSeparation(10)
models["keynmf"] = KeyNMF(10)
example_document = "Joe Biden takes over presidential office from Donald Trump."
plots = {
"group_map": partial(figures.group_map, group_labels=labels),
Expand Down
3 changes: 1 addition & 2 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ def test_app_integration():
newsgroups = fetch_20newsgroups(
subset="all",
categories=[
"misc.forsale",
"sci.med",
"alt.atheism",
],
remove=("headers", "footers", "quotes"),
)
Expand Down

0 comments on commit 1439d86

Please sign in to comment.