I use TPU which provides 35 GB RAM. Before I try to run this code snippet I had 20 GB free RAM. But I could not run that code snippet because of low ram(it says more than 35 GB required) I used a 6 GB dataset. Why this code takes so much place? I used garbage collector and deleted the dataframe that I used before. What can I do to make that code working?
Gen RAM Free: 26.4 GB | Proc size: 156.4 MB GPU RAM Free: 16280MB | Used: 0MB | Util 0% | Total 16280MB
seed = 7
test_size = 0.4
X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size=test_size)
gc.collect()
model=KNeighborsClassifier(n_neighbors=6,algorithm='kd_tree',n_jobs=25)
model.fit(X_train, y_train)