Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel dying module 2 notebook 3 #36

Open
emilygrabowski opened this issue Jun 24, 2022 · 1 comment
Open

Kernel dying module 2 notebook 3 #36

emilygrabowski opened this issue Jun 24, 2022 · 1 comment

Comments

@emilygrabowski
Copy link
Collaborator

I'm currently testing that all of the code runs in the datahub and with 8 GB of ram.

The kernel dies from too much memory being used when you run this line:
from sklearn.metrics.pairwise import cosine_similarity
similarities = cosine_similarity(tfidf)
similarities.shape

Although the biggest memory drain is a few cells before with the .to_dense() function

@emilygrabowski
Copy link
Collaborator Author

df = pd.DataFrame(tfidf.todense(), columns=tfidf_vectorizer.get_feature_names_out().ravel())

This is the line taking up the most memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant