Skip to content

topicwizard visualize fails when using turftopic 0.14.0 #44

@DobromirM

Description

@DobromirM

The latest version of turftopic is 0.14.0 and it seems to be incompatible with the 1.1.3 version of topicwizard.

Running the following example:

import topicwizard
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import CountVectorizer
from turftopic import KeyNMF

if __name__ == '__main__':
    corpus = fetch_20newsgroups(subset="all", remove=('headers', 'footers', 'quotes')).data
    corpus = corpus[0:500]

    vectorizer = CountVectorizer(min_df=5, max_df=0.8, stop_words="english")
    model = KeyNMF(n_components=10, vectorizer=vectorizer)

    topicwizard.visualize(model=model, corpus=corpus)

Results in the error:

Traceback (most recent call last):
  File "main.py", line 13, in <module>
    topicwizard.visualize(model=model, corpus=corpus)
  File ".venv/lib/python3.10/site-packages/topicwizard/app.py", line 287, in visualize
    app = get_dash_app(
  File "/.venv/lib/python3.10/site-packages/topicwizard/app.py", line 65, in get_dash_app
    blueprint = create_blueprint(
TypeError: create_blueprint() got an unexpected keyword argument 'time_bin_edges'

Downgrading turftopic to v0.12.0 fixes the issue:
pip install turftopic==0.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions