Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Feb 1, 2024
1 parent f679a20 commit 7597589
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,7 @@ def train_gpu(
# with open(save_model_path, "wb") as f:
# pickle.dump(model, f)

# rmse = np.sqrt(((predictions - y_test) ** 2).mean())
# fold_results.append(rmse)
# del dtrain, dtest, model
del dtrain, dtest, model
gc.collect() # Force garbage collection for xgb on GPU
print(fold_results)
log.info(f"Completed fold {fold + 1}/{n_splits} in {time.time() - send_time}s")
Expand Down

0 comments on commit 7597589

Please sign in to comment.