NicolasHug / Surprise

A Python scikit for building and analyzing recommender systems
http://surpriselib.com
BSD 3-Clause "New" or "Revised" License
6.36k stars 1.01k forks source link

Kernel dies during model.test() #363

Open anikait627 opened 4 years ago

anikait627 commented 4 years ago

Description

Hello,

I am trying to run and train a SVD mode with about ~300,000 ratings. However, whenever I run model.test(testset) my kernel dies. I initially saw that this could occur when you run out of RAM. So I was able to get a virtual machine with 16 cores and 32GB of RAM. However, the issue of the kernel dying still persists when running test for predictions. I was wondering if there something else I am missing that is causing the kernel to die? Is there anyway to fix this issue?

Thanks for your help, sincerely Anikait

Steps/Code to Reproduce

reader = Reader(rating_scale=(0, 5))
data = Dataset.load_from_df(ratings_df_v1[['userAuthId', 'videoId', 'score']], reader)
trainset = data.build_full_trainset()
algo_SVD = SVD(n_factors = 4)
algo_SVD.fit(trainset)
testset = trainset.build_anti_testset()
predictions = algo_SVD.test(testset) #where it breaks

Actual Results

image

Versions

Linux-4.15.0-66-generic-x86_64-with-debian-buster-sid Python 3.7.7 (default, Apr 20 2020, 05:55:00) [GCC 5.4.0 20160609] surprise 1.1.0